@alextheman/components 5.8.2 → 6.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/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +367 -244
- package/dist/index.d.ts +367 -244
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,306 +1,429 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { ListItemButtonProps } from
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
1
|
+
import { CollapseProps } from "@mui/material/Collapse";
|
|
2
|
+
import * as react0 from "react";
|
|
3
|
+
import { CSSProperties, ComponentProps, ComponentType, Dispatch, ElementType, JSX, ReactNode, Ref, SetStateAction } from "react";
|
|
4
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
5
|
+
import { AlertColor } from "@mui/material/Alert";
|
|
6
|
+
import { PaletteMode, SxProps, Theme } from "@mui/material/styles";
|
|
7
|
+
import { OptionalOnCondition } from "@alextheman/utility";
|
|
8
|
+
import { ButtonOwnProps, ButtonProps } from "@mui/material/Button";
|
|
9
|
+
import { LinkProps } from "@mui/material/Link";
|
|
10
|
+
import { ListItemButtonProps } from "@mui/material/ListItemButton";
|
|
11
|
+
import { TypographyProps } from "@mui/material/Typography";
|
|
12
|
+
import { LiveProvider } from "react-live";
|
|
13
|
+
import { SwitchProps } from "@mui/material/Switch";
|
|
14
|
+
import { CommonProps, OverridableComponent } from "@mui/material/OverridableComponent";
|
|
15
|
+
import { SvgIconTypeMap } from "@mui/material/SvgIcon";
|
|
16
16
|
|
|
17
|
+
//#region src/components/CollapsableItem.d.ts
|
|
17
18
|
interface CollapsableItemProps {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
declare function CollapsableItem({
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
isInitiallyOpen?: boolean;
|
|
20
|
+
onOpen?: () => void;
|
|
21
|
+
onClose?: () => void;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
buttonStyles?: SxProps;
|
|
24
|
+
buttonContents: ReactNode;
|
|
25
|
+
buttonComponent?: ElementType;
|
|
26
|
+
openIcon?: ReactNode;
|
|
27
|
+
closedIcon?: ReactNode;
|
|
28
|
+
collapseProps?: Omit<CollapseProps, "in">;
|
|
29
|
+
useDefaultStyling?: boolean;
|
|
30
|
+
}
|
|
31
|
+
declare function CollapsableItem({
|
|
32
|
+
isInitiallyOpen,
|
|
33
|
+
onOpen,
|
|
34
|
+
onClose,
|
|
35
|
+
children,
|
|
36
|
+
buttonStyles,
|
|
37
|
+
buttonContents,
|
|
38
|
+
buttonComponent: ButtonComponent,
|
|
39
|
+
collapseProps,
|
|
40
|
+
openIcon,
|
|
41
|
+
closedIcon,
|
|
42
|
+
useDefaultStyling
|
|
43
|
+
}: CollapsableItemProps): react_jsx_runtime3.JSX.Element;
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/components/DarkModeToggle.d.ts
|
|
46
|
+
declare function DarkModeToggle(): react_jsx_runtime3.JSX.Element;
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/components/DropdownMenu.d.ts
|
|
34
49
|
interface DropdownMenuProps {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
declare function DropdownMenu({
|
|
45
|
-
|
|
50
|
+
children: ReactNode | ((closeMenu: () => void) => ReactNode);
|
|
51
|
+
buttonChildren?: ReactNode;
|
|
52
|
+
button?: ElementType;
|
|
53
|
+
buttonProps?: Omit<ButtonOwnProps, "onClick" | "endIcon">;
|
|
54
|
+
isOpenIcon?: ReactNode;
|
|
55
|
+
isClosedIcon?: ReactNode;
|
|
56
|
+
onOpen?: () => void;
|
|
57
|
+
onClose?: () => void;
|
|
58
|
+
}
|
|
59
|
+
declare function DropdownMenu({
|
|
60
|
+
children,
|
|
61
|
+
button: Button,
|
|
62
|
+
buttonChildren,
|
|
63
|
+
buttonProps: incomingButtonProps,
|
|
64
|
+
isOpenIcon,
|
|
65
|
+
isClosedIcon,
|
|
66
|
+
onOpen,
|
|
67
|
+
onClose
|
|
68
|
+
}: DropdownMenuProps): react_jsx_runtime3.JSX.Element;
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/components/ExternalLink.d.ts
|
|
46
71
|
interface ExternalLinkProps extends Omit<LinkProps, "to" | "target" | "rel"> {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
declare function ExternalLink({
|
|
53
|
-
|
|
72
|
+
href: `https://${string}` | `http://${string}` | (string & {});
|
|
73
|
+
to?: never;
|
|
74
|
+
children: ReactNode;
|
|
75
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
76
|
+
}
|
|
77
|
+
declare function ExternalLink({
|
|
78
|
+
href,
|
|
79
|
+
children,
|
|
80
|
+
ref,
|
|
81
|
+
...linkProps
|
|
82
|
+
}: ExternalLinkProps): react_jsx_runtime3.JSX.Element;
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region src/components/FileInput.d.ts
|
|
54
85
|
declare const FileType: {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
86
|
+
readonly PDF: "application/pdf";
|
|
87
|
+
readonly PNG: "image/png";
|
|
88
|
+
readonly JPEG: "image/jpeg";
|
|
89
|
+
readonly JPG: "image/jpg";
|
|
90
|
+
readonly XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
91
|
+
readonly DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
92
|
+
readonly MP3: "audio/mp3";
|
|
93
|
+
readonly MP4: "video/mp4";
|
|
94
|
+
readonly WAV: "audio/wav";
|
|
64
95
|
};
|
|
65
96
|
type FileType = (typeof FileType)[keyof typeof FileType];
|
|
66
97
|
interface FileInputProps extends ButtonOwnProps {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
declare function FileInput({
|
|
74
|
-
|
|
98
|
+
onFileInput: (allowedFiles: File[]) => void;
|
|
99
|
+
label?: string;
|
|
100
|
+
multiple?: boolean;
|
|
101
|
+
accept?: string[];
|
|
102
|
+
useDropzone?: boolean;
|
|
103
|
+
}
|
|
104
|
+
declare function FileInput({
|
|
105
|
+
onFileInput,
|
|
106
|
+
label,
|
|
107
|
+
multiple,
|
|
108
|
+
accept,
|
|
109
|
+
useDropzone,
|
|
110
|
+
...buttonProps
|
|
111
|
+
}: FileInputProps): react_jsx_runtime3.JSX.Element;
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/components/FileInputList.d.ts
|
|
75
114
|
interface FileInputListProps extends Omit<FileInputProps, "onFileInput"> {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
declare function FileInputList({
|
|
80
|
-
|
|
115
|
+
files: File[];
|
|
116
|
+
setFiles: Dispatch<SetStateAction<File[]>>;
|
|
117
|
+
}
|
|
118
|
+
declare function FileInputList({
|
|
119
|
+
files,
|
|
120
|
+
setFiles,
|
|
121
|
+
...fileInputProps
|
|
122
|
+
}: FileInputListProps): react_jsx_runtime3.JSX.Element;
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region src/components/IconWithPopover.d.ts
|
|
81
125
|
interface IconWithPopoverProps {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
declare function IconWithPopover({
|
|
91
|
-
|
|
126
|
+
icon: (OverridableComponent<SvgIconTypeMap<unknown, "svg">> & {
|
|
127
|
+
muiName: string;
|
|
128
|
+
}) | ElementType;
|
|
129
|
+
onOpen?: () => void;
|
|
130
|
+
onClose?: () => void;
|
|
131
|
+
iconProps?: SvgIconTypeMap<unknown, "svg">["props"];
|
|
132
|
+
children: ReactNode;
|
|
133
|
+
}
|
|
134
|
+
declare function IconWithPopover({
|
|
135
|
+
icon: Icon,
|
|
136
|
+
onOpen,
|
|
137
|
+
onClose,
|
|
138
|
+
iconProps,
|
|
139
|
+
children
|
|
140
|
+
}: IconWithPopoverProps): react_jsx_runtime3.JSX.Element;
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/components/InternalLink.d.ts
|
|
92
143
|
interface InternalLinkProps extends Omit<LinkProps, "href"> {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
declare function InternalLink({
|
|
99
|
-
|
|
144
|
+
to: `/${string}` | `~/${string}` | (string & {});
|
|
145
|
+
href?: never;
|
|
146
|
+
children: ReactNode;
|
|
147
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
148
|
+
}
|
|
149
|
+
declare function InternalLink({
|
|
150
|
+
to,
|
|
151
|
+
children,
|
|
152
|
+
ref,
|
|
153
|
+
...linkProps
|
|
154
|
+
}: InternalLinkProps): react_jsx_runtime3.JSX.Element;
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/components/ListItemInternalLink.d.ts
|
|
100
157
|
interface ListItemInternalLinkProps extends Omit<ListItemButtonProps, "href"> {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
declare function ListItemInternalLink({
|
|
105
|
-
|
|
158
|
+
children: ReactNode;
|
|
159
|
+
to: string;
|
|
160
|
+
}
|
|
161
|
+
declare function ListItemInternalLink({
|
|
162
|
+
children,
|
|
163
|
+
...listItemButtonProps
|
|
164
|
+
}: ListItemInternalLinkProps): react_jsx_runtime3.JSX.Element;
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region src/types/ContextHookOptions.d.ts
|
|
106
167
|
interface ContextHookOptions<S extends boolean = true> {
|
|
107
|
-
|
|
168
|
+
strict?: S;
|
|
108
169
|
}
|
|
109
|
-
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region src/providers/LoaderProvider/LoaderProvider.d.ts
|
|
110
172
|
interface LoaderProviderBaseProps<T> {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
173
|
+
/** The current loading status (true if loading, false if not) */
|
|
174
|
+
isLoading: boolean;
|
|
175
|
+
/** The data being loaded. */
|
|
176
|
+
data?: T;
|
|
177
|
+
/** A parser for the data. */
|
|
178
|
+
dataParser?: (data: unknown) => NonNullable<T>;
|
|
179
|
+
/** The component to show when the data is being fetched. */
|
|
180
|
+
loadingComponent?: ReactNode;
|
|
119
181
|
}
|
|
120
182
|
interface LoaderProviderPropsWithNoError<T> extends LoaderProviderBaseProps<T> {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
183
|
+
error?: never;
|
|
184
|
+
errorComponent?: never;
|
|
185
|
+
logError?: never;
|
|
124
186
|
}
|
|
125
187
|
interface LoaderProviderPropsWithError<T> extends LoaderProviderBaseProps<T> {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
188
|
+
/** The error given if the request gave an error. */
|
|
189
|
+
error: unknown;
|
|
190
|
+
/** 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. */
|
|
191
|
+
errorComponent?: ReactNode | ((error: unknown) => ReactNode);
|
|
192
|
+
/** Whether you want to log the error to the console or not. */
|
|
193
|
+
logError?: boolean;
|
|
132
194
|
}
|
|
133
195
|
type LoaderContextValue<T> = LoaderProviderPropsWithNoError<T> | LoaderProviderPropsWithError<T>;
|
|
134
196
|
type LoaderProviderProps<T> = LoaderContextValue<T> & {
|
|
135
|
-
|
|
197
|
+
children: ReactNode;
|
|
136
198
|
};
|
|
137
|
-
declare function useLoader<T, Strict extends boolean = true>({ strict, }?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, LoaderContextValue<T>>;
|
|
138
199
|
/** A provider for a context that deals with state management when fetching data from an API.
|
|
139
200
|
* This may be used over Loader if you require more control over the placement of the error message and data display.
|
|
140
201
|
*/
|
|
141
|
-
declare function LoaderProvider<T>({
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
* @deprecated Please use the nullableComponent prop on LoaderError instead */
|
|
158
|
-
onNullable: () => ReactNode | void;
|
|
159
|
-
}
|
|
160
|
-
interface LoaderDataPropsOnUndefinedOrNull<T> extends LoaderDataBaseProps<T> {
|
|
161
|
-
/** A function to run if the data is undefined and not loading. This may either return React components or nothing.
|
|
162
|
-
* @deprecated Please use the nullableComponent prop on LoaderError instead */
|
|
163
|
-
onUndefined?: () => ReactNode | void;
|
|
164
|
-
/** A function to run if the data is null and not loading. This may either return React components or nothing.
|
|
165
|
-
* @deprecated Please use the nullableComponent prop on LoaderError instead */
|
|
166
|
-
onNull?: () => ReactNode | void;
|
|
167
|
-
onNullable?: never;
|
|
202
|
+
declare function LoaderProvider<T>({
|
|
203
|
+
children,
|
|
204
|
+
loadingComponent,
|
|
205
|
+
...contextProps
|
|
206
|
+
}: LoaderProviderProps<T>): react_jsx_runtime3.JSX.Element;
|
|
207
|
+
//#endregion
|
|
208
|
+
//#region src/providers/LoaderProvider/LoaderData.d.ts
|
|
209
|
+
interface LoaderDataProps<T> {
|
|
210
|
+
/** The elements to show after data has been loaded.
|
|
211
|
+
* 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.
|
|
212
|
+
*/
|
|
213
|
+
children: ReactNode | ((data: NonNullable<T>) => ReactNode);
|
|
214
|
+
/** A parser for the data. */
|
|
215
|
+
dataParser?: (data: unknown) => NonNullable<T>;
|
|
216
|
+
/** The component to show when the data is being fetched. */
|
|
217
|
+
loadingComponent?: ReactNode;
|
|
168
218
|
}
|
|
169
|
-
type LoaderDataProps<T> = LoaderDataPropsOnUndefinedOrNull<T> | LoaderDataPropsOnNullable<T>;
|
|
170
219
|
/** The component responsible for showing the data provided by LoaderProvider. */
|
|
171
|
-
declare function LoaderData<T>({
|
|
172
|
-
|
|
220
|
+
declare function LoaderData<T>({
|
|
221
|
+
children,
|
|
222
|
+
dataParser: loaderDataParser,
|
|
223
|
+
loadingComponent
|
|
224
|
+
}: LoaderDataProps<T>): react_jsx_runtime3.JSX.Element;
|
|
225
|
+
//#endregion
|
|
226
|
+
//#region src/providers/LoaderProvider/LoaderError.d.ts
|
|
173
227
|
interface LoaderErrorBaseProps {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
228
|
+
/**
|
|
229
|
+
* The component to show if an error has been thrown.
|
|
230
|
+
* @deprecated Please pass in the content to show on error as children instead.
|
|
231
|
+
*/
|
|
232
|
+
errorComponent?: ReactNode | ((error: unknown) => ReactNode);
|
|
233
|
+
/** The component to show if an error has been thrown. */
|
|
234
|
+
children?: ReactNode | ((error: unknown) => ReactNode);
|
|
235
|
+
/** Whether you want to log the error to the console or not. */
|
|
236
|
+
logError?: boolean;
|
|
183
237
|
}
|
|
184
238
|
interface LoaderErrorPropsWithUndefinedOrNull extends LoaderErrorBaseProps {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
239
|
+
/** The component to show if no error was thrown but data is undefined */
|
|
240
|
+
undefinedComponent?: ReactNode;
|
|
241
|
+
/** The component to show if no error was thrown but data is null */
|
|
242
|
+
nullComponent?: ReactNode;
|
|
243
|
+
nullableComponent?: never;
|
|
190
244
|
}
|
|
191
245
|
interface LoaderErrorPropsWithNullable extends LoaderErrorBaseProps {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
246
|
+
undefinedComponent?: never;
|
|
247
|
+
nullComponent?: never;
|
|
248
|
+
/** The component to show if no error was thrown but data is undefined or null */
|
|
249
|
+
nullableComponent?: ReactNode;
|
|
196
250
|
}
|
|
197
251
|
type LoaderErrorProps = LoaderErrorPropsWithUndefinedOrNull | LoaderErrorPropsWithNullable;
|
|
198
252
|
/** The component responsible for showing any errors provided by LoaderProvider. */
|
|
199
|
-
declare function LoaderError({
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
253
|
+
declare function LoaderError({
|
|
254
|
+
children,
|
|
255
|
+
undefinedComponent,
|
|
256
|
+
nullComponent,
|
|
257
|
+
nullableComponent,
|
|
258
|
+
logError: propsLogError
|
|
259
|
+
}: LoaderErrorProps): string | number | bigint | boolean | react_jsx_runtime3.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react0.ReactPortal | react0.ReactElement<unknown, string | react0.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region src/providers/ModeProvider.d.ts
|
|
203
262
|
interface ModeContextValue {
|
|
204
|
-
|
|
205
|
-
|
|
263
|
+
toggleMode: () => void;
|
|
264
|
+
mode: PaletteMode;
|
|
206
265
|
}
|
|
207
|
-
declare function useMode<Strict extends boolean = true>({
|
|
266
|
+
declare function useMode<Strict extends boolean = true>({
|
|
267
|
+
strict
|
|
268
|
+
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, ModeContextValue>;
|
|
208
269
|
interface ModeProviderProps {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
declare function ModeProvider({
|
|
213
|
-
|
|
270
|
+
children: ReactNode;
|
|
271
|
+
mode?: PaletteMode;
|
|
272
|
+
}
|
|
273
|
+
declare function ModeProvider({
|
|
274
|
+
children,
|
|
275
|
+
mode: modeProp
|
|
276
|
+
}: ModeProviderProps): react_jsx_runtime3.JSX.Element;
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/providers/ScreenSizeProvider.d.ts
|
|
214
279
|
interface ScreenSizeProps {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
280
|
+
children: ReactNode;
|
|
281
|
+
largeScreenWidth?: number;
|
|
282
|
+
largeScreenHeight?: number;
|
|
218
283
|
}
|
|
219
284
|
interface ScreenSizeContextValue {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
declare function useScreenSize<Strict extends boolean = true>({
|
|
225
|
-
|
|
226
|
-
|
|
285
|
+
isLargeScreen: boolean;
|
|
286
|
+
windowWidth: number;
|
|
287
|
+
windowHeight: number;
|
|
288
|
+
}
|
|
289
|
+
declare function useScreenSize<Strict extends boolean = true>({
|
|
290
|
+
strict
|
|
291
|
+
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, ScreenSizeContextValue>;
|
|
292
|
+
declare function ScreenSizeProvider({
|
|
293
|
+
children,
|
|
294
|
+
largeScreenWidth,
|
|
295
|
+
largeScreenHeight
|
|
296
|
+
}: ScreenSizeProps): react_jsx_runtime3.JSX.Element;
|
|
297
|
+
//#endregion
|
|
298
|
+
//#region src/providers/SnackbarProvider.d.ts
|
|
227
299
|
interface SnackbarProviderProps {
|
|
228
|
-
|
|
229
|
-
|
|
300
|
+
children: ReactNode;
|
|
301
|
+
autoHideDuration?: number;
|
|
230
302
|
}
|
|
231
303
|
interface SnackbarContextValue {
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
declare function useSnackbar<Strict extends boolean = true>({
|
|
235
|
-
|
|
236
|
-
|
|
304
|
+
addSnackbar: (message: string, severity?: AlertColor, duration?: number) => void;
|
|
305
|
+
}
|
|
306
|
+
declare function useSnackbar<Strict extends boolean = true>({
|
|
307
|
+
strict
|
|
308
|
+
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, SnackbarContextValue>;
|
|
309
|
+
declare function SnackbarProvider({
|
|
310
|
+
children,
|
|
311
|
+
autoHideDuration
|
|
312
|
+
}: SnackbarProviderProps): react_jsx_runtime3.JSX.Element;
|
|
313
|
+
//#endregion
|
|
314
|
+
//#region src/components/Loader.d.ts
|
|
237
315
|
type LoaderProps<T> = Omit<LoaderProviderProps<T>, "children"> & Omit<LoaderErrorProps, "errorComponent" | "children"> & Omit<LoaderDataProps<T>, "showOnError" | "onUndefined" | "onNull" | "onNullable">;
|
|
238
316
|
/** An in-line component that deals with state management when fetching data from an API.
|
|
239
317
|
* This may be used over LoaderProvider if you don't require as much control over the placement of the error message and data display.
|
|
240
318
|
*/
|
|
241
|
-
declare function Loader<T>({
|
|
242
|
-
|
|
319
|
+
declare function Loader<T>({
|
|
320
|
+
children,
|
|
321
|
+
errorComponent,
|
|
322
|
+
undefinedComponent,
|
|
323
|
+
nullComponent,
|
|
324
|
+
nullableComponent,
|
|
325
|
+
loadingComponent,
|
|
326
|
+
...loaderProviderProps
|
|
327
|
+
}: LoaderProps<T>): react_jsx_runtime3.JSX.Element;
|
|
328
|
+
//#endregion
|
|
329
|
+
//#region src/components/NavigationBottom.d.ts
|
|
243
330
|
interface NavItemBottom {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
331
|
+
value: string;
|
|
332
|
+
label: string;
|
|
333
|
+
icon?: JSX.Element;
|
|
334
|
+
to: string;
|
|
248
335
|
}
|
|
249
336
|
interface NavigationBottomProps {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}
|
|
253
|
-
declare function NavigationBottom({
|
|
254
|
-
|
|
337
|
+
children: ReactNode;
|
|
338
|
+
navItems: NavItemBottom[];
|
|
339
|
+
}
|
|
340
|
+
declare function NavigationBottom({
|
|
341
|
+
children,
|
|
342
|
+
navItems
|
|
343
|
+
}: NavigationBottomProps): react_jsx_runtime3.JSX.Element;
|
|
344
|
+
//#endregion
|
|
345
|
+
//#region src/components/NavigationDrawer.d.ts
|
|
255
346
|
interface NavMenuItem {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
347
|
+
category: string;
|
|
348
|
+
options: {
|
|
349
|
+
label: string;
|
|
350
|
+
to: string;
|
|
351
|
+
icon?: ReactNode;
|
|
352
|
+
}[];
|
|
262
353
|
}
|
|
263
354
|
interface NavigationDrawerProps {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}
|
|
269
|
-
declare function NavigationDrawer({
|
|
270
|
-
|
|
355
|
+
title: string;
|
|
356
|
+
navItems: NavMenuItem[];
|
|
357
|
+
headerElements?: ReactNode;
|
|
358
|
+
children: ReactNode;
|
|
359
|
+
}
|
|
360
|
+
declare function NavigationDrawer({
|
|
361
|
+
title,
|
|
362
|
+
navItems,
|
|
363
|
+
children,
|
|
364
|
+
headerElements
|
|
365
|
+
}: NavigationDrawerProps): react_jsx_runtime3.JSX.Element;
|
|
366
|
+
//#endregion
|
|
367
|
+
//#region src/components/PopoverText.d.ts
|
|
271
368
|
interface PopoverTextProps extends TypographyProps {
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
declare function PopoverText({
|
|
275
|
-
|
|
369
|
+
text: string;
|
|
370
|
+
}
|
|
371
|
+
declare function PopoverText({
|
|
372
|
+
text,
|
|
373
|
+
sx,
|
|
374
|
+
...typographyProps
|
|
375
|
+
}: PopoverTextProps): react_jsx_runtime3.JSX.Element;
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region src/components/ReactPlayground.d.ts
|
|
276
378
|
interface ReactPlaygroundProps extends ComponentProps<typeof LiveProvider> {
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
declare function ReactPlayground({
|
|
280
|
-
|
|
379
|
+
previewStyles?: SxProps<Theme>;
|
|
380
|
+
}
|
|
381
|
+
declare function ReactPlayground({
|
|
382
|
+
code,
|
|
383
|
+
previewStyles,
|
|
384
|
+
...liveProviderProps
|
|
385
|
+
}: ReactPlaygroundProps): react_jsx_runtime3.JSX.Element;
|
|
386
|
+
//#endregion
|
|
387
|
+
//#region src/components/SkeletonRow.d.ts
|
|
281
388
|
interface SkeletonRowProps {
|
|
282
|
-
|
|
389
|
+
columns: number;
|
|
283
390
|
}
|
|
284
|
-
declare function SkeletonRow({
|
|
285
|
-
|
|
391
|
+
declare function SkeletonRow({
|
|
392
|
+
columns
|
|
393
|
+
}: SkeletonRowProps): react_jsx_runtime3.JSX.Element;
|
|
394
|
+
//#endregion
|
|
395
|
+
//#region src/components/SubmitButton.d.ts
|
|
286
396
|
interface SubmitButtonProps extends Omit<ButtonProps, "type"> {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
declare function SubmitButton({
|
|
291
|
-
|
|
397
|
+
disableClean?: boolean;
|
|
398
|
+
label: string;
|
|
399
|
+
}
|
|
400
|
+
declare function SubmitButton({
|
|
401
|
+
disableClean,
|
|
402
|
+
label,
|
|
403
|
+
...buttonProps
|
|
404
|
+
}: SubmitButtonProps): react_jsx_runtime3.JSX.Element;
|
|
405
|
+
//#endregion
|
|
406
|
+
//#region src/components/SwitchWithIcons.d.ts
|
|
292
407
|
interface SwitchWithIconsProps extends Omit<SwitchProps, "icon" | "checkedIcon"> {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
declare function SwitchWithIcons({
|
|
303
|
-
|
|
408
|
+
checkedIcon: ComponentType<{
|
|
409
|
+
style?: CSSProperties;
|
|
410
|
+
}>;
|
|
411
|
+
checkedIconStyles?: CommonProps["style"];
|
|
412
|
+
uncheckedIcon: ComponentType<{
|
|
413
|
+
style?: CSSProperties;
|
|
414
|
+
}>;
|
|
415
|
+
uncheckedIconStyles?: CommonProps["style"];
|
|
416
|
+
}
|
|
417
|
+
declare function SwitchWithIcons({
|
|
418
|
+
checkedIcon: CheckedIcon,
|
|
419
|
+
checkedIconStyles,
|
|
420
|
+
uncheckedIcon: UncheckedIcon,
|
|
421
|
+
uncheckedIconStyles,
|
|
422
|
+
...switchProps
|
|
423
|
+
}: SwitchWithIconsProps): react_jsx_runtime3.JSX.Element;
|
|
424
|
+
//#endregion
|
|
425
|
+
//#region src/hooks/useHash.d.ts
|
|
304
426
|
declare function useHash<S extends string>(initialHash: S | undefined): [S, Dispatch<SetStateAction<S>>];
|
|
305
|
-
|
|
306
|
-
export { CollapsableItem, type CollapsableItemProps,
|
|
427
|
+
//#endregion
|
|
428
|
+
export { CollapsableItem, type CollapsableItemProps, ContextHookOptions, DarkModeToggle, DropdownMenu, type DropdownMenuProps, ExternalLink, type ExternalLinkProps, FileInput, FileInputList, type FileInputListProps, type FileInputProps, FileType, IconWithPopover, type IconWithPopoverProps, InternalLink, type InternalLinkProps, ListItemInternalLink, type ListItemInternalLinkProps, Loader, LoaderData, type LoaderDataProps, LoaderError, type LoaderErrorBaseProps, type LoaderErrorProps, type LoaderErrorPropsWithNullable, type LoaderErrorPropsWithUndefinedOrNull, type LoaderProps, LoaderProvider, type LoaderProviderBaseProps, type LoaderProviderProps, type LoaderProviderPropsWithError, type LoaderProviderPropsWithNoError, ModeProvider, type ModeProviderProps, type NavItemBottom, type NavMenuItem, NavigationBottom, type NavigationBottomProps, NavigationDrawer, type NavigationDrawerProps, PopoverText, type PopoverTextProps, ReactPlayground, type ReactPlaygroundProps, type ScreenSizeContextValue, type ScreenSizeProps, ScreenSizeProvider, SkeletonRow, type SkeletonRowProps, SnackbarProvider, type SnackbarProviderProps, SubmitButton, type SubmitButtonProps, SwitchWithIcons, type SwitchWithIconsProps, useHash, useMode, useScreenSize, useSnackbar };
|
|
429
|
+
//# sourceMappingURL=index.d.ts.map
|