@alextheman/components 5.8.1 → 5.9.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 +386 -237
- package/dist/index.d.ts +386 -237
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +8 -9
package/dist/index.d.cts
CHANGED
|
@@ -1,306 +1,455 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { CollapseProps } from
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
5
|
-
import {
|
|
6
|
-
import { ButtonOwnProps, ButtonProps } from
|
|
7
|
-
import { LinkProps } from
|
|
8
|
-
import {
|
|
9
|
-
import { SvgIconTypeMap } from
|
|
10
|
-
import { ListItemButtonProps } from
|
|
11
|
-
import { OptionalOnCondition } from
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
1
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
2
|
+
import { CollapseProps } from "@mui/material/Collapse";
|
|
3
|
+
import { PaletteMode, SxProps, Theme } from "@mui/material/styles";
|
|
4
|
+
import * as react0 from "react";
|
|
5
|
+
import { CSSProperties, ComponentProps, ComponentType, Dispatch, ElementType, JSX, ReactNode, Ref, SetStateAction } from "react";
|
|
6
|
+
import { ButtonOwnProps, ButtonProps } from "@mui/material/Button";
|
|
7
|
+
import { LinkProps } from "@mui/material/Link";
|
|
8
|
+
import { CommonProps, OverridableComponent } from "@mui/material/OverridableComponent";
|
|
9
|
+
import { SvgIconTypeMap } from "@mui/material/SvgIcon";
|
|
10
|
+
import { ListItemButtonProps } from "@mui/material/ListItemButton";
|
|
11
|
+
import { OptionalOnCondition } from "@alextheman/utility";
|
|
12
|
+
import { AlertColor } from "@mui/material/Alert";
|
|
13
|
+
import { TypographyProps } from "@mui/material/Typography";
|
|
14
|
+
import { LiveProvider } from "react-live";
|
|
15
|
+
import { SwitchProps } from "@mui/material/Switch";
|
|
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_runtime1.JSX.Element;
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/components/DarkModeToggle.d.ts
|
|
46
|
+
declare function DarkModeToggle(): react_jsx_runtime1.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_runtime1.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_runtime1.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_runtime1.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_runtime1.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_runtime1.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_runtime1.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_runtime1.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/index.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>({
|
|
199
|
+
declare function useLoader<T, Strict extends boolean = true>({
|
|
200
|
+
strict
|
|
201
|
+
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, LoaderContextValue<T>>;
|
|
138
202
|
/** A provider for a context that deals with state management when fetching data from an API.
|
|
139
203
|
* This may be used over Loader if you require more control over the placement of the error message and data display.
|
|
140
204
|
*/
|
|
141
|
-
declare function LoaderProvider<T>({
|
|
142
|
-
|
|
205
|
+
declare function LoaderProvider<T>({
|
|
206
|
+
children,
|
|
207
|
+
loadingComponent,
|
|
208
|
+
...contextProps
|
|
209
|
+
}: LoaderProviderProps<T>): react_jsx_runtime1.JSX.Element;
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/providers/LoaderProvider/LoaderData.d.ts
|
|
143
212
|
interface LoaderDataBaseProps<T> {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
213
|
+
/** The elements to show after data has been loaded.
|
|
214
|
+
* 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.
|
|
215
|
+
*/
|
|
216
|
+
children: ReactNode | ((data: NonNullable<T>) => ReactNode);
|
|
217
|
+
/** A parser for the data. */
|
|
218
|
+
dataParser?: (data: unknown) => NonNullable<T>;
|
|
219
|
+
/** The component to show when the data is being fetched. */
|
|
220
|
+
loadingComponent?: ReactNode;
|
|
152
221
|
}
|
|
153
222
|
interface LoaderDataPropsOnNullable<T> extends LoaderDataBaseProps<T> {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
223
|
+
onUndefined?: never;
|
|
224
|
+
onNull?: never;
|
|
225
|
+
/** A function to run if the data is undefined or null, and not loading. This may either return React components or nothing.
|
|
226
|
+
* @deprecated Please use the nullableComponent prop on LoaderError instead */
|
|
227
|
+
onNullable: () => ReactNode | void;
|
|
159
228
|
}
|
|
160
229
|
interface LoaderDataPropsOnUndefinedOrNull<T> extends LoaderDataBaseProps<T> {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
230
|
+
/** A function to run if the data is undefined and not loading. This may either return React components or nothing.
|
|
231
|
+
* @deprecated Please use the nullableComponent prop on LoaderError instead */
|
|
232
|
+
onUndefined?: () => ReactNode | void;
|
|
233
|
+
/** A function to run if the data is null and not loading. This may either return React components or nothing.
|
|
234
|
+
* @deprecated Please use the nullableComponent prop on LoaderError instead */
|
|
235
|
+
onNull?: () => ReactNode | void;
|
|
236
|
+
onNullable?: never;
|
|
168
237
|
}
|
|
169
238
|
type LoaderDataProps<T> = LoaderDataPropsOnUndefinedOrNull<T> | LoaderDataPropsOnNullable<T>;
|
|
170
239
|
/** The component responsible for showing the data provided by LoaderProvider. */
|
|
171
|
-
declare function LoaderData<T>({
|
|
172
|
-
|
|
240
|
+
declare function LoaderData<T>({
|
|
241
|
+
children,
|
|
242
|
+
dataParser: loaderDataParser,
|
|
243
|
+
loadingComponent,
|
|
244
|
+
onNullable,
|
|
245
|
+
onUndefined,
|
|
246
|
+
onNull
|
|
247
|
+
}: LoaderDataProps<T>): string | number | bigint | boolean | react_jsx_runtime1.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react0.ReactPortal | react0.ReactElement<unknown, string | react0.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined>;
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/providers/LoaderProvider/LoaderError.d.ts
|
|
173
250
|
interface LoaderErrorBaseProps {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
251
|
+
/**
|
|
252
|
+
* The component to show if an error has been thrown.
|
|
253
|
+
* @deprecated Please pass in the content to show on error as children instead.
|
|
254
|
+
*/
|
|
255
|
+
errorComponent?: ReactNode | ((error: unknown) => ReactNode);
|
|
256
|
+
/** The component to show if an error has been thrown. */
|
|
257
|
+
children?: ReactNode | ((error: unknown) => ReactNode);
|
|
258
|
+
/** Whether you want to log the error to the console or not. */
|
|
259
|
+
logError?: boolean;
|
|
183
260
|
}
|
|
184
261
|
interface LoaderErrorPropsWithUndefinedOrNull extends LoaderErrorBaseProps {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
262
|
+
/** The component to show if no error was thrown but data is undefined */
|
|
263
|
+
undefinedComponent?: ReactNode;
|
|
264
|
+
/** The component to show if no error was thrown but data is null */
|
|
265
|
+
nullComponent?: ReactNode;
|
|
266
|
+
nullableComponent?: never;
|
|
190
267
|
}
|
|
191
268
|
interface LoaderErrorPropsWithNullable extends LoaderErrorBaseProps {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
269
|
+
undefinedComponent?: never;
|
|
270
|
+
nullComponent?: never;
|
|
271
|
+
/** The component to show if no error was thrown but data is undefined or null */
|
|
272
|
+
nullableComponent?: ReactNode;
|
|
196
273
|
}
|
|
197
274
|
type LoaderErrorProps = LoaderErrorPropsWithUndefinedOrNull | LoaderErrorPropsWithNullable;
|
|
198
275
|
/** The component responsible for showing any errors provided by LoaderProvider. */
|
|
199
|
-
declare function LoaderError({
|
|
200
|
-
|
|
276
|
+
declare function LoaderError({
|
|
277
|
+
errorComponent: propsErrorComponent,
|
|
278
|
+
children,
|
|
279
|
+
undefinedComponent,
|
|
280
|
+
nullComponent,
|
|
281
|
+
nullableComponent,
|
|
282
|
+
logError: propsLogError
|
|
283
|
+
}: LoaderErrorProps): string | number | bigint | boolean | react_jsx_runtime1.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react0.ReactPortal | react0.ReactElement<unknown, string | react0.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
284
|
+
//#endregion
|
|
285
|
+
//#region src/providers/ModeProvider.d.ts
|
|
201
286
|
/** @deprecated Please use `PaletteMode` from `@mui/material/styles` instead. */
|
|
202
287
|
type Mode = "light" | "dark";
|
|
203
288
|
interface ModeContextValue {
|
|
204
|
-
|
|
205
|
-
|
|
289
|
+
toggleMode: () => void;
|
|
290
|
+
mode: PaletteMode;
|
|
206
291
|
}
|
|
207
|
-
declare function useMode<Strict extends boolean = true>({
|
|
292
|
+
declare function useMode<Strict extends boolean = true>({
|
|
293
|
+
strict
|
|
294
|
+
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, ModeContextValue>;
|
|
208
295
|
interface ModeProviderProps {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
declare function ModeProvider({
|
|
213
|
-
|
|
296
|
+
children: ReactNode;
|
|
297
|
+
mode?: PaletteMode;
|
|
298
|
+
}
|
|
299
|
+
declare function ModeProvider({
|
|
300
|
+
children,
|
|
301
|
+
mode: modeProp
|
|
302
|
+
}: ModeProviderProps): react_jsx_runtime1.JSX.Element;
|
|
303
|
+
//#endregion
|
|
304
|
+
//#region src/providers/ScreenSizeProvider.d.ts
|
|
214
305
|
interface ScreenSizeProps {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
306
|
+
children: ReactNode;
|
|
307
|
+
largeScreenWidth?: number;
|
|
308
|
+
largeScreenHeight?: number;
|
|
218
309
|
}
|
|
219
310
|
interface ScreenSizeContextValue {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
declare function useScreenSize<Strict extends boolean = true>({
|
|
225
|
-
|
|
226
|
-
|
|
311
|
+
isLargeScreen: boolean;
|
|
312
|
+
windowWidth: number;
|
|
313
|
+
windowHeight: number;
|
|
314
|
+
}
|
|
315
|
+
declare function useScreenSize<Strict extends boolean = true>({
|
|
316
|
+
strict
|
|
317
|
+
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, ScreenSizeContextValue>;
|
|
318
|
+
declare function ScreenSizeProvider({
|
|
319
|
+
children,
|
|
320
|
+
largeScreenWidth,
|
|
321
|
+
largeScreenHeight
|
|
322
|
+
}: ScreenSizeProps): react_jsx_runtime1.JSX.Element;
|
|
323
|
+
//#endregion
|
|
324
|
+
//#region src/providers/SnackbarProvider.d.ts
|
|
227
325
|
interface SnackbarProviderProps {
|
|
228
|
-
|
|
229
|
-
|
|
326
|
+
children: ReactNode;
|
|
327
|
+
autoHideDuration?: number;
|
|
230
328
|
}
|
|
231
329
|
interface SnackbarContextValue {
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
declare function useSnackbar<Strict extends boolean = true>({
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
330
|
+
addSnackbar: (message: string, severity?: AlertColor, duration?: number) => void;
|
|
331
|
+
}
|
|
332
|
+
declare function useSnackbar<Strict extends boolean = true>({
|
|
333
|
+
strict
|
|
334
|
+
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, SnackbarContextValue>;
|
|
335
|
+
declare function SnackbarProvider({
|
|
336
|
+
children,
|
|
337
|
+
autoHideDuration
|
|
338
|
+
}: SnackbarProviderProps): react_jsx_runtime1.JSX.Element;
|
|
339
|
+
//#endregion
|
|
340
|
+
//#region src/components/Loader.d.ts
|
|
341
|
+
type LoaderProps<T> = Omit<LoaderProviderProps<T>, "children"> & Omit<LoaderErrorProps, "errorComponent" | "children"> & Omit<LoaderDataProps<T>, "showOnError" | "onUndefined" | "onNull" | "onNullable">;
|
|
238
342
|
/** An in-line component that deals with state management when fetching data from an API.
|
|
239
343
|
* 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
344
|
*/
|
|
241
|
-
declare function Loader<T>({
|
|
242
|
-
|
|
345
|
+
declare function Loader<T>({
|
|
346
|
+
children,
|
|
347
|
+
errorComponent,
|
|
348
|
+
undefinedComponent,
|
|
349
|
+
nullComponent,
|
|
350
|
+
nullableComponent,
|
|
351
|
+
loadingComponent,
|
|
352
|
+
...loaderProviderProps
|
|
353
|
+
}: LoaderProps<T>): react_jsx_runtime1.JSX.Element;
|
|
354
|
+
//#endregion
|
|
355
|
+
//#region src/components/NavigationBottom.d.ts
|
|
243
356
|
interface NavItemBottom {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
357
|
+
value: string;
|
|
358
|
+
label: string;
|
|
359
|
+
icon?: JSX.Element;
|
|
360
|
+
to: string;
|
|
248
361
|
}
|
|
249
362
|
interface NavigationBottomProps {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}
|
|
253
|
-
declare function NavigationBottom({
|
|
254
|
-
|
|
363
|
+
children: ReactNode;
|
|
364
|
+
navItems: NavItemBottom[];
|
|
365
|
+
}
|
|
366
|
+
declare function NavigationBottom({
|
|
367
|
+
children,
|
|
368
|
+
navItems
|
|
369
|
+
}: NavigationBottomProps): react_jsx_runtime1.JSX.Element;
|
|
370
|
+
//#endregion
|
|
371
|
+
//#region src/components/NavigationDrawer.d.ts
|
|
255
372
|
interface NavMenuItem {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
373
|
+
category: string;
|
|
374
|
+
options: {
|
|
375
|
+
label: string;
|
|
376
|
+
to: string;
|
|
377
|
+
icon?: ReactNode;
|
|
378
|
+
}[];
|
|
262
379
|
}
|
|
263
380
|
interface NavigationDrawerProps {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}
|
|
269
|
-
declare function NavigationDrawer({
|
|
270
|
-
|
|
381
|
+
title: string;
|
|
382
|
+
navItems: NavMenuItem[];
|
|
383
|
+
headerElements?: ReactNode;
|
|
384
|
+
children: ReactNode;
|
|
385
|
+
}
|
|
386
|
+
declare function NavigationDrawer({
|
|
387
|
+
title,
|
|
388
|
+
navItems,
|
|
389
|
+
children,
|
|
390
|
+
headerElements
|
|
391
|
+
}: NavigationDrawerProps): react_jsx_runtime1.JSX.Element;
|
|
392
|
+
//#endregion
|
|
393
|
+
//#region src/components/PopoverText.d.ts
|
|
271
394
|
interface PopoverTextProps extends TypographyProps {
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
declare function PopoverText({
|
|
275
|
-
|
|
395
|
+
text: string;
|
|
396
|
+
}
|
|
397
|
+
declare function PopoverText({
|
|
398
|
+
text,
|
|
399
|
+
sx,
|
|
400
|
+
...typographyProps
|
|
401
|
+
}: PopoverTextProps): react_jsx_runtime1.JSX.Element;
|
|
402
|
+
//#endregion
|
|
403
|
+
//#region src/components/ReactPlayground.d.ts
|
|
276
404
|
interface ReactPlaygroundProps extends ComponentProps<typeof LiveProvider> {
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
declare function ReactPlayground({
|
|
280
|
-
|
|
405
|
+
previewStyles?: SxProps<Theme>;
|
|
406
|
+
}
|
|
407
|
+
declare function ReactPlayground({
|
|
408
|
+
code,
|
|
409
|
+
previewStyles,
|
|
410
|
+
...liveProviderProps
|
|
411
|
+
}: ReactPlaygroundProps): react_jsx_runtime1.JSX.Element;
|
|
412
|
+
//#endregion
|
|
413
|
+
//#region src/components/SkeletonRow.d.ts
|
|
281
414
|
interface SkeletonRowProps {
|
|
282
|
-
|
|
415
|
+
columns: number;
|
|
283
416
|
}
|
|
284
|
-
declare function SkeletonRow({
|
|
285
|
-
|
|
417
|
+
declare function SkeletonRow({
|
|
418
|
+
columns
|
|
419
|
+
}: SkeletonRowProps): react_jsx_runtime1.JSX.Element;
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region src/components/SubmitButton.d.ts
|
|
286
422
|
interface SubmitButtonProps extends Omit<ButtonProps, "type"> {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
declare function SubmitButton({
|
|
291
|
-
|
|
423
|
+
disableClean?: boolean;
|
|
424
|
+
label: string;
|
|
425
|
+
}
|
|
426
|
+
declare function SubmitButton({
|
|
427
|
+
disableClean,
|
|
428
|
+
label,
|
|
429
|
+
...buttonProps
|
|
430
|
+
}: SubmitButtonProps): react_jsx_runtime1.JSX.Element;
|
|
431
|
+
//#endregion
|
|
432
|
+
//#region src/components/SwitchWithIcons.d.ts
|
|
292
433
|
interface SwitchWithIconsProps extends Omit<SwitchProps, "icon" | "checkedIcon"> {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
declare function SwitchWithIcons({
|
|
303
|
-
|
|
434
|
+
checkedIcon: ComponentType<{
|
|
435
|
+
style?: CSSProperties;
|
|
436
|
+
}>;
|
|
437
|
+
checkedIconStyles?: CommonProps["style"];
|
|
438
|
+
uncheckedIcon: ComponentType<{
|
|
439
|
+
style?: CSSProperties;
|
|
440
|
+
}>;
|
|
441
|
+
uncheckedIconStyles?: CommonProps["style"];
|
|
442
|
+
}
|
|
443
|
+
declare function SwitchWithIcons({
|
|
444
|
+
checkedIcon: CheckedIcon,
|
|
445
|
+
checkedIconStyles,
|
|
446
|
+
uncheckedIcon: UncheckedIcon,
|
|
447
|
+
uncheckedIconStyles,
|
|
448
|
+
...switchProps
|
|
449
|
+
}: SwitchWithIconsProps): react_jsx_runtime1.JSX.Element;
|
|
450
|
+
//#endregion
|
|
451
|
+
//#region src/hooks/useHash.d.ts
|
|
304
452
|
declare function useHash<S extends string>(initialHash: S | undefined): [S, Dispatch<SetStateAction<S>>];
|
|
305
|
-
|
|
306
|
-
export { CollapsableItem, type CollapsableItemProps,
|
|
453
|
+
//#endregion
|
|
454
|
+
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, type LoaderContextValue, LoaderData, type LoaderDataBaseProps, type LoaderDataProps, type LoaderDataPropsOnNullable, type LoaderDataPropsOnUndefinedOrNull, LoaderError, type LoaderErrorBaseProps, type LoaderErrorProps, type LoaderErrorPropsWithNullable, type LoaderErrorPropsWithUndefinedOrNull, type LoaderProps, LoaderProvider, type LoaderProviderBaseProps, type LoaderProviderProps, type LoaderProviderPropsWithError, type LoaderProviderPropsWithNoError, type Mode, 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, useLoader, useMode, useScreenSize, useSnackbar };
|
|
455
|
+
//# sourceMappingURL=index.d.cts.map
|