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