@alextheman/components 6.25.3 → 7.0.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/README.md +1 -1
- package/dist/DropdownMenu/index.d.ts +126 -0
- package/dist/DropdownMenu/index.js +2 -0
- package/dist/DropdownMenu/index.js.map +1 -0
- package/dist/QueryBoundary/index.d.ts +288 -0
- package/dist/QueryBoundary/index.js +2 -0
- package/dist/QueryBoundary/index.js.map +1 -0
- package/dist/Tab/index.d.ts +103 -0
- package/dist/Tab/index.js +2 -0
- package/dist/Tab/index.js.map +1 -0
- package/dist/audio/index.d.ts +40 -0
- package/dist/audio/index.js +2 -0
- package/dist/audio/index.js.map +1 -0
- package/dist/file/index.d.ts +56 -0
- package/dist/file/index.js +2 -0
- package/dist/file/index.js.map +1 -0
- package/dist/index.d.ts +31 -857
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/routing/index.d.ts +170 -0
- package/dist/routing/index.js +2 -0
- package/dist/routing/index.js.map +1 -0
- package/dist/snackbar/index.d.ts +51 -0
- package/dist/snackbar/index.js +2 -0
- package/dist/snackbar/index.js.map +1 -0
- package/dist/theme/index.d.ts +36 -0
- package/dist/theme/index.js +2 -0
- package/dist/theme/index.js.map +1 -0
- package/package.json +38 -13
- package/dist/index.cjs +0 -3
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -1010
- package/dist/v7/index.cjs +0 -2
- package/dist/v7/index.cjs.map +0 -1
- package/dist/v7/index.d.cts +0 -381
- package/dist/v7/index.d.ts +0 -381
- package/dist/v7/index.js +0 -2
- package/dist/v7/index.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import { TypographyProps } from "@mui/material/Typography";
|
|
2
1
|
import { CollapseProps } from "@mui/material/Collapse";
|
|
3
|
-
import { CSSProperties,
|
|
2
|
+
import { CSSProperties, ComponentType, Dispatch, ElementType, ReactNode, Ref, SetStateAction } from "react";
|
|
4
3
|
import { LinkProps } from "@mui/material/Link";
|
|
5
|
-
import
|
|
6
|
-
import { PaletteMode, SxProps, Theme } from "@mui/material/styles";
|
|
4
|
+
import { SxProps } from "@mui/material/styles";
|
|
7
5
|
import { SwitchProps } from "@mui/material/Switch";
|
|
8
|
-
import {
|
|
9
|
-
import { AlertColor } from "@mui/material/Alert";
|
|
10
|
-
import { LiveProvider } from "react-live";
|
|
11
|
-
import { MenuProps } from "@mui/material/Menu";
|
|
12
|
-
import { ListItemButtonProps } from "@mui/material/ListItemButton";
|
|
13
|
-
import { MenuItemOwnProps } from "@mui/material/MenuItem";
|
|
14
|
-
import { CommonProps, OverridableComponent } from "@mui/material/OverridableComponent";
|
|
15
|
-
import { SvgIconTypeMap } from "@mui/material/SvgIcon";
|
|
6
|
+
import { CommonProps } from "@mui/material/OverridableComponent";
|
|
16
7
|
|
|
17
|
-
//#region src/components/Artwork.d.ts
|
|
18
|
-
/**
|
|
8
|
+
//#region src/root/components/Artwork.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* The artwork associated with the package's theme song, _An Interface For You And I_.
|
|
11
|
+
*
|
|
12
|
+
* Listen to it here: https://youtu.be/Nq-fX9Ljf4I
|
|
13
|
+
*/
|
|
19
14
|
declare function Artwork(): import("react/jsx-runtime").JSX.Element;
|
|
20
15
|
//#endregion
|
|
21
|
-
//#region src/components/
|
|
22
|
-
interface
|
|
16
|
+
//#region src/root/components/CollapsibleItem.d.ts
|
|
17
|
+
interface CollapsibleItemProps {
|
|
23
18
|
/** Whether the item should initially be open or not. */
|
|
24
19
|
isInitiallyOpen?: boolean;
|
|
25
20
|
/** A callback function to execute when the item is open. */
|
|
@@ -51,7 +46,7 @@ interface CollapsableItemProps {
|
|
|
51
46
|
/**
|
|
52
47
|
* Shows a display area that can be opened to show the children components, or hidden away.
|
|
53
48
|
*/
|
|
54
|
-
declare function
|
|
49
|
+
declare function CollapsibleItem({
|
|
55
50
|
isInitiallyOpen,
|
|
56
51
|
onOpen,
|
|
57
52
|
onClose,
|
|
@@ -63,9 +58,9 @@ declare function CollapsableItem({
|
|
|
63
58
|
openIcon,
|
|
64
59
|
closedIcon,
|
|
65
60
|
useDefaultStyling
|
|
66
|
-
}:
|
|
61
|
+
}: CollapsibleItemProps): import("react/jsx-runtime").JSX.Element;
|
|
67
62
|
//#endregion
|
|
68
|
-
//#region src/components/ExternalLink.d.ts
|
|
63
|
+
//#region src/root/components/ExternalLink.d.ts
|
|
69
64
|
interface ExternalLinkProps extends Omit<LinkProps, "to" | "target" | "rel"> {
|
|
70
65
|
/** The URL of the place you want to navigate to. */
|
|
71
66
|
href: `https://${string}` | `http://${string}` | (string & {});
|
|
@@ -87,61 +82,7 @@ declare function ExternalLink({
|
|
|
87
82
|
...linkProps
|
|
88
83
|
}: ExternalLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
89
84
|
//#endregion
|
|
90
|
-
//#region src/components/
|
|
91
|
-
declare const FileType: {
|
|
92
|
-
readonly PDF: "application/pdf";
|
|
93
|
-
readonly PNG: "image/png";
|
|
94
|
-
readonly JPEG: "image/jpeg";
|
|
95
|
-
readonly JPG: "image/jpg";
|
|
96
|
-
readonly XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
97
|
-
readonly DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
98
|
-
readonly MP3: "audio/mp3";
|
|
99
|
-
readonly MP4: "video/mp4";
|
|
100
|
-
readonly WAV: "audio/wav";
|
|
101
|
-
};
|
|
102
|
-
type FileType = CreateEnumType<typeof FileType>;
|
|
103
|
-
interface FileInputProps extends ButtonOwnProps {
|
|
104
|
-
/** A function to run when a file has been uploaded. */
|
|
105
|
-
onFileInput: (allowedFiles: Array<File>) => void;
|
|
106
|
-
/** The label to display on the input button (defaults to "Upload files") */
|
|
107
|
-
label?: string;
|
|
108
|
-
/** Whether to accept multiple files or not. */
|
|
109
|
-
multiple?: boolean;
|
|
110
|
-
/** An array of file types to accept. */
|
|
111
|
-
accept?: Array<string>;
|
|
112
|
-
/** Enable the dropzone, allowing users to drag and drop files. */
|
|
113
|
-
useDropzone?: boolean;
|
|
114
|
-
}
|
|
115
|
-
/** Handles file inputs. */
|
|
116
|
-
declare function FileInput({
|
|
117
|
-
onFileInput,
|
|
118
|
-
label,
|
|
119
|
-
multiple,
|
|
120
|
-
accept,
|
|
121
|
-
useDropzone,
|
|
122
|
-
...buttonProps
|
|
123
|
-
}: FileInputProps): import("react/jsx-runtime").JSX.Element;
|
|
124
|
-
//#endregion
|
|
125
|
-
//#region src/components/FileInputList.d.ts
|
|
126
|
-
interface FileInputListProps extends Omit<FileInputProps, "onFileInput"> {
|
|
127
|
-
/** The array of files (must be a React state). */
|
|
128
|
-
files: Array<File>;
|
|
129
|
-
/** The state setter for the array of files. */
|
|
130
|
-
setFiles: Dispatch<SetStateAction<Array<File>>>;
|
|
131
|
-
}
|
|
132
|
-
/** Renders the `FileInput` component with a list of uploaded files underneath it. */
|
|
133
|
-
declare function FileInputList({
|
|
134
|
-
files,
|
|
135
|
-
setFiles,
|
|
136
|
-
multiple,
|
|
137
|
-
...fileInputProps
|
|
138
|
-
}: FileInputListProps): import("react/jsx-runtime").JSX.Element;
|
|
139
|
-
//#endregion
|
|
140
|
-
//#region src/components/ModeToggle.d.ts
|
|
141
|
-
/** A toggle to switch between dark mode and light mode. Must be used in a `ModeProvider`. */
|
|
142
|
-
declare function ModeToggle(): import("react/jsx-runtime").JSX.Element;
|
|
143
|
-
//#endregion
|
|
144
|
-
//#region src/components/Page.d.ts
|
|
85
|
+
//#region src/root/components/Page.d.ts
|
|
145
86
|
interface PageProps {
|
|
146
87
|
/** The Page title to show */
|
|
147
88
|
title: ReactNode;
|
|
@@ -166,341 +107,7 @@ declare function Page({
|
|
|
166
107
|
disablePadding
|
|
167
108
|
}: PageProps): import("react/jsx-runtime").JSX.Element;
|
|
168
109
|
//#endregion
|
|
169
|
-
//#region src/
|
|
170
|
-
interface QueryBoundaryDataProps<DataType> {
|
|
171
|
-
/**
|
|
172
|
-
* The elements to show after data has been loaded.
|
|
173
|
-
* 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.
|
|
174
|
-
*/
|
|
175
|
-
children: ReactNode | ((data: NonNullable<DataType>) => ReactNode);
|
|
176
|
-
/** A parser for the data. */
|
|
177
|
-
dataParser?: (data: unknown) => NonNullable<DataType>;
|
|
178
|
-
/** The component to show when the data is being fetched. */
|
|
179
|
-
loadingComponent?: ReactNode;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* The component responsible for showing the data provided by QueryBoundaryProvider.
|
|
183
|
-
*
|
|
184
|
-
* @template DataType - The type of data being loaded.
|
|
185
|
-
*/
|
|
186
|
-
declare function QueryBoundaryData<DataType>({
|
|
187
|
-
children,
|
|
188
|
-
dataParser: propDataParser,
|
|
189
|
-
loadingComponent
|
|
190
|
-
}: QueryBoundaryDataProps<DataType>): import("react/jsx-runtime").JSX.Element | null;
|
|
191
|
-
//#endregion
|
|
192
|
-
//#region src/groups/QueryBoundary/QueryBoundaryDataMap.d.ts
|
|
193
|
-
interface QueryBoundaryDataMapBaseProps<ItemType> {
|
|
194
|
-
/**
|
|
195
|
-
* The elements to show after data has been loaded.
|
|
196
|
-
*
|
|
197
|
-
* 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.
|
|
198
|
-
*/
|
|
199
|
-
children: ReactNode | ((data: ItemType) => ReactNode);
|
|
200
|
-
/** The component to show when the data is being fetched. */
|
|
201
|
-
loadingComponent?: ReactNode;
|
|
202
|
-
/** The component to show if the array is empty. */
|
|
203
|
-
emptyComponent?: ReactNode;
|
|
204
|
-
/** Throw an error if the provided data is not an array. (defaults to `true`) */
|
|
205
|
-
strictlyRequireArray?: boolean;
|
|
206
|
-
/**
|
|
207
|
-
* A function that takes a data item and returns the key to be used for the item.
|
|
208
|
-
*
|
|
209
|
-
* If not provided, it will fall back to using the index.
|
|
210
|
-
*/
|
|
211
|
-
itemKey?: (item: ItemType, index: number) => Key;
|
|
212
|
-
}
|
|
213
|
-
interface QueryBoundaryDataMapPropsWithItemParser<ItemType> extends QueryBoundaryDataMapBaseProps<ItemType> {
|
|
214
|
-
/** A parser for each data item. */
|
|
215
|
-
itemParser: (data: unknown) => ItemType;
|
|
216
|
-
dataParser?: never;
|
|
217
|
-
}
|
|
218
|
-
interface QueryBoundaryDataMapPropsWithDataParser<ItemType> extends QueryBoundaryDataMapBaseProps<ItemType> {
|
|
219
|
-
/** A parser for each data item. */
|
|
220
|
-
dataParser: (data: unknown) => Array<ItemType>;
|
|
221
|
-
itemParser?: never;
|
|
222
|
-
}
|
|
223
|
-
interface QueryBoundaryDataMapPropsWithNoParser<ItemType> extends QueryBoundaryDataMapBaseProps<ItemType> {
|
|
224
|
-
dataParser?: never;
|
|
225
|
-
itemParser?: never;
|
|
226
|
-
}
|
|
227
|
-
type QueryBoundaryDataMapProps<ItemType> = QueryBoundaryDataMapPropsWithItemParser<ItemType> | QueryBoundaryDataMapPropsWithDataParser<ItemType> | QueryBoundaryDataMapPropsWithNoParser<ItemType>;
|
|
228
|
-
/**
|
|
229
|
-
* The component responsible for handling an array of data provided by `QueryBoundaryProvider`.
|
|
230
|
-
*
|
|
231
|
-
* It will map through the data array, rendering the result of the children function in a fragment with a key of its index in the list, unless overridden by the `itemKey` prop.
|
|
232
|
-
*
|
|
233
|
-
* @template ItemType - The type of data being loaded.
|
|
234
|
-
*
|
|
235
|
-
* @throws {DataError} If the data provided by `QueryBoundaryProvider` is not an array, and the `strictlyRequireArray` prop is `true` (it is by default).
|
|
236
|
-
*/
|
|
237
|
-
declare function QueryBoundaryDataMap<ItemType>({
|
|
238
|
-
children,
|
|
239
|
-
loadingComponent: propLoadingComponent,
|
|
240
|
-
itemKey,
|
|
241
|
-
itemParser,
|
|
242
|
-
dataParser: propDataParser,
|
|
243
|
-
emptyComponent,
|
|
244
|
-
strictlyRequireArray
|
|
245
|
-
}: QueryBoundaryDataMapProps<ItemType>): import("react/jsx-runtime").JSX.Element | null;
|
|
246
|
-
//#endregion
|
|
247
|
-
//#region src/groups/QueryBoundary/QueryBoundaryError.d.ts
|
|
248
|
-
interface QueryBoundaryErrorProps {
|
|
249
|
-
/** The component to show if an error has been thrown. */
|
|
250
|
-
children?: ReactNode | ((error: unknown) => ReactNode);
|
|
251
|
-
/** An option to log the error to the console. */
|
|
252
|
-
logError?: boolean;
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* The component responsible for showing any errors provided by QueryBoundaryProvider.
|
|
256
|
-
*/
|
|
257
|
-
declare function QueryBoundaryError({
|
|
258
|
-
children,
|
|
259
|
-
logError: propsLogError
|
|
260
|
-
}: QueryBoundaryErrorProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
261
|
-
//#endregion
|
|
262
|
-
//#region src/groups/QueryBoundary/QueryBoundaryNullable.d.ts
|
|
263
|
-
interface QueryBoundaryNullablePropsWithUndefinedOrNull {
|
|
264
|
-
/** The component to show if no error was thrown but data is undefined */
|
|
265
|
-
undefinedComponent?: ReactNode;
|
|
266
|
-
/** The component to show if no error was thrown but data is null */
|
|
267
|
-
nullComponent?: ReactNode;
|
|
268
|
-
nullableComponent?: never;
|
|
269
|
-
}
|
|
270
|
-
interface QueryBoundaryNullablePropsWithNullable {
|
|
271
|
-
undefinedComponent?: never;
|
|
272
|
-
nullComponent?: never;
|
|
273
|
-
/** The component to show if no error was thrown but data is undefined or null */
|
|
274
|
-
nullableComponent?: ReactNode;
|
|
275
|
-
}
|
|
276
|
-
type QueryBoundaryNullableProps = QueryBoundaryNullablePropsWithUndefinedOrNull | QueryBoundaryNullablePropsWithNullable;
|
|
277
|
-
/** The component responsible for handling cases when the data provided by `QueryBoundaryProvider` may be missing. */
|
|
278
|
-
declare function QueryBoundaryNullable({
|
|
279
|
-
undefinedComponent,
|
|
280
|
-
nullComponent,
|
|
281
|
-
nullableComponent
|
|
282
|
-
}: QueryBoundaryNullableProps): import("react/jsx-runtime").JSX.Element | null;
|
|
283
|
-
//#endregion
|
|
284
|
-
//#region src/groups/QueryBoundary/QueryBoundaryFallback.d.ts
|
|
285
|
-
type QueryBoundaryFallbackProps = Omit<QueryBoundaryErrorProps, "children"> & {
|
|
286
|
-
/** The component to show if an error has been thrown. */errorComponent?: ReactNode | ((error: unknown) => ReactNode);
|
|
287
|
-
} & QueryBoundaryNullableProps;
|
|
288
|
-
/**
|
|
289
|
-
* The component responsible for handling both errors and nullable data from `QueryBoundaryProvider`
|
|
290
|
-
*/
|
|
291
|
-
declare function QueryBoundaryFallback({
|
|
292
|
-
errorComponent,
|
|
293
|
-
logError,
|
|
294
|
-
...queryBoundaryNullableProps
|
|
295
|
-
}: QueryBoundaryFallbackProps): import("react/jsx-runtime").JSX.Element;
|
|
296
|
-
//#endregion
|
|
297
|
-
//#region src/groups/QueryBoundary/index.d.ts
|
|
298
|
-
interface QueryBase {
|
|
299
|
-
/** The current loading status (true if loading, false if not) */
|
|
300
|
-
isLoading?: boolean;
|
|
301
|
-
/** The error given if the response gave an error. */
|
|
302
|
-
error?: unknown;
|
|
303
|
-
}
|
|
304
|
-
interface QuerySingle<DataType> extends QueryBase {
|
|
305
|
-
/** The data being loaded. */
|
|
306
|
-
data: DataType | null | undefined;
|
|
307
|
-
dataCollection?: never;
|
|
308
|
-
}
|
|
309
|
-
interface QueryMultiple<ItemType> extends QueryBase {
|
|
310
|
-
/** An array of data items being loaded. */
|
|
311
|
-
dataCollection: Array<ItemType> | null | undefined;
|
|
312
|
-
data?: never;
|
|
313
|
-
}
|
|
314
|
-
type Query<DataType> = QuerySingle<DataType> | QueryMultiple<DataType>;
|
|
315
|
-
interface CreateQueryBoundaryParameters<DataType> {
|
|
316
|
-
query: Query<DataType>;
|
|
317
|
-
}
|
|
318
|
-
interface DefaultQueryBoundaryComponents<DataType> {
|
|
319
|
-
Context: (props: {
|
|
320
|
-
children: ReactNode;
|
|
321
|
-
}) => JSX.Element;
|
|
322
|
-
Error: typeof QueryBoundaryError;
|
|
323
|
-
Data: typeof QueryBoundaryData<DataType>;
|
|
324
|
-
DataMap: typeof QueryBoundaryDataMap<DataType>;
|
|
325
|
-
Fallback: typeof QueryBoundaryFallback;
|
|
326
|
-
Nullable: typeof QueryBoundaryNullable;
|
|
327
|
-
}
|
|
328
|
-
/**
|
|
329
|
-
* A creator function to create a system of QueryBoundary components with the data fully typed throughout.
|
|
330
|
-
*
|
|
331
|
-
* @deprecated Please use either `createBaseQueryBoundary`, `createItemQueryBoundary`, or `createListQueryBoundary` from `@alextheman/components/v7` instead.
|
|
332
|
-
*/
|
|
333
|
-
declare function createQueryBoundary<DataType>({
|
|
334
|
-
query
|
|
335
|
-
}: CreateQueryBoundaryParameters<DataType>): DefaultQueryBoundaryComponents<DataType>;
|
|
336
|
-
//#endregion
|
|
337
|
-
//#region src/types/ContextHookOptions.d.ts
|
|
338
|
-
interface ContextHookOptions<Strict extends boolean = true> {
|
|
339
|
-
/** Error if the context is missing if this is set to true. */
|
|
340
|
-
strict?: Strict;
|
|
341
|
-
}
|
|
342
|
-
//#endregion
|
|
343
|
-
//#region src/groups/QueryBoundary/QueryBoundaryProvider.d.ts
|
|
344
|
-
interface QueryBoundaryProviderBaseProps<DataType> {
|
|
345
|
-
/** The current loading status (true if loading, false if not) */
|
|
346
|
-
isLoading?: boolean;
|
|
347
|
-
/** The data being loaded. */
|
|
348
|
-
data?: DataType | null | undefined;
|
|
349
|
-
/** A parser for the data. */
|
|
350
|
-
dataParser?: (data: unknown) => NonNullable<DataType>;
|
|
351
|
-
/** The component to show when the data is being fetched. */
|
|
352
|
-
loadingComponent?: ReactNode;
|
|
353
|
-
}
|
|
354
|
-
interface QueryBoundaryProviderPropsWithNoError<DataType> extends QueryBoundaryProviderBaseProps<DataType> {
|
|
355
|
-
error?: never;
|
|
356
|
-
errorComponent?: never;
|
|
357
|
-
logError?: never;
|
|
358
|
-
}
|
|
359
|
-
interface QueryBoundaryProviderPropsWithError<DataType> extends QueryBoundaryProviderBaseProps<DataType> {
|
|
360
|
-
/** The error given if the request gave an error. */
|
|
361
|
-
error: unknown;
|
|
362
|
-
/** 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. */
|
|
363
|
-
errorComponent?: ReactNode | ((error: unknown) => ReactNode);
|
|
364
|
-
/** Whether you want to log the error to the console or not. */
|
|
365
|
-
logError?: boolean;
|
|
366
|
-
}
|
|
367
|
-
type QueryBoundaryContextValue<DataType> = QueryBoundaryProviderPropsWithNoError<DataType> | QueryBoundaryProviderPropsWithError<DataType>;
|
|
368
|
-
type QueryBoundaryProviderProps<DataType> = QueryBoundaryContextValue<DataType> & {
|
|
369
|
-
children: ReactNode;
|
|
370
|
-
};
|
|
371
|
-
/** Access the QueryBoundary context directly. */
|
|
372
|
-
declare function useQueryBoundary<DataType, Strict extends boolean = true>({
|
|
373
|
-
strict
|
|
374
|
-
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, QueryBoundaryContextValue<DataType>>;
|
|
375
|
-
/**
|
|
376
|
-
* A provider for a context that deals with state management when fetching data from an API.
|
|
377
|
-
* This may be used over QueryBoundary if you require more control over the placement of the error message and data display.
|
|
378
|
-
*
|
|
379
|
-
* @template DataType - The type of data being loaded.
|
|
380
|
-
*/
|
|
381
|
-
declare function QueryBoundaryProvider<DataType>({
|
|
382
|
-
children,
|
|
383
|
-
loadingComponent,
|
|
384
|
-
...contextProps
|
|
385
|
-
}: QueryBoundaryProviderProps<DataType>): import("react/jsx-runtime").JSX.Element;
|
|
386
|
-
//#endregion
|
|
387
|
-
//#region src/groups/QueryBoundary/creators/createBaseQueryBoundary.d.ts
|
|
388
|
-
interface QueryBase$1<DataType> {
|
|
389
|
-
/** The current loading status (true if loading, false if not) */
|
|
390
|
-
isLoading?: boolean;
|
|
391
|
-
/** The error given if the response gave an error. */
|
|
392
|
-
error?: unknown;
|
|
393
|
-
/** The data being loaded. */
|
|
394
|
-
data: DataType;
|
|
395
|
-
}
|
|
396
|
-
interface CreateBaseQueryBoundaryParameters<DataType> {
|
|
397
|
-
query: QueryBase$1<DataType>;
|
|
398
|
-
}
|
|
399
|
-
interface DefaultQueryBoundaryComponentsBase {
|
|
400
|
-
Context: (props: {
|
|
401
|
-
children: ReactNode;
|
|
402
|
-
}) => JSX.Element;
|
|
403
|
-
Error: typeof QueryBoundaryError;
|
|
404
|
-
Fallback: typeof QueryBoundaryFallback;
|
|
405
|
-
Nullable: typeof QueryBoundaryNullable;
|
|
406
|
-
}
|
|
407
|
-
/** A creator function to create the base system of QueryBoundary components with the data fully typed throughout. */
|
|
408
|
-
declare function createBaseQueryBoundary<DataType>({
|
|
409
|
-
query
|
|
410
|
-
}: CreateBaseQueryBoundaryParameters<DataType>): DefaultQueryBoundaryComponentsBase;
|
|
411
|
-
//#endregion
|
|
412
|
-
//#region src/groups/QueryBoundary/creators/createItemQueryBoundary.d.ts
|
|
413
|
-
interface QueryItem<DataType> extends Omit<QueryBase$1<DataType>, "data"> {
|
|
414
|
-
/** The data being loaded. */
|
|
415
|
-
data: DataType | null | undefined;
|
|
416
|
-
}
|
|
417
|
-
interface CreateItemQueryBoundaryParameters<DataType> {
|
|
418
|
-
query: QueryItem<DataType>;
|
|
419
|
-
}
|
|
420
|
-
interface DefaultQueryBoundaryItemComponents<DataType> extends DefaultQueryBoundaryComponentsBase {
|
|
421
|
-
Data: typeof QueryBoundaryData<DataType>;
|
|
422
|
-
}
|
|
423
|
-
/** A creator function to create the system of QueryBoundary components with the data treated as a single data item, fully typed throughout. */
|
|
424
|
-
declare function createItemQueryBoundary<DataType>({
|
|
425
|
-
query
|
|
426
|
-
}: CreateItemQueryBoundaryParameters<DataType>): DefaultQueryBoundaryItemComponents<DataType>;
|
|
427
|
-
//#endregion
|
|
428
|
-
//#region src/groups/QueryBoundary/creators/createListQueryBoundary.d.ts
|
|
429
|
-
interface QueryList<DataType> extends Omit<QueryBase$1<DataType>, "data"> {
|
|
430
|
-
/** The data being loaded. */
|
|
431
|
-
data: Array<DataType> | null | undefined;
|
|
432
|
-
}
|
|
433
|
-
interface CreateListQueryBoundaryParameters<DataType> {
|
|
434
|
-
query: QueryList<DataType>;
|
|
435
|
-
}
|
|
436
|
-
interface DefaultQueryBoundaryListComponents<DataType> extends DefaultQueryBoundaryComponentsBase {
|
|
437
|
-
DataMap: typeof QueryBoundaryDataMap<DataType>;
|
|
438
|
-
}
|
|
439
|
-
/** A creator function to create the system of QueryBoundary components with the data treated as an array of data items, fully typed throughout. */
|
|
440
|
-
declare function createListQueryBoundary<DataType>({
|
|
441
|
-
query
|
|
442
|
-
}: CreateListQueryBoundaryParameters<DataType>): DefaultQueryBoundaryListComponents<DataType>;
|
|
443
|
-
//#endregion
|
|
444
|
-
//#region src/components/QueryBoundaryMap.d.ts
|
|
445
|
-
type QueryBoundaryMapProps<ItemType> = Omit<QueryBoundaryProviderProps<Array<ItemType>>, "children" | "logError"> & Omit<QueryBoundaryFallbackProps, "errorComponent"> & QueryBoundaryDataMapProps<ItemType>;
|
|
446
|
-
/**
|
|
447
|
-
* An in-line component that handles an array of data provided by `QueryBoundaryProvider`.
|
|
448
|
-
*
|
|
449
|
-
* This may be used over QueryBoundaryProvider/QueryBoundaryDataMap if you don't require as much control over the placement of the error message and data display.
|
|
450
|
-
*
|
|
451
|
-
* @template DataType - The type of data being loaded.
|
|
452
|
-
*/
|
|
453
|
-
declare function QueryBoundaryMap<ItemType>({
|
|
454
|
-
loadingComponent,
|
|
455
|
-
undefinedComponent,
|
|
456
|
-
nullComponent,
|
|
457
|
-
nullableComponent,
|
|
458
|
-
logError,
|
|
459
|
-
errorComponent,
|
|
460
|
-
children,
|
|
461
|
-
isLoading,
|
|
462
|
-
error,
|
|
463
|
-
data,
|
|
464
|
-
dataParser,
|
|
465
|
-
itemParser,
|
|
466
|
-
itemKey
|
|
467
|
-
}: QueryBoundaryMapProps<ItemType>): import("react/jsx-runtime").JSX.Element;
|
|
468
|
-
//#endregion
|
|
469
|
-
//#region src/components/QueryBoundaryWrapper.d.ts
|
|
470
|
-
type QueryBoundaryWrapperProps<DataType> = Omit<QueryBoundaryProviderProps<DataType>, "children" | "logError"> & Omit<QueryBoundaryFallbackProps, "errorComponent"> & Omit<QueryBoundaryDataProps<DataType>, "showOnError" | "onUndefined" | "onNull" | "onNullable">;
|
|
471
|
-
/**
|
|
472
|
-
* An in-line component that deals with state management when fetching data from an API.
|
|
473
|
-
* This may be used over QueryBoundaryProvider if you don't require as much control over the placement of the error message and data display.
|
|
474
|
-
*
|
|
475
|
-
* @template DataType - The type of data being loaded.
|
|
476
|
-
*/
|
|
477
|
-
declare function QueryBoundaryWrapper<DataType>({
|
|
478
|
-
children,
|
|
479
|
-
errorComponent,
|
|
480
|
-
undefinedComponent,
|
|
481
|
-
nullComponent,
|
|
482
|
-
nullableComponent,
|
|
483
|
-
logError,
|
|
484
|
-
loadingComponent,
|
|
485
|
-
isLoading,
|
|
486
|
-
error,
|
|
487
|
-
data,
|
|
488
|
-
dataParser
|
|
489
|
-
}: QueryBoundaryWrapperProps<DataType>): import("react/jsx-runtime").JSX.Element;
|
|
490
|
-
//#endregion
|
|
491
|
-
//#region src/components/ReactPlayground.d.ts
|
|
492
|
-
interface ReactPlaygroundProps extends ComponentProps<typeof LiveProvider> {
|
|
493
|
-
/** Extra styling to apply to the preview. Must be compatible with the Material UI `sx` prop. */
|
|
494
|
-
previewStyles?: SxProps<Theme>;
|
|
495
|
-
}
|
|
496
|
-
/** Renders a playground to help demonstrate your React code in an interactive setting. */
|
|
497
|
-
declare function ReactPlayground({
|
|
498
|
-
code,
|
|
499
|
-
previewStyles,
|
|
500
|
-
...liveProviderProps
|
|
501
|
-
}: ReactPlaygroundProps): import("react/jsx-runtime").JSX.Element;
|
|
502
|
-
//#endregion
|
|
503
|
-
//#region src/components/SkeletonRow.d.ts
|
|
110
|
+
//#region src/root/components/SkeletonRow.d.ts
|
|
504
111
|
interface SkeletonRowProps {
|
|
505
112
|
/** The number of columns the SkeletonRow should display. */
|
|
506
113
|
columns: number;
|
|
@@ -510,7 +117,7 @@ declare function SkeletonRow({
|
|
|
510
117
|
columns
|
|
511
118
|
}: SkeletonRowProps): import("react/jsx-runtime").JSX.Element;
|
|
512
119
|
//#endregion
|
|
513
|
-
//#region src/components/SwitchWithIcons.d.ts
|
|
120
|
+
//#region src/root/components/SwitchWithIcons.d.ts
|
|
514
121
|
interface SwitchWithIconsProps extends Omit<SwitchProps, "icon" | "checkedIcon"> {
|
|
515
122
|
/** The icon to show when the switch is in a checked state. */
|
|
516
123
|
checkedIcon: ComponentType<{
|
|
@@ -534,353 +141,7 @@ declare function SwitchWithIcons({
|
|
|
534
141
|
...switchProps
|
|
535
142
|
}: SwitchWithIconsProps): import("react/jsx-runtime").JSX.Element;
|
|
536
143
|
//#endregion
|
|
537
|
-
//#region src/
|
|
538
|
-
interface DropdownMenuProps {
|
|
539
|
-
children: ReactNode | ((closeMenu: () => void) => ReactNode);
|
|
540
|
-
buttonChildren?: ReactNode;
|
|
541
|
-
button?: ElementType;
|
|
542
|
-
buttonProps?: Omit<ButtonOwnProps, "onClick" | "endIcon">;
|
|
543
|
-
isOpenIcon?: ReactNode;
|
|
544
|
-
isClosedIcon?: ReactNode;
|
|
545
|
-
onOpen?: () => void;
|
|
546
|
-
onClose?: () => void;
|
|
547
|
-
}
|
|
548
|
-
/**
|
|
549
|
-
* @deprecated This component does not support the new context-based pattern and individual DropdownMenuItem components. Please use DropdownMenu2 instead.
|
|
550
|
-
*/
|
|
551
|
-
declare function DropdownMenu({
|
|
552
|
-
children,
|
|
553
|
-
button: Button,
|
|
554
|
-
buttonChildren,
|
|
555
|
-
buttonProps: incomingButtonProps,
|
|
556
|
-
isOpenIcon,
|
|
557
|
-
isClosedIcon,
|
|
558
|
-
onOpen,
|
|
559
|
-
onClose
|
|
560
|
-
}: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
561
|
-
//#endregion
|
|
562
|
-
//#region src/deprecated/DarkModeToggle.d.ts
|
|
563
|
-
/** @deprecated This component has been renamed to `ModeToggle`. */
|
|
564
|
-
declare const DarkModeToggle: typeof ModeToggle;
|
|
565
|
-
//#endregion
|
|
566
|
-
//#region src/v7/components/DropdownMenu/DropdownMenu.d.ts
|
|
567
|
-
interface DropdownMenuProps$1 extends Omit<MenuProps, "anchorEl" | "open"> {
|
|
568
|
-
/** The children to render inside of the dropdown. */
|
|
569
|
-
children: ReactNode;
|
|
570
|
-
}
|
|
571
|
-
/**
|
|
572
|
-
* Renders a menu component that can be used alongside the `DropdownMenuProvider`.
|
|
573
|
-
*
|
|
574
|
-
* This component's open state would be controlled by the `DropdownMenuTrigger`.
|
|
575
|
-
*/
|
|
576
|
-
declare function DropdownMenu$1({
|
|
577
|
-
children,
|
|
578
|
-
onClose,
|
|
579
|
-
...menuProps
|
|
580
|
-
}: DropdownMenuProps$1): import("react/jsx-runtime").JSX.Element;
|
|
581
|
-
//#endregion
|
|
582
|
-
//#region src/v7/components/DropdownMenu/DropdownMenuItem.d.ts
|
|
583
|
-
type DropdownMenuItemProps$1<RootComponent extends ElementType = typeof MUIButton> = {
|
|
584
|
-
/**
|
|
585
|
-
* An optional component to provide to override the current component.
|
|
586
|
-
*
|
|
587
|
-
* Note that the provided component must:
|
|
588
|
-
* - accept a `to` prop.
|
|
589
|
-
* - correctly handle the forwarded `ref`.
|
|
590
|
-
* - render a valid anchor element (or equivalent) for proper accessibility.
|
|
591
|
-
*/
|
|
592
|
-
component?: RootComponent; /** The children to be rendered within the menu item. */
|
|
593
|
-
children?: ReactNode; /** The ref to forward to allow it to be used with polymorphic components */
|
|
594
|
-
ref?: ComponentPropsWithRef<RootComponent>["ref"]; /** A function to execute after clicking the item. */
|
|
595
|
-
onClick?: ComponentProps<RootComponent>["onClick"];
|
|
596
|
-
} & Omit<ComponentPropsWithoutRef<RootComponent>, "children" | "ref"> & MenuItemOwnProps;
|
|
597
|
-
/** Represents a menu item to be used inside the `DropdownMenu`. It must be used as children of the `DropdownMenu` component. */
|
|
598
|
-
declare function DropdownMenuItem$1<RootComponent extends ElementType = typeof MUIButton>({
|
|
599
|
-
component,
|
|
600
|
-
children,
|
|
601
|
-
ref,
|
|
602
|
-
onClick,
|
|
603
|
-
...menuItemProps
|
|
604
|
-
}: DropdownMenuItemProps$1<RootComponent>): import("react/jsx-runtime").JSX.Element;
|
|
605
|
-
//#endregion
|
|
606
|
-
//#region src/v7/components/DropdownMenu/DropdownMenuProvider.d.ts
|
|
607
|
-
interface DropdownMenuContextValue {
|
|
608
|
-
/** A function responsible for closing the dropdown menu. */
|
|
609
|
-
closeMenu: () => void;
|
|
610
|
-
/** Represents whether or not the dropdown is open. */
|
|
611
|
-
isDropdownOpen: boolean;
|
|
612
|
-
}
|
|
613
|
-
/**
|
|
614
|
-
Access the DropdownMenu context directly.
|
|
615
|
-
*/
|
|
616
|
-
declare function useDropdownMenu$1<Strict extends boolean = true>({
|
|
617
|
-
strict
|
|
618
|
-
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, DropdownMenuContextValue>;
|
|
619
|
-
//#endregion
|
|
620
|
-
//#region src/deprecated/DropdownMenu2/DropdownMenu2.d.ts
|
|
621
|
-
declare const useDropdownMenu: typeof useDropdownMenu$1;
|
|
622
|
-
/**
|
|
623
|
-
* @deprecated Please use `DropdownMenuProps` from `@alextheman/components/v7` instead.
|
|
624
|
-
*
|
|
625
|
-
* This will be replaced in the root entrypoint in a future release.
|
|
626
|
-
*/
|
|
627
|
-
type DropdownMenu2Props = DropdownMenuProps$1;
|
|
628
|
-
/**
|
|
629
|
-
* @deprecated Please use `DropdownMenu` from `@alextheman/components/v7` instead.
|
|
630
|
-
*
|
|
631
|
-
* This will be replaced in the root entrypoint in a future release.
|
|
632
|
-
*/
|
|
633
|
-
declare const DropdownMenu2: typeof DropdownMenu$1;
|
|
634
|
-
//#endregion
|
|
635
|
-
//#region src/deprecated/DropdownMenu2/DropdownMenuItem.d.ts
|
|
636
|
-
type DropdownMenuItemProps<RootComponent extends ElementType> = DropdownMenuItemProps$1<RootComponent>;
|
|
637
|
-
declare const DropdownMenuItem: typeof DropdownMenuItem$1;
|
|
638
|
-
//#endregion
|
|
639
|
-
//#region src/deprecated/DropdownMenuExternalLink.d.ts
|
|
640
|
-
interface DropdownMenuExternalLinkProps extends MenuItemOwnProps {
|
|
641
|
-
ref?: Ref<HTMLAnchorElement>;
|
|
642
|
-
href: ComponentProps<typeof ExternalLink>["href"];
|
|
643
|
-
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
644
|
-
children: ReactNode;
|
|
645
|
-
}
|
|
646
|
-
/** @deprecated Please use `<DropdownMenuItem component={ExternalLink} />` instead. */
|
|
647
|
-
declare function DropdownMenuExternalLink({
|
|
648
|
-
ref,
|
|
649
|
-
href,
|
|
650
|
-
children,
|
|
651
|
-
onClick,
|
|
652
|
-
...menuItemProps
|
|
653
|
-
}: DropdownMenuExternalLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
654
|
-
//#endregion
|
|
655
|
-
//#region src/deprecated/InternalLink.d.ts
|
|
656
|
-
interface InternalLinkProps extends Omit<LinkProps, "href" | "component"> {
|
|
657
|
-
/** The path to navigate to */
|
|
658
|
-
to: `/${string}` | `~/${string}` | (string & {});
|
|
659
|
-
/**
|
|
660
|
-
* An optional component to provide to override the current component.
|
|
661
|
-
*
|
|
662
|
-
* Note that the provided component must:
|
|
663
|
-
* - accept a `to` prop
|
|
664
|
-
* - correctly handle the forwarded `ref`
|
|
665
|
-
* - render a valid anchor element (or equivalent) for proper accessibility
|
|
666
|
-
*/
|
|
667
|
-
component?: ElementType;
|
|
668
|
-
href?: never;
|
|
669
|
-
/** The readable content to display on the link. */
|
|
670
|
-
children: ReactNode;
|
|
671
|
-
/** An optional ref to allow it to be used with polymorphic components. */
|
|
672
|
-
ref?: Ref<HTMLAnchorElement>;
|
|
673
|
-
}
|
|
674
|
-
/**
|
|
675
|
-
* A stylised link for navigating within your application.
|
|
676
|
-
*
|
|
677
|
-
* Uses the app router for client-side navigation and opens the destination in the same tab.
|
|
678
|
-
*
|
|
679
|
-
* Defaults to a React Router implementation but can be overridden via the `component` prop.
|
|
680
|
-
*
|
|
681
|
-
* @deprecated This component is not compatible with the rest of the Wouter setup for use in v7. Please use `InternalLink` from `@alextheman/components/v7` instead. This component will be replaced when v7 officially comes out.
|
|
682
|
-
*/
|
|
683
|
-
declare function InternalLink({
|
|
684
|
-
to,
|
|
685
|
-
component,
|
|
686
|
-
children,
|
|
687
|
-
ref,
|
|
688
|
-
...linkProps
|
|
689
|
-
}: InternalLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
690
|
-
//#endregion
|
|
691
|
-
//#region src/deprecated/DropdownMenuInternalLink.d.ts
|
|
692
|
-
interface DropdownMenuInternalLinkProps extends MenuItemOwnProps {
|
|
693
|
-
ref?: Ref<HTMLAnchorElement>;
|
|
694
|
-
to: ComponentProps<typeof InternalLink>["to"];
|
|
695
|
-
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
696
|
-
children: ReactNode;
|
|
697
|
-
}
|
|
698
|
-
/** @deprecated Please use `<DropdownMenuItem component={InternalLink} />` instead. */
|
|
699
|
-
declare function DropdownMenuInternalLink({
|
|
700
|
-
to,
|
|
701
|
-
ref,
|
|
702
|
-
children,
|
|
703
|
-
onClick,
|
|
704
|
-
...menuItemProps
|
|
705
|
-
}: DropdownMenuInternalLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
706
|
-
//#endregion
|
|
707
|
-
//#region src/deprecated/IconWithPopover.d.ts
|
|
708
|
-
interface IconWithPopoverProps {
|
|
709
|
-
icon?: (OverridableComponent<SvgIconTypeMap<unknown, "svg">> & {
|
|
710
|
-
muiName: string;
|
|
711
|
-
}) | ElementType;
|
|
712
|
-
onOpen?: () => void;
|
|
713
|
-
onClose?: () => void;
|
|
714
|
-
iconProps?: SvgIconTypeMap<unknown, "svg">["props"];
|
|
715
|
-
children: ReactNode;
|
|
716
|
-
}
|
|
717
|
-
/**
|
|
718
|
-
* @deprecated This component is not well-designed for accessibility purposes. Please use the `Tooltip` component from `@mui/material` instead.
|
|
719
|
-
*
|
|
720
|
-
* @example
|
|
721
|
-
* ```tsx
|
|
722
|
-
* <Tooltip title="Text to display on hover">
|
|
723
|
-
* <MdVisibility />
|
|
724
|
-
* </Tooltip>
|
|
725
|
-
* ```
|
|
726
|
-
*/
|
|
727
|
-
declare function IconWithPopover({
|
|
728
|
-
icon: Icon,
|
|
729
|
-
onOpen,
|
|
730
|
-
onClose,
|
|
731
|
-
iconProps,
|
|
732
|
-
children
|
|
733
|
-
}: IconWithPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
734
|
-
//#endregion
|
|
735
|
-
//#region src/deprecated/ListItemInternalLink.d.ts
|
|
736
|
-
interface ListItemInternalLinkProps extends Omit<ListItemButtonProps, "href"> {
|
|
737
|
-
children: ReactNode;
|
|
738
|
-
to: string;
|
|
739
|
-
}
|
|
740
|
-
/** @deprecated Probably not that worth centralising here - can be easily recreated per use case. */
|
|
741
|
-
declare function ListItemInternalLink({
|
|
742
|
-
children,
|
|
743
|
-
...listItemButtonProps
|
|
744
|
-
}: ListItemInternalLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
745
|
-
//#endregion
|
|
746
|
-
//#region src/deprecated/Loader.d.ts
|
|
747
|
-
/** @deprecated This component has been renamed to QueryBoundary */
|
|
748
|
-
declare const Loader: typeof QueryBoundaryWrapper;
|
|
749
|
-
//#endregion
|
|
750
|
-
//#region src/deprecated/LoaderData.d.ts
|
|
751
|
-
/** @deprecated This type has been renamed to QueryBoundaryDataProps. */
|
|
752
|
-
type LoaderDataProps<DataType> = QueryBoundaryDataProps<DataType>;
|
|
753
|
-
/** @deprecated This component has been renamed to QueryBoundaryData. */
|
|
754
|
-
declare const LoaderData: typeof QueryBoundaryData;
|
|
755
|
-
//#endregion
|
|
756
|
-
//#region src/deprecated/LoaderError.d.ts
|
|
757
|
-
/** @deprecated This type has been renamed to QueryBoundaryErrorProps. */
|
|
758
|
-
type LoaderErrorBaseProps = QueryBoundaryErrorProps;
|
|
759
|
-
/** @deprecated This type has been renamed to QueryBoundaryNullablePropsWithUndefinedOrNull. */
|
|
760
|
-
type LoaderErrorPropsWithUndefinedOrNull = LoaderErrorBaseProps & QueryBoundaryNullablePropsWithUndefinedOrNull;
|
|
761
|
-
/** @deprecated This type has been renamed to QueryBoundaryNullablePropsWithNullable. */
|
|
762
|
-
type LoaderErrorPropsWithNullable = LoaderErrorBaseProps & QueryBoundaryNullablePropsWithNullable;
|
|
763
|
-
/** @deprecated This type has been renamed to QueryBoundaryFallbackProps. */
|
|
764
|
-
type LoaderErrorProps = QueryBoundaryFallbackProps;
|
|
765
|
-
/** @deprecated This component has been renamed to LoaderError. */
|
|
766
|
-
declare const LoaderError: typeof QueryBoundaryFallback;
|
|
767
|
-
//#endregion
|
|
768
|
-
//#region src/deprecated/LoaderProvider.d.ts
|
|
769
|
-
/** @deprecated This type has been renamed to QueryBoundaryProviderBaseProps. */
|
|
770
|
-
type LoaderProviderBaseProps<DataType> = QueryBoundaryProviderBaseProps<DataType>;
|
|
771
|
-
/** @deprecated This type has been renamed to QueryBoundaryProviderPropsWithNoError. */
|
|
772
|
-
type LoaderProviderPropsWithNoError<DataType> = QueryBoundaryProviderPropsWithNoError<DataType>;
|
|
773
|
-
/** @deprecated This type has been renamed to QueryBoundaryProviderPropsWithError. */
|
|
774
|
-
type LoaderProviderPropsWithError<DataType> = QueryBoundaryProviderPropsWithError<DataType>;
|
|
775
|
-
/** @deprecated This type has been renamed to QueryBoundaryContextValue. */
|
|
776
|
-
type LoaderContextValue<DataType> = QueryBoundaryContextValue<DataType>;
|
|
777
|
-
/** @deprecated This type has been renamed to QueryBoundaryProviderProps. */
|
|
778
|
-
type LoaderProviderProps<DataType> = QueryBoundaryProviderProps<DataType>;
|
|
779
|
-
/** @deprecated This component has been renamed to QueryBoundaryProvider */
|
|
780
|
-
declare const LoaderProvider: typeof QueryBoundaryProvider;
|
|
781
|
-
//#endregion
|
|
782
|
-
//#region src/deprecated/NavigationBottom.d.ts
|
|
783
|
-
interface NavItemBottom {
|
|
784
|
-
/** The value associated with the nav item. */
|
|
785
|
-
value: string;
|
|
786
|
-
/** The label to display on the nav item. */
|
|
787
|
-
label: string;
|
|
788
|
-
/** An icon to display alongside the nav item. */
|
|
789
|
-
icon?: JSX.Element;
|
|
790
|
-
/** Where in your app the nav item should navigate to. */
|
|
791
|
-
to: string;
|
|
792
|
-
}
|
|
793
|
-
interface NavigationBottomProps {
|
|
794
|
-
/** Children to display above the nav bar. */
|
|
795
|
-
children: ReactNode;
|
|
796
|
-
/** An array of nav items to show. */
|
|
797
|
-
navItems: Array<NavItemBottom>;
|
|
798
|
-
}
|
|
799
|
-
/**
|
|
800
|
-
* Renders a navigation bar at the bottom of the screen. Especially helpful for common navigation options in a mobile app.
|
|
801
|
-
*
|
|
802
|
-
* @deprecated Please use `NavigationBottom` from the `@alextheman/components/v7` entrypoint instead.
|
|
803
|
-
*/
|
|
804
|
-
declare function NavigationBottom({
|
|
805
|
-
children,
|
|
806
|
-
navItems
|
|
807
|
-
}: NavigationBottomProps): import("react/jsx-runtime").JSX.Element;
|
|
808
|
-
//#endregion
|
|
809
|
-
//#region src/deprecated/NavigationDrawer.d.ts
|
|
810
|
-
interface NavMenuItemOptions {
|
|
811
|
-
/** The label to display on the nav item option. */
|
|
812
|
-
label: string;
|
|
813
|
-
/** Where in your app the nav item option should navigate to. */
|
|
814
|
-
to: string;
|
|
815
|
-
/** An icon to display alongside the nav item option. */
|
|
816
|
-
icon?: ReactNode;
|
|
817
|
-
}
|
|
818
|
-
interface NavMenuItem {
|
|
819
|
-
/** The category to display all the nav item options under. */
|
|
820
|
-
category: string;
|
|
821
|
-
/** An array of nav options to display under the chosen category. */
|
|
822
|
-
options: Array<NavMenuItemOptions>;
|
|
823
|
-
}
|
|
824
|
-
interface NavigationDrawerProps {
|
|
825
|
-
/** The title to display at the top of the wrapper. */
|
|
826
|
-
title: string;
|
|
827
|
-
/** An array of nav items to show. */
|
|
828
|
-
navItems: Array<NavMenuItem>;
|
|
829
|
-
/** Any extra elements to add to the header. */
|
|
830
|
-
headerElements?: ReactNode;
|
|
831
|
-
/** Children to display within the wrapper. */
|
|
832
|
-
children: ReactNode;
|
|
833
|
-
}
|
|
834
|
-
/**
|
|
835
|
-
* Renders a collapsable drawer to help with navigation. Best used as the main means of navigation on desktop apps.
|
|
836
|
-
*
|
|
837
|
-
* @deprecated This component is not compatible with the rest of the Wouter setup for use in v7. Please use `NavigationDrawer` from `@alextheman/components/v7` instead. This component will be replaced when v7 officially comes out.
|
|
838
|
-
*/
|
|
839
|
-
declare function NavigationDrawer({
|
|
840
|
-
title,
|
|
841
|
-
navItems,
|
|
842
|
-
children,
|
|
843
|
-
headerElements
|
|
844
|
-
}: NavigationDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
845
|
-
//#endregion
|
|
846
|
-
//#region src/deprecated/PopoverText.d.ts
|
|
847
|
-
interface PopoverTextProps extends TypographyProps {
|
|
848
|
-
text: string;
|
|
849
|
-
}
|
|
850
|
-
/**
|
|
851
|
-
* @deprecated This component has been deprecated alongside `IconWithPopover`.
|
|
852
|
-
*/
|
|
853
|
-
declare function PopoverText({
|
|
854
|
-
text,
|
|
855
|
-
sx,
|
|
856
|
-
...typographyProps
|
|
857
|
-
}: PopoverTextProps): import("react/jsx-runtime").JSX.Element;
|
|
858
|
-
//#endregion
|
|
859
|
-
//#region src/deprecated/QueryBoundary.d.ts
|
|
860
|
-
/** @deprecated This type has been renamed to `QueryBoundaryWrapperProps`. */
|
|
861
|
-
type QueryBoundaryProps<DataType> = QueryBoundaryWrapperProps<DataType>;
|
|
862
|
-
/** @deprecated This component has been renamed to `QueryBoundaryWrapper` */
|
|
863
|
-
declare const QueryBoundary: typeof QueryBoundaryWrapper;
|
|
864
|
-
//#endregion
|
|
865
|
-
//#region src/deprecated/SubmitButton.d.ts
|
|
866
|
-
interface SubmitButtonProps extends Omit<ButtonProps, "type"> {
|
|
867
|
-
/** An option to disable the button on submit if the form is not dirty. */
|
|
868
|
-
disableClean?: boolean;
|
|
869
|
-
/** The label for the button. */
|
|
870
|
-
label: string;
|
|
871
|
-
}
|
|
872
|
-
/**
|
|
873
|
-
* A Submit Button for use with `react-hook-form`.
|
|
874
|
-
*
|
|
875
|
-
* @deprecated This component is not compatible with `@tanstack/react-form`. Please use `SubmitButton` from the `@alextheman/components/v7` entrypoint instead. This component will be replaced when v7 officially comes out.
|
|
876
|
-
*/
|
|
877
|
-
declare function SubmitButton({
|
|
878
|
-
disableClean,
|
|
879
|
-
label,
|
|
880
|
-
...buttonProps
|
|
881
|
-
}: SubmitButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
882
|
-
//#endregion
|
|
883
|
-
//#region src/hooks/useDebounce.d.ts
|
|
144
|
+
//#region src/root/hooks/useDebounce.d.ts
|
|
884
145
|
/**
|
|
885
146
|
* Assign a variable a given value after a given amount of milliseconds.
|
|
886
147
|
*
|
|
@@ -893,7 +154,7 @@ declare function SubmitButton({
|
|
|
893
154
|
*/
|
|
894
155
|
declare function useDebounce<ValueType>(value: ValueType, delay?: number): ValueType;
|
|
895
156
|
//#endregion
|
|
896
|
-
//#region src/hooks/useHash.d.ts
|
|
157
|
+
//#region src/root/hooks/useHash.d.ts
|
|
897
158
|
/**
|
|
898
159
|
* Stores changes to the window hash as React state.
|
|
899
160
|
*
|
|
@@ -905,106 +166,19 @@ declare function useDebounce<ValueType>(value: ValueType, delay?: number): Value
|
|
|
905
166
|
*/
|
|
906
167
|
declare function useHash<StateType extends string>(initialHash: StateType | undefined): [StateType, Dispatch<SetStateAction<StateType>>];
|
|
907
168
|
//#endregion
|
|
908
|
-
//#region src/
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
tracks: Array<TrackData>;
|
|
916
|
-
currentTrack: TrackData;
|
|
917
|
-
setCurrentTrack: Dispatch<SetStateAction<TrackData>>;
|
|
918
|
-
}
|
|
919
|
-
interface AudioProviderProps {
|
|
920
|
-
tracks: Array<TrackData>;
|
|
921
|
-
children: ReactNode;
|
|
922
|
-
}
|
|
923
|
-
/** Allows access to the audio information provided by AudioProvider. Will fail if AudioProvider could not be accessed and strict mode is true. */
|
|
924
|
-
declare function useAudioContext<Strict extends boolean = true>({
|
|
925
|
-
strict
|
|
926
|
-
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, AudioContextValue>;
|
|
927
|
-
/** Provides audio information to the children components. */
|
|
928
|
-
declare function AudioProvider({
|
|
929
|
-
tracks,
|
|
930
|
-
children
|
|
931
|
-
}: AudioProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
932
|
-
//#endregion
|
|
933
|
-
//#region src/providers/AudioProvider/AudioControls.d.ts
|
|
934
|
-
/** Controls the tracks provided by the AudioProvider. */
|
|
935
|
-
declare function AudioControls(): import("react/jsx-runtime").JSX.Element;
|
|
936
|
-
//#endregion
|
|
937
|
-
//#region src/providers/ModeProvider.d.ts
|
|
938
|
-
interface ModeContextValue {
|
|
939
|
-
toggleMode: () => void;
|
|
940
|
-
mode: PaletteMode;
|
|
941
|
-
}
|
|
942
|
-
/** Access the mode context directly. */
|
|
943
|
-
declare function useMode<Strict extends boolean = true>({
|
|
944
|
-
strict
|
|
945
|
-
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, ModeContextValue>;
|
|
946
|
-
interface ModeProviderProps {
|
|
947
|
-
/** The children that will have access to the current mode. */
|
|
948
|
-
children: ReactNode;
|
|
949
|
-
/** The initial mode. */
|
|
950
|
-
mode?: PaletteMode;
|
|
951
|
-
}
|
|
952
|
-
/** Provides information about the current theme mode to its children components. */
|
|
953
|
-
declare function ModeProvider({
|
|
954
|
-
children,
|
|
955
|
-
mode: modeProp
|
|
956
|
-
}: ModeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
957
|
-
//#endregion
|
|
958
|
-
//#region src/providers/ScreenSizeProvider.d.ts
|
|
959
|
-
interface ScreenSizeProps {
|
|
960
|
-
/** The children that will be receiving the ScreenSizeContext. */
|
|
961
|
-
children: ReactNode;
|
|
962
|
-
/** The minimum screen width in pixels required to be considered a large screen. */
|
|
963
|
-
largeScreenWidth?: number;
|
|
964
|
-
/** The minimum screen height in pixels required to be considered a large screen. */
|
|
965
|
-
largeScreenHeight?: number;
|
|
966
|
-
}
|
|
967
|
-
interface ScreenDimensions {
|
|
968
|
-
/** The current window width. */
|
|
969
|
-
windowWidth: number;
|
|
970
|
-
/** The current window height. */
|
|
971
|
-
windowHeight: number;
|
|
972
|
-
}
|
|
973
|
-
interface ScreenSizeContextValue extends ScreenDimensions {
|
|
974
|
-
/** Whether the screen is a large screen or not. */
|
|
975
|
-
isLargeScreen: boolean;
|
|
976
|
-
}
|
|
977
|
-
/** Access the screen size context directly. */
|
|
978
|
-
declare function useScreenSize<Strict extends boolean = true>({
|
|
979
|
-
strict
|
|
980
|
-
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, ScreenSizeContextValue>;
|
|
981
|
-
/** Provides context about the current screen size. */
|
|
982
|
-
declare function ScreenSizeProvider({
|
|
983
|
-
children,
|
|
984
|
-
largeScreenWidth,
|
|
985
|
-
largeScreenHeight
|
|
986
|
-
}: ScreenSizeProps): import("react/jsx-runtime").JSX.Element;
|
|
169
|
+
//#region src/root/hooks/useIsLargeScreen.d.ts
|
|
170
|
+
/**
|
|
171
|
+
* Determines if the screen size can be considered large.
|
|
172
|
+
*
|
|
173
|
+
* @returns `true` if the screen size is considered large, and `false` otherwise.
|
|
174
|
+
*/
|
|
175
|
+
declare function useIsLargeScreen(): boolean;
|
|
987
176
|
//#endregion
|
|
988
|
-
//#region src/
|
|
989
|
-
interface
|
|
990
|
-
/**
|
|
991
|
-
|
|
992
|
-
/** The amount of seconds to wait before hiding the snackbar. */
|
|
993
|
-
autoHideDuration?: number;
|
|
994
|
-
}
|
|
995
|
-
interface SnackbarContextValue {
|
|
996
|
-
/** A function that adds the snackbar to the page. */
|
|
997
|
-
addSnackbar: (message: string, severity?: AlertColor, duration?: number) => void;
|
|
177
|
+
//#region src/root/types/ContextHookOptions.d.ts
|
|
178
|
+
interface ContextHookOptions<Strict extends boolean = true> {
|
|
179
|
+
/** Error if the context is missing if this is set to true. */
|
|
180
|
+
strict?: Strict;
|
|
998
181
|
}
|
|
999
|
-
/** Access the snackbar context directly. */
|
|
1000
|
-
declare function useSnackbar<Strict extends boolean = true>({
|
|
1001
|
-
strict
|
|
1002
|
-
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, SnackbarContextValue>;
|
|
1003
|
-
/** Controls the display of the snackbars on the page. */
|
|
1004
|
-
declare function SnackbarProvider({
|
|
1005
|
-
children,
|
|
1006
|
-
autoHideDuration
|
|
1007
|
-
}: SnackbarProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
1008
182
|
//#endregion
|
|
1009
|
-
export { Artwork,
|
|
183
|
+
export { Artwork, CollapsibleItem, type CollapsibleItemProps, type ContextHookOptions, ExternalLink, type ExternalLinkProps, Page, type PageProps, SkeletonRow, type SkeletonRowProps, SwitchWithIcons, type SwitchWithIconsProps, useDebounce, useHash, useIsLargeScreen };
|
|
1010
184
|
//# sourceMappingURL=index.d.ts.map
|