@goralys/ui 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +495 -0
- package/dist/index.js +3514 -0
- package/package.json +59 -5
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
import React, { ComponentType, ReactNode, ReactElement, RefCallback, RefObject, InputEventHandler, ChangeEventHandler, SVGProps } from 'react';
|
|
2
|
+
import { User, AuditAction, AuthToken, SubjectStatus, Subject, ConfirmOptions, DraftModalResult, SupportTicket, Toast } from '@goralys/core';
|
|
3
|
+
|
|
4
|
+
type GoralysLink = ComponentType<{
|
|
5
|
+
href: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}>;
|
|
9
|
+
type GoralysImage = ComponentType<{
|
|
10
|
+
src: string;
|
|
11
|
+
alt: string;
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
14
|
+
className?: string;
|
|
15
|
+
loading?: "lazy" | "eager";
|
|
16
|
+
priority?: boolean;
|
|
17
|
+
}>;
|
|
18
|
+
type GoralysRouter = {
|
|
19
|
+
push: (href: string) => void;
|
|
20
|
+
replace: (href: string) => void;
|
|
21
|
+
back: () => void;
|
|
22
|
+
refresh: () => void;
|
|
23
|
+
};
|
|
24
|
+
type GoralysSearchParams = {
|
|
25
|
+
get: (name: string) => string | null;
|
|
26
|
+
has: (name: string) => boolean;
|
|
27
|
+
toString: () => string;
|
|
28
|
+
};
|
|
29
|
+
type GoralysUIConfig = {
|
|
30
|
+
Link: GoralysLink;
|
|
31
|
+
Image: GoralysImage;
|
|
32
|
+
useRouter: () => GoralysRouter;
|
|
33
|
+
useSearchParams: () => GoralysSearchParams;
|
|
34
|
+
usePathname: () => string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
interface Props$I {
|
|
38
|
+
config: GoralysUIConfig;
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
}
|
|
41
|
+
declare function GoralysUIProvider({ config, children }: Props$I): ReactElement;
|
|
42
|
+
declare function useGoralysUI(): GoralysUIConfig;
|
|
43
|
+
|
|
44
|
+
declare function useMediaQuery(query: string): boolean;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* A hook that provides a callback ref to auto-resize a textarea based on its content.
|
|
48
|
+
* It also handles ref forwarding (both RefObject and RefCallback).
|
|
49
|
+
*
|
|
50
|
+
* @param ref The external ref to forward to.
|
|
51
|
+
* @returns A RefCallback to be passed to the textarea's ref prop.
|
|
52
|
+
*/
|
|
53
|
+
declare function useAutoResize(ref: React.Ref<HTMLTextAreaElement> | undefined): RefCallback<HTMLTextAreaElement>;
|
|
54
|
+
|
|
55
|
+
declare function useModalClose(modalRef: RefObject<HTMLDivElement | null>, visible: boolean, onClose: () => void): void;
|
|
56
|
+
|
|
57
|
+
interface Props$H {
|
|
58
|
+
className?: string;
|
|
59
|
+
text: string;
|
|
60
|
+
type: "submit" | "button" | "reset";
|
|
61
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
62
|
+
color?: "sky" | "red" | "green" | "amber";
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
}
|
|
65
|
+
declare function Button({ text, type, className, onClick, color, disabled }: Props$H): ReactElement;
|
|
66
|
+
|
|
67
|
+
interface Props$G {
|
|
68
|
+
title: string;
|
|
69
|
+
}
|
|
70
|
+
declare function CardTitle({ title }: Props$G): ReactElement;
|
|
71
|
+
|
|
72
|
+
declare function Card({ children, className }: {
|
|
73
|
+
children: ReactNode;
|
|
74
|
+
className?: string;
|
|
75
|
+
}): ReactElement;
|
|
76
|
+
|
|
77
|
+
interface Props$F {
|
|
78
|
+
admin: User;
|
|
79
|
+
}
|
|
80
|
+
declare function AdminCard({ admin }: Props$F): ReactElement;
|
|
81
|
+
|
|
82
|
+
interface Props$E {
|
|
83
|
+
type: "real" | "virtual";
|
|
84
|
+
admins: User[] | null;
|
|
85
|
+
setCurrentAdminsAction: React.Dispatch<React.SetStateAction<User[] | null>>;
|
|
86
|
+
}
|
|
87
|
+
declare function AdminsSearchBar({ type, admins, setCurrentAdminsAction }: Props$E): ReactElement;
|
|
88
|
+
|
|
89
|
+
interface Props$D {
|
|
90
|
+
actions: AuditAction[] | null;
|
|
91
|
+
}
|
|
92
|
+
declare function AuditActionCard({ actions }: Props$D): ReactElement;
|
|
93
|
+
|
|
94
|
+
interface Props$C {
|
|
95
|
+
publicId: string;
|
|
96
|
+
token: AuthToken;
|
|
97
|
+
onUpdate: () => Promise<void>;
|
|
98
|
+
}
|
|
99
|
+
declare function AuthTokenCard({ publicId, token, onUpdate }: Props$C): ReactElement;
|
|
100
|
+
|
|
101
|
+
interface Props$B {
|
|
102
|
+
onUpdateAction: () => void;
|
|
103
|
+
syncKey: string;
|
|
104
|
+
virtualSyncKey: string;
|
|
105
|
+
}
|
|
106
|
+
declare function CreateAdminElement({ onUpdateAction, syncKey, virtualSyncKey }: Props$B): ReactElement;
|
|
107
|
+
|
|
108
|
+
interface Props$A {
|
|
109
|
+
onReplaceAction: (firstName: string, lastName: string) => void;
|
|
110
|
+
dropDown?: boolean;
|
|
111
|
+
}
|
|
112
|
+
declare function ReplaceTeacherElement({ onReplaceAction, dropDown }: Props$A): ReactElement;
|
|
113
|
+
|
|
114
|
+
interface Props$z {
|
|
115
|
+
user: User;
|
|
116
|
+
}
|
|
117
|
+
declare function UserCard({ user }: Props$z): ReactElement;
|
|
118
|
+
|
|
119
|
+
interface Props$y {
|
|
120
|
+
type: "real" | "virtual";
|
|
121
|
+
users: User[] | null;
|
|
122
|
+
setCurrentUsers: React.Dispatch<React.SetStateAction<User[] | null>>;
|
|
123
|
+
}
|
|
124
|
+
declare function UsersSearchBar({ type, users, setCurrentUsers }: Props$y): ReactElement;
|
|
125
|
+
|
|
126
|
+
interface Props$x {
|
|
127
|
+
total: number;
|
|
128
|
+
submitted: number;
|
|
129
|
+
approved: number;
|
|
130
|
+
rejected: number;
|
|
131
|
+
notSubmitted: number;
|
|
132
|
+
}
|
|
133
|
+
declare function StatusLegend({ total, submitted, approved, rejected, notSubmitted }: Props$x): ReactElement;
|
|
134
|
+
|
|
135
|
+
interface Props$w {
|
|
136
|
+
status: SubjectStatus | "empty";
|
|
137
|
+
size?: number;
|
|
138
|
+
}
|
|
139
|
+
declare function SubjectStudentsDonut({ status, size }: Props$w): ReactElement;
|
|
140
|
+
|
|
141
|
+
interface Props$v {
|
|
142
|
+
size?: number;
|
|
143
|
+
total: number;
|
|
144
|
+
notSubmitted: number;
|
|
145
|
+
submitted: number;
|
|
146
|
+
rejected: number;
|
|
147
|
+
approved: number;
|
|
148
|
+
}
|
|
149
|
+
declare function SubjectTeachersDonut({ size, total, notSubmitted, submitted, rejected, approved }: Props$v): ReactElement;
|
|
150
|
+
|
|
151
|
+
interface Props$u {
|
|
152
|
+
subjects: Subject[] | null;
|
|
153
|
+
}
|
|
154
|
+
declare function UserSubjectsStudentCard({ subjects }: Props$u): ReactElement;
|
|
155
|
+
|
|
156
|
+
interface Props$t {
|
|
157
|
+
subjects: Subject[] | null;
|
|
158
|
+
}
|
|
159
|
+
declare function UserSubjectsTeacherCard({ subjects }: Props$t): ReactElement;
|
|
160
|
+
|
|
161
|
+
declare function CookieBanner(): ReactElement | null;
|
|
162
|
+
|
|
163
|
+
interface Props$s {
|
|
164
|
+
label: string | ReactNode;
|
|
165
|
+
children?: ReactNode;
|
|
166
|
+
openDefault?: boolean;
|
|
167
|
+
}
|
|
168
|
+
declare function Dropdown({ label, children, openDefault }: Props$s): ReactElement;
|
|
169
|
+
|
|
170
|
+
declare function GoralysLogoLoader(): ReactElement;
|
|
171
|
+
|
|
172
|
+
interface Props$r {
|
|
173
|
+
id?: string;
|
|
174
|
+
label: string;
|
|
175
|
+
setValueAction: (v: boolean) => void;
|
|
176
|
+
defaultValue: boolean;
|
|
177
|
+
className?: string | null;
|
|
178
|
+
disabled?: boolean;
|
|
179
|
+
}
|
|
180
|
+
declare function Checkbox({ id, label, setValueAction, defaultValue, className, disabled }: Props$r): ReactElement;
|
|
181
|
+
|
|
182
|
+
interface Props$q {
|
|
183
|
+
autocomplete?: string;
|
|
184
|
+
disabled?: boolean;
|
|
185
|
+
helper?: string;
|
|
186
|
+
id: string;
|
|
187
|
+
label: string;
|
|
188
|
+
password?: boolean;
|
|
189
|
+
email?: boolean;
|
|
190
|
+
required?: boolean;
|
|
191
|
+
defaultValue?: string;
|
|
192
|
+
value?: string;
|
|
193
|
+
onInput?: InputEventHandler<HTMLInputElement>;
|
|
194
|
+
}
|
|
195
|
+
declare function FloatingInput({ id, label, helper, autocomplete, password, email, disabled, required, defaultValue, value, onInput, }: Props$q): ReactElement;
|
|
196
|
+
|
|
197
|
+
interface Props$p {
|
|
198
|
+
text: string;
|
|
199
|
+
maxSizeKB: number;
|
|
200
|
+
onFileSelected: CallableFunction;
|
|
201
|
+
}
|
|
202
|
+
declare function InputTextFile({ text, maxSizeKB, onFileSelected }: Props$p): ReactElement;
|
|
203
|
+
|
|
204
|
+
interface Props$o {
|
|
205
|
+
text: string;
|
|
206
|
+
onFileSelected: CallableFunction;
|
|
207
|
+
}
|
|
208
|
+
declare function InputZipFile({ text, onFileSelected }: Props$o): ReactElement;
|
|
209
|
+
|
|
210
|
+
interface Props$n {
|
|
211
|
+
helper?: string;
|
|
212
|
+
id: string;
|
|
213
|
+
label: string;
|
|
214
|
+
onChangeAction?: ChangeEventHandler<HTMLTextAreaElement>;
|
|
215
|
+
setIsInterdisciplinaryAction?: (v: boolean) => void;
|
|
216
|
+
subjectData: Subject;
|
|
217
|
+
}
|
|
218
|
+
declare function SubjectInputAdmin({ id, label, helper, subjectData, onChangeAction }: Props$n): ReactElement;
|
|
219
|
+
|
|
220
|
+
interface Props$m {
|
|
221
|
+
helper?: string;
|
|
222
|
+
id: string;
|
|
223
|
+
label: string;
|
|
224
|
+
onChangeAction?: ChangeEventHandler<HTMLTextAreaElement>;
|
|
225
|
+
setIsInterdisciplinaryAction?: (v: boolean) => void;
|
|
226
|
+
subjectData: Subject;
|
|
227
|
+
}
|
|
228
|
+
declare function SubjectInputStudent({ id, label, helper, subjectData, setIsInterdisciplinaryAction, onChangeAction, }: Props$m): ReactElement;
|
|
229
|
+
|
|
230
|
+
interface Props$l {
|
|
231
|
+
helper?: string;
|
|
232
|
+
id: string;
|
|
233
|
+
label: string;
|
|
234
|
+
onChangeAction?: ChangeEventHandler<HTMLTextAreaElement>;
|
|
235
|
+
setIsInterdisciplinaryAction?: (v: boolean) => void;
|
|
236
|
+
subjectData: Subject;
|
|
237
|
+
}
|
|
238
|
+
declare function SubjectInputTeacher({ id, label, helper, subjectData, onChangeAction }: Props$l): ReactElement;
|
|
239
|
+
|
|
240
|
+
interface Props$k {
|
|
241
|
+
defaultValue?: string;
|
|
242
|
+
disabled?: boolean;
|
|
243
|
+
ref?: RefObject<HTMLTextAreaElement | null>;
|
|
244
|
+
helper?: string;
|
|
245
|
+
id: string;
|
|
246
|
+
label: string;
|
|
247
|
+
maxLength?: number;
|
|
248
|
+
onChangeAction?: ChangeEventHandler<HTMLTextAreaElement>;
|
|
249
|
+
subjectData: Subject;
|
|
250
|
+
animate: boolean;
|
|
251
|
+
}
|
|
252
|
+
declare function SubjectTextArea({ id, label, helper, disabled, ref, defaultValue, maxLength, onChangeAction, subjectData, animate, }: Props$k): ReactElement;
|
|
253
|
+
|
|
254
|
+
interface Props$j {
|
|
255
|
+
defaultValue?: string;
|
|
256
|
+
disabled?: boolean;
|
|
257
|
+
ref?: RefObject<HTMLTextAreaElement | null>;
|
|
258
|
+
helper?: string;
|
|
259
|
+
id: string;
|
|
260
|
+
label: string;
|
|
261
|
+
onChangeAction?: ChangeEventHandler<HTMLTextAreaElement>;
|
|
262
|
+
required?: boolean;
|
|
263
|
+
maxLength?: number;
|
|
264
|
+
}
|
|
265
|
+
declare function TextArea({ id, label, helper, required, disabled, ref, defaultValue, onChangeAction, maxLength, }: Props$j): ReactElement;
|
|
266
|
+
|
|
267
|
+
declare function Providers({ children }: {
|
|
268
|
+
children: React.ReactNode;
|
|
269
|
+
}): ReactElement;
|
|
270
|
+
|
|
271
|
+
interface Props$i {
|
|
272
|
+
title: string;
|
|
273
|
+
message: string;
|
|
274
|
+
visible: boolean;
|
|
275
|
+
onConfirmAction: () => void;
|
|
276
|
+
onCancelAction: () => void;
|
|
277
|
+
}
|
|
278
|
+
declare function ConfirmElement({ title, message, visible, onConfirmAction, onCancelAction }: Props$i): ReactElement;
|
|
279
|
+
|
|
280
|
+
type ConfirmContext = {
|
|
281
|
+
showConfirm: (options: ConfirmOptions) => Promise<boolean>;
|
|
282
|
+
};
|
|
283
|
+
declare function ConfirmProvider({ children }: {
|
|
284
|
+
children: ReactNode;
|
|
285
|
+
}): ReactElement;
|
|
286
|
+
declare function useConfirm(): ConfirmContext;
|
|
287
|
+
|
|
288
|
+
interface Props$h {
|
|
289
|
+
visible: boolean;
|
|
290
|
+
onCancelAction: () => void;
|
|
291
|
+
onChooseDraftAction: (file: File | null) => void;
|
|
292
|
+
onCloseModalAction: () => void;
|
|
293
|
+
}
|
|
294
|
+
declare function DraftModalElement({ visible, onChooseDraftAction, onCancelAction, onCloseModalAction }: Props$h): ReactElement;
|
|
295
|
+
|
|
296
|
+
type DraftModalContext = {
|
|
297
|
+
showDraftModal: () => Promise<DraftModalResult>;
|
|
298
|
+
};
|
|
299
|
+
declare function DraftModalProvider({ children }: {
|
|
300
|
+
children: ReactNode;
|
|
301
|
+
}): ReactElement;
|
|
302
|
+
declare function useDraftModal(): DraftModalContext;
|
|
303
|
+
|
|
304
|
+
interface Props$g {
|
|
305
|
+
visible: boolean;
|
|
306
|
+
onConfirmAction: (email: string) => void;
|
|
307
|
+
onCancelAction: () => void;
|
|
308
|
+
onCloseModalAction: () => void;
|
|
309
|
+
message: string;
|
|
310
|
+
}
|
|
311
|
+
declare function EmailModalElement({ visible, onConfirmAction, onCancelAction, onCloseModalAction, message }: Props$g): ReactElement;
|
|
312
|
+
|
|
313
|
+
type EmailModalContext = {
|
|
314
|
+
showEmailModal: (message?: string) => Promise<string | null>;
|
|
315
|
+
};
|
|
316
|
+
declare function EmailModalProvider({ children }: {
|
|
317
|
+
children: ReactNode;
|
|
318
|
+
}): ReactElement;
|
|
319
|
+
declare function useEmailModal(): EmailModalContext;
|
|
320
|
+
|
|
321
|
+
interface Props$f {
|
|
322
|
+
visible: boolean;
|
|
323
|
+
onCancelAction: () => void;
|
|
324
|
+
onImportTopicsAction: (file: File | null) => void;
|
|
325
|
+
onCloseModalAction: () => void;
|
|
326
|
+
}
|
|
327
|
+
declare function ImportTopicsModalElement({ visible, onImportTopicsAction, onCancelAction, onCloseModalAction }: Props$f): ReactElement;
|
|
328
|
+
|
|
329
|
+
type ImportTopicsModalContext = {
|
|
330
|
+
showImportTopicsModal: () => Promise<File | string | null>;
|
|
331
|
+
};
|
|
332
|
+
declare function ImportTopicsModalProvider({ children }: {
|
|
333
|
+
children: ReactNode;
|
|
334
|
+
}): ReactElement;
|
|
335
|
+
declare function useImportTopicsModal(): ImportTopicsModalContext;
|
|
336
|
+
|
|
337
|
+
interface Props$e {
|
|
338
|
+
visible: boolean;
|
|
339
|
+
onConfirmAction: (password: string) => void;
|
|
340
|
+
onCancelAction: () => void;
|
|
341
|
+
onCloseModalAction: () => void;
|
|
342
|
+
message: string;
|
|
343
|
+
}
|
|
344
|
+
declare function PasswordModalElement({ visible, onConfirmAction, onCancelAction, onCloseModalAction, message }: Props$e): ReactElement;
|
|
345
|
+
|
|
346
|
+
type PasswordModalContext = {
|
|
347
|
+
showPasswordModal: (confirm?: string) => Promise<string | null>;
|
|
348
|
+
};
|
|
349
|
+
declare function PasswordModalProvider({ children }: {
|
|
350
|
+
children: ReactNode;
|
|
351
|
+
}): ReactElement;
|
|
352
|
+
declare function usePasswordModal(): PasswordModalContext;
|
|
353
|
+
|
|
354
|
+
declare function DynamicNav(): ReactElement;
|
|
355
|
+
|
|
356
|
+
declare function NavLink({ name, url, exact }: {
|
|
357
|
+
name: string;
|
|
358
|
+
url: string;
|
|
359
|
+
exact?: boolean;
|
|
360
|
+
}): ReactElement;
|
|
361
|
+
|
|
362
|
+
declare function SideNav(): ReactElement;
|
|
363
|
+
|
|
364
|
+
declare function UserNav(): ReactElement;
|
|
365
|
+
|
|
366
|
+
type Props$d = {
|
|
367
|
+
name: string;
|
|
368
|
+
url: string;
|
|
369
|
+
icon: ComponentType<SVGProps<SVGSVGElement>>;
|
|
370
|
+
exact?: boolean;
|
|
371
|
+
};
|
|
372
|
+
declare function TapBarLink({ name, url, icon: Icon, exact }: Props$d): ReactElement;
|
|
373
|
+
|
|
374
|
+
declare function TapBarUser(): ReactElement;
|
|
375
|
+
|
|
376
|
+
declare function TapBar(): ReactElement;
|
|
377
|
+
|
|
378
|
+
declare function ButtonSkeleton({ className }: {
|
|
379
|
+
className?: string;
|
|
380
|
+
}): ReactElement;
|
|
381
|
+
|
|
382
|
+
declare function AdminPanelCardSkeleton(): ReactElement;
|
|
383
|
+
|
|
384
|
+
declare function AuditActionCardSkeleton(): ReactElement;
|
|
385
|
+
|
|
386
|
+
declare function UserCardSkeleton(): ReactElement;
|
|
387
|
+
|
|
388
|
+
declare function UserSubjectsTeacherCardSkeleton(): ReactElement;
|
|
389
|
+
|
|
390
|
+
declare function UserSubjectsStudentCardSkeleton(): ReactElement;
|
|
391
|
+
|
|
392
|
+
interface Props$c {
|
|
393
|
+
showMeta?: boolean;
|
|
394
|
+
}
|
|
395
|
+
declare function SubjectInputSkeleton({ showMeta }: Props$c): ReactElement;
|
|
396
|
+
|
|
397
|
+
declare function AdminSubjectCardSkeleton(): ReactElement;
|
|
398
|
+
|
|
399
|
+
declare function CommentSkeleton(): ReactElement;
|
|
400
|
+
|
|
401
|
+
interface Props$b {
|
|
402
|
+
showButtons?: boolean;
|
|
403
|
+
}
|
|
404
|
+
declare function StudentCardSkeleton({ showButtons }: Props$b): ReactElement;
|
|
405
|
+
|
|
406
|
+
interface Props$a {
|
|
407
|
+
showButtons?: boolean;
|
|
408
|
+
}
|
|
409
|
+
declare function TeacherCardSkeleton({ showButtons }: Props$a): ReactElement;
|
|
410
|
+
|
|
411
|
+
declare function SupportTicketCardSkeleton(): ReactElement;
|
|
412
|
+
|
|
413
|
+
interface Props$9 {
|
|
414
|
+
subjectData: Subject;
|
|
415
|
+
onUpdateAction: () => void;
|
|
416
|
+
syncKey: string;
|
|
417
|
+
}
|
|
418
|
+
declare function AdminSubjectsCard({ subjectData, onUpdateAction, syncKey }: Props$9): ReactElement;
|
|
419
|
+
|
|
420
|
+
interface Props$8 {
|
|
421
|
+
subjectData: Subject;
|
|
422
|
+
disabled: boolean;
|
|
423
|
+
onChange?: ChangeEventHandler<HTMLTextAreaElement>;
|
|
424
|
+
}
|
|
425
|
+
declare function CommentStudent({ subjectData, disabled, onChange }: Props$8): ReactElement;
|
|
426
|
+
|
|
427
|
+
interface Props$7 {
|
|
428
|
+
subjectData: Subject;
|
|
429
|
+
disabled: boolean;
|
|
430
|
+
ref?: RefObject<HTMLTextAreaElement | null>;
|
|
431
|
+
onChange?: ChangeEventHandler<HTMLTextAreaElement>;
|
|
432
|
+
}
|
|
433
|
+
declare function CommentTeacher({ subjectData, disabled, ref, onChange }: Props$7): ReactElement;
|
|
434
|
+
|
|
435
|
+
interface Props$6 {
|
|
436
|
+
subjectData: Subject;
|
|
437
|
+
}
|
|
438
|
+
declare function ReadonlyCard({ subjectData }: Props$6): ReactElement;
|
|
439
|
+
|
|
440
|
+
interface Props$5 {
|
|
441
|
+
subjectData: Subject;
|
|
442
|
+
onUpdateAction: () => void;
|
|
443
|
+
}
|
|
444
|
+
declare function StudentCard({ subjectData, onUpdateAction }: Props$5): ReactElement;
|
|
445
|
+
|
|
446
|
+
interface Props$4 {
|
|
447
|
+
subjects: Subject[];
|
|
448
|
+
setCurrentSubjects: (s: Subject[]) => void;
|
|
449
|
+
defaults?: Record<SubjectStatus, boolean>;
|
|
450
|
+
}
|
|
451
|
+
declare function SubjectsFilter({ subjects, setCurrentSubjects, defaults }: Props$4): ReactElement;
|
|
452
|
+
|
|
453
|
+
interface Props$3 {
|
|
454
|
+
subjects: Subject[] | null;
|
|
455
|
+
setCurrentSubjects: React.Dispatch<React.SetStateAction<Subject[] | null>>;
|
|
456
|
+
}
|
|
457
|
+
declare function SubjectsSearchBar({ subjects, setCurrentSubjects }: Props$3): ReactElement;
|
|
458
|
+
|
|
459
|
+
interface Props$2 {
|
|
460
|
+
subjectData: Subject;
|
|
461
|
+
onUpdateAction: () => void;
|
|
462
|
+
}
|
|
463
|
+
declare function TeacherCard({ subjectData, onUpdateAction }: Props$2): ReactElement;
|
|
464
|
+
|
|
465
|
+
declare function SupportForm(): ReactElement;
|
|
466
|
+
|
|
467
|
+
interface Props$1 {
|
|
468
|
+
ticket: SupportTicket;
|
|
469
|
+
}
|
|
470
|
+
declare function SupportTicketCard({ ticket }: Props$1): ReactElement;
|
|
471
|
+
|
|
472
|
+
declare function FlashToastListener(): null;
|
|
473
|
+
|
|
474
|
+
interface Props {
|
|
475
|
+
type: "info" | "warning" | "error" | "success";
|
|
476
|
+
title: string;
|
|
477
|
+
message: string;
|
|
478
|
+
visible: boolean;
|
|
479
|
+
}
|
|
480
|
+
declare function ToastElement({ type, title, message, visible }: Props): ReactElement;
|
|
481
|
+
|
|
482
|
+
type ToastContext = {
|
|
483
|
+
showToast: (toast: Toast, animate?: boolean, duration?: number) => void;
|
|
484
|
+
cacheToast: (toast: Toast, duration?: number) => void;
|
|
485
|
+
};
|
|
486
|
+
declare function ToastProvider({ children }: {
|
|
487
|
+
children: ReactNode;
|
|
488
|
+
}): ReactElement;
|
|
489
|
+
declare function useToast(): ToastContext;
|
|
490
|
+
|
|
491
|
+
declare function LoginForm(): ReactElement;
|
|
492
|
+
|
|
493
|
+
declare function RegisterForm(): ReactElement;
|
|
494
|
+
|
|
495
|
+
export { AdminCard, AdminPanelCardSkeleton, AdminSubjectCardSkeleton, AdminSubjectsCard, AdminsSearchBar, AuditActionCard, AuditActionCardSkeleton, AuthTokenCard, Button, ButtonSkeleton, Card, CardTitle, Checkbox, CommentSkeleton, CommentStudent, CommentTeacher, type ConfirmContext, ConfirmElement, ConfirmProvider, CookieBanner, CreateAdminElement, type DraftModalContext, DraftModalElement, DraftModalProvider, Dropdown, DynamicNav, type EmailModalContext, EmailModalElement, EmailModalProvider, FlashToastListener, FloatingInput, type GoralysImage, type GoralysLink, GoralysLogoLoader, type GoralysRouter, type GoralysSearchParams, type GoralysUIConfig, GoralysUIProvider, type ImportTopicsModalContext, ImportTopicsModalElement, ImportTopicsModalProvider, InputTextFile, InputZipFile, LoginForm, NavLink, type PasswordModalContext, PasswordModalElement, PasswordModalProvider, Providers, ReadonlyCard, RegisterForm, ReplaceTeacherElement, SideNav, StatusLegend, StudentCard, StudentCardSkeleton, SubjectInputAdmin, SubjectInputSkeleton, SubjectInputStudent, SubjectInputTeacher, SubjectStudentsDonut, SubjectTeachersDonut, SubjectTextArea, SubjectsFilter, SubjectsSearchBar, SupportForm, SupportTicketCard, SupportTicketCardSkeleton, TapBar, TapBarLink, TapBarUser, TeacherCard, TeacherCardSkeleton, TextArea, type ToastContext, ToastElement, ToastProvider, UserCard, UserCardSkeleton, UserNav, UserSubjectsStudentCard, UserSubjectsStudentCardSkeleton, UserSubjectsTeacherCard, UserSubjectsTeacherCardSkeleton, UsersSearchBar, useAutoResize, useConfirm, useDraftModal, useEmailModal, useGoralysUI, useImportTopicsModal, useMediaQuery, useModalClose, usePasswordModal, useToast };
|