evelearn-theme 1.0.6 → 2.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.d.mts +37 -275
- package/dist/index.d.ts +37 -275
- package/dist/index.js +81 -1406
- package/dist/index.mjs +79 -1384
- package/package.json +11 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,146 +1,24 @@
|
|
|
1
|
+
import React, { CSSProperties, ReactNode } from 'react';
|
|
1
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { CSSProperties, ReactNode } from 'react';
|
|
4
|
-
import { Placement } from '@floating-ui/react';
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
visible: boolean;
|
|
8
|
-
onClick: () => void;
|
|
9
|
-
opacity?: number;
|
|
10
|
-
};
|
|
11
|
-
declare const Backdrop: ({ visible, onClick, opacity }: Props$h) => react_jsx_runtime.JSX.Element | null;
|
|
12
|
-
|
|
13
|
-
interface BaseModalProps {
|
|
14
|
-
visible: boolean;
|
|
15
|
-
children: React__default.ReactNode;
|
|
16
|
-
appear?: boolean;
|
|
17
|
-
dismissable?: boolean;
|
|
18
|
-
dismissOnBackdropClick?: boolean;
|
|
19
|
-
onDismissed?: () => void;
|
|
20
|
-
style?: CSSProperties;
|
|
21
|
-
fullscreen?: boolean;
|
|
22
|
-
dismissLink?: string;
|
|
23
|
-
bgOpacity?: number;
|
|
24
|
-
displayDark?: boolean;
|
|
25
|
-
}
|
|
26
|
-
type ModalProps = BaseModalProps;
|
|
27
|
-
declare const Modal: ({ visible, children, fullscreen, displayDark, dismissLink, bgOpacity, onDismissed, dismissable, dismissOnBackdropClick, style, ...props }: ModalProps) => react_jsx_runtime.JSX.Element | null;
|
|
28
|
-
|
|
29
|
-
type OverlayProps = BaseModalProps & {
|
|
30
|
-
children?: React__default.ReactNode;
|
|
31
|
-
withContainer?: boolean;
|
|
32
|
-
opacity?: number;
|
|
33
|
-
isDark?: boolean;
|
|
34
|
-
zIndex?: number;
|
|
35
|
-
onClick?: () => void;
|
|
36
|
-
};
|
|
37
|
-
declare const Overlay: ({ visible, onDismissed, onClick, zIndex, isDark, children, opacity, withContainer, }: OverlayProps) => React__default.ReactPortal | null;
|
|
38
|
-
|
|
39
|
-
type Point = 'sm' | 'md' | 'lg' | 'xl';
|
|
40
|
-
declare const Breakpoint: React__default.FC<{
|
|
41
|
-
fromSize?: Point;
|
|
42
|
-
toSize?: Point;
|
|
43
|
-
children: React__default.ReactNode;
|
|
44
|
-
}>;
|
|
45
|
-
|
|
46
|
-
interface Props$g {
|
|
47
|
-
disabled?: boolean;
|
|
48
|
-
kind?: 'primary' | 'secondary' | 'base' | 'warning' | 'alert' | 'gray' | 'green' | 'teal' | 'indigo';
|
|
49
|
-
size?: 'small' | 'fixed' | 'large';
|
|
50
|
-
type?: 'button' | 'submit';
|
|
51
|
-
loading?: boolean;
|
|
52
|
-
children: React__default.ReactNode;
|
|
53
|
-
onClick?: (e: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
54
|
-
}
|
|
55
|
-
declare const Button: ({ disabled, loading, onClick, kind, size, type, children }: Props$g) => react_jsx_runtime.JSX.Element;
|
|
56
|
-
|
|
57
|
-
interface Props$f {
|
|
58
|
-
disabled?: boolean;
|
|
59
|
-
color?: 'primary' | 'red' | 'green' | 'purple' | 'teal' | 'yellow' | 'cyan';
|
|
60
|
-
type?: 'button' | 'submit';
|
|
61
|
-
active?: boolean;
|
|
62
|
-
children: React__default.ReactNode;
|
|
63
|
-
loading?: boolean;
|
|
64
|
-
className?: string;
|
|
65
|
-
size?: 'big' | 'base' | 'small' | 'square';
|
|
66
|
-
onClick?: (e: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
67
|
-
}
|
|
68
|
-
declare const FunButton: React__default.FC<Props$f>;
|
|
69
|
-
|
|
70
|
-
interface Props$e {
|
|
71
|
-
disabled?: boolean;
|
|
72
|
-
color?: 'primary' | 'red' | 'green' | 'purple' | 'teal' | 'yellow';
|
|
73
|
-
type?: 'button' | 'submit';
|
|
74
|
-
active?: boolean;
|
|
75
|
-
children: React__default.ReactNode;
|
|
76
|
-
className?: string;
|
|
77
|
-
size?: number;
|
|
78
|
-
onClick?: (e: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
79
|
-
}
|
|
80
|
-
declare const FunRoundButton: ({ onClick, disabled, type, children, color, active, className, size }: Props$e) => react_jsx_runtime.JSX.Element;
|
|
81
|
-
|
|
82
|
-
type Props$d = {
|
|
83
|
-
name: string;
|
|
84
|
-
labelText: React__default.ReactNode;
|
|
85
|
-
onChange?: (value: boolean) => void;
|
|
86
|
-
isLarge?: boolean;
|
|
87
|
-
isDisabled?: boolean;
|
|
88
|
-
};
|
|
89
|
-
declare const Checkbox: {
|
|
90
|
-
({ name, labelText, isLarge, onChange, isDisabled }: Props$d): react_jsx_runtime.JSX.Element;
|
|
91
|
-
Multi: ({ name, hasMultipleAnswers, index, isLarge, allOptionsName }: MultiChoiceCheckBoxProps) => react_jsx_runtime.JSX.Element;
|
|
92
|
-
};
|
|
93
|
-
type MultiChoiceCheckBoxProps = {
|
|
94
|
-
name: string;
|
|
95
|
-
allOptionsName: string;
|
|
96
|
-
hasMultipleAnswers: boolean;
|
|
97
|
-
index: number;
|
|
98
|
-
isLarge?: boolean;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
type Props$c = {
|
|
102
|
-
name: string;
|
|
103
|
-
isLarge?: boolean;
|
|
104
|
-
labelText?: string;
|
|
105
|
-
option: string;
|
|
106
|
-
onSelect?: () => void;
|
|
107
|
-
};
|
|
108
|
-
declare const RadioOption: ({ name, isLarge, labelText, option, onSelect }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
109
|
-
|
|
110
|
-
interface Props$b {
|
|
111
|
-
title: string;
|
|
112
|
-
cancelText?: string;
|
|
113
|
-
isVisible: boolean;
|
|
114
|
-
confirmText?: string;
|
|
115
|
-
isSingleAction?: boolean;
|
|
116
|
-
setDontShowAgain?: React__default.Dispatch<React__default.SetStateAction<boolean>>;
|
|
117
|
-
dontShowAgain?: boolean;
|
|
118
|
-
borderColor?: string;
|
|
119
|
-
buttonColor?: 'base' | 'primary' | 'secondary' | 'warning' | 'alert' | 'gray' | undefined;
|
|
120
|
-
onConfirm: (confirmed: boolean) => void;
|
|
121
|
-
onDismissed?: () => void;
|
|
122
|
-
onCancel?: () => void;
|
|
123
|
-
isDark?: boolean;
|
|
124
|
-
children?: React__default.ReactNode;
|
|
125
|
-
}
|
|
126
|
-
declare const BAWrapper: React__default.FC<Props$b>;
|
|
4
|
+
declare const PRIMARY_COLOR = "#00b4d8";
|
|
127
5
|
|
|
128
6
|
interface ContainerProps {
|
|
129
7
|
backgroundColor?: string;
|
|
130
8
|
backgroundImage?: string;
|
|
131
|
-
style?:
|
|
9
|
+
style?: React.CSSProperties;
|
|
132
10
|
onClick?: () => void;
|
|
133
11
|
isDark?: boolean;
|
|
134
|
-
children?:
|
|
12
|
+
children?: React.ReactNode;
|
|
135
13
|
}
|
|
136
|
-
declare const Container:
|
|
14
|
+
declare const Container: React.FC<ContainerProps>;
|
|
137
15
|
|
|
138
|
-
type Props$
|
|
16
|
+
type Props$4 = {
|
|
139
17
|
text: string;
|
|
140
18
|
style?: CSSProperties | undefined;
|
|
141
19
|
classNames?: string;
|
|
142
20
|
};
|
|
143
|
-
declare const ErrorText: ({ text, style, classNames }: Props$
|
|
21
|
+
declare const ErrorText: ({ text, style, classNames }: Props$4) => react_jsx_runtime.JSX.Element;
|
|
144
22
|
|
|
145
23
|
declare const baseFieldStyle = "font-sans form-input h-11 w-full bg-white border-gray-200 dark:border-gray-500 dark:bg-slate-800 dark:text-gray-200 text-gray-700 dark:placeholder-gray-400 placeholder-gray-400 rounded-md px-2 py-1 focus:outline-none focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50";
|
|
146
24
|
declare const createExerciseElementStyle = "flex flex-col justify-between space-y-2 w-full p-4 bg-white dark:bg-slate-800 rounded-xl text-gray-800 dark:text-gray-200 border-2 border-slate-200 dark:border-slate-400 overflow-hidden transition-all";
|
|
@@ -152,175 +30,59 @@ declare const headerTippyClass = "rounded-lg p-2 bg-slate-950 opacity-95 text-wh
|
|
|
152
30
|
declare const headerButtonClass = "w-10 h-10 rounded-full dark:hover:bg-slate-600 hover:bg-slate-200 bg-transparent flex justify-center items-center flex justify-center items-center text-slate-600 dark:text-slate-100 hover:text-primary dark:hover:text-primary transition-colors duration-50";
|
|
153
31
|
declare const toolbarExerciseButton = "flex bg-gray-50/90 items-center sm:justify-between p-4 shadow-sm w-full rounded-xl border-4 border-transparent hover:border-white text-gray-700 hover:text-white hover:bg-indigo-500 transition-colors duration-75";
|
|
154
32
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
33
|
+
interface SpinnerProps {
|
|
34
|
+
size?: 'base' | 'small';
|
|
35
|
+
white?: boolean | string;
|
|
36
|
+
visible?: boolean | string;
|
|
37
|
+
isDark?: boolean;
|
|
38
|
+
}
|
|
39
|
+
declare const Spinner: {
|
|
40
|
+
({ visible, size, white, isDark }: SpinnerProps): react_jsx_runtime.JSX.Element | null;
|
|
41
|
+
displayName: string;
|
|
42
|
+
Centered: {
|
|
43
|
+
(props: SpinnerProps): react_jsx_runtime.JSX.Element | null;
|
|
44
|
+
displayName: string;
|
|
45
|
+
};
|
|
160
46
|
};
|
|
161
|
-
declare const IconInfo: ({ content, icon, number, color }: IconInfoProps) => react_jsx_runtime.JSX.Element;
|
|
162
47
|
|
|
163
|
-
type Props$
|
|
48
|
+
type Props$3 = {
|
|
164
49
|
loading: boolean;
|
|
165
50
|
message?: string;
|
|
166
51
|
};
|
|
167
|
-
declare const NoResults: ({ loading, message }: Props$
|
|
168
|
-
|
|
169
|
-
interface Props$8 {
|
|
170
|
-
type?: 'error' | 'warning' | 'info';
|
|
171
|
-
isDismissible?: boolean;
|
|
172
|
-
onDismiss?: () => void;
|
|
173
|
-
isVisible: boolean;
|
|
174
|
-
}
|
|
175
|
-
declare const NoticeBox: React__default.FC<Props$8 & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
52
|
+
declare const NoResults: ({ loading, message }: Props$3) => react_jsx_runtime.JSX.Element;
|
|
176
53
|
|
|
177
54
|
declare const Pill: ({ text }: {
|
|
178
55
|
text: string;
|
|
179
56
|
}) => react_jsx_runtime.JSX.Element;
|
|
180
57
|
|
|
181
|
-
type Props$7 = {
|
|
182
|
-
avgRating: number;
|
|
183
|
-
large?: boolean;
|
|
184
|
-
};
|
|
185
|
-
declare const RatingStars: ({ avgRating, large }: Props$7) => react_jsx_runtime.JSX.Element;
|
|
186
|
-
|
|
187
|
-
interface SliderProps {
|
|
188
|
-
min: number;
|
|
189
|
-
max: number;
|
|
190
|
-
step: number;
|
|
191
|
-
value: number;
|
|
192
|
-
sliderColor?: string;
|
|
193
|
-
onChange: (value: number) => void;
|
|
194
|
-
}
|
|
195
|
-
declare const Slider: {
|
|
196
|
-
({ min, max, step, value, onChange }: SliderProps): react_jsx_runtime.JSX.Element;
|
|
197
|
-
Debounced: ({ min, max, handleUpdate, initialValue }: DebouncedSliderProps) => react_jsx_runtime.JSX.Element;
|
|
198
|
-
};
|
|
199
|
-
type DebouncedSliderProps = {
|
|
200
|
-
min: number;
|
|
201
|
-
max: number;
|
|
202
|
-
handleUpdate: (n: number) => void;
|
|
203
|
-
initialValue: number;
|
|
204
|
-
};
|
|
205
|
-
|
|
206
58
|
type Step = {
|
|
207
59
|
label: ReactNode;
|
|
208
60
|
};
|
|
209
|
-
type Props$
|
|
61
|
+
type Props$2 = {
|
|
210
62
|
steps: Step[];
|
|
211
63
|
activeStep: number;
|
|
212
64
|
onStepPress: (s: number) => void;
|
|
213
65
|
};
|
|
214
|
-
declare const StepsComponent: ({ steps, activeStep, onStepPress }: Props$
|
|
215
|
-
|
|
216
|
-
interface TippyProps {
|
|
217
|
-
children: ReactNode;
|
|
218
|
-
content: ReactNode;
|
|
219
|
-
placement?: Placement;
|
|
220
|
-
className?: string;
|
|
221
|
-
disabled?: boolean;
|
|
222
|
-
arrow?: boolean;
|
|
223
|
-
visible?: boolean;
|
|
224
|
-
wrapperClassname?: string;
|
|
225
|
-
}
|
|
226
|
-
declare const Tippy: ({ children, content, placement, className, wrapperClassname, disabled, arrow: useArrow, visible }: TippyProps) => react_jsx_runtime.JSX.Element;
|
|
227
|
-
|
|
228
|
-
type FormikProps = {
|
|
229
|
-
label: string;
|
|
230
|
-
name: string;
|
|
231
|
-
};
|
|
232
|
-
type Props$5 = {
|
|
233
|
-
label: string;
|
|
234
|
-
onChange: (bool: boolean) => void;
|
|
235
|
-
value: boolean;
|
|
236
|
-
};
|
|
237
|
-
declare const ToggleSwitch: {
|
|
238
|
-
({ label, onChange, value }: Props$5): react_jsx_runtime.JSX.Element;
|
|
239
|
-
Formik: ({ label, name }: FormikProps) => react_jsx_runtime.JSX.Element;
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
type ModeProps = {
|
|
243
|
-
setGalleryMode: React.Dispatch<React.SetStateAction<string>>;
|
|
244
|
-
galleryMode: string;
|
|
245
|
-
title1: string;
|
|
246
|
-
title2: string;
|
|
247
|
-
icon1?: React.ComponentType<React.ComponentProps<"svg">>;
|
|
248
|
-
icon2?: React.ComponentType<React.ComponentProps<"svg">>;
|
|
249
|
-
};
|
|
250
|
-
declare const UserContentSwitcher: ({ icon1: Icon1, icon2: Icon2, setGalleryMode, galleryMode, title1, title2 }: ModeProps) => react_jsx_runtime.JSX.Element;
|
|
251
|
-
|
|
252
|
-
type Props$4 = {
|
|
253
|
-
inProp: boolean;
|
|
254
|
-
children: React__default.ReactNode;
|
|
255
|
-
};
|
|
256
|
-
declare const Fade: ({ children, inProp }: Props$4) => react_jsx_runtime.JSX.Element;
|
|
257
|
-
|
|
258
|
-
type ProgressBarProps = {
|
|
259
|
-
progress: number;
|
|
260
|
-
height?: number;
|
|
261
|
-
backgroundColor?: string;
|
|
262
|
-
color: string;
|
|
263
|
-
};
|
|
264
|
-
declare const ProgressBarSimple: ({ progress, color, height, backgroundColor }: ProgressBarProps) => react_jsx_runtime.JSX.Element;
|
|
265
|
-
|
|
266
|
-
declare const ProgressBar: {
|
|
267
|
-
({ progress }: {
|
|
268
|
-
progress: number;
|
|
269
|
-
}): react_jsx_runtime.JSX.Element;
|
|
270
|
-
Step: ({ steps, stepIndex, onStepClick, color }: Props$3) => react_jsx_runtime.JSX.Element;
|
|
271
|
-
};
|
|
272
|
-
type Props$3 = {
|
|
273
|
-
steps: {
|
|
274
|
-
label: string;
|
|
275
|
-
}[];
|
|
276
|
-
stepIndex: number;
|
|
277
|
-
color?: string;
|
|
278
|
-
onStepClick?: (i: number) => void;
|
|
279
|
-
};
|
|
280
|
-
|
|
281
|
-
type Props$2 = {
|
|
282
|
-
twColor?: string;
|
|
283
|
-
percentage: number;
|
|
284
|
-
radius: number;
|
|
285
|
-
fill?: string;
|
|
286
|
-
strokeWidth?: number;
|
|
287
|
-
};
|
|
288
|
-
declare const CircleProgress: ({ twColor, percentage, radius, fill, strokeWidth }: Props$2) => react_jsx_runtime.JSX.Element;
|
|
66
|
+
declare const StepsComponent: ({ steps, activeStep, onStepPress }: Props$2) => react_jsx_runtime.JSX.Element;
|
|
289
67
|
|
|
290
68
|
type Props$1 = {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
label: string;
|
|
294
|
-
};
|
|
295
|
-
declare const CourseProgress: {
|
|
296
|
-
({ twColor, percentage, label }: Props$1): react_jsx_runtime.JSX.Element;
|
|
297
|
-
Small: ({ twColor, percentage, label }: Props$1) => react_jsx_runtime.JSX.Element;
|
|
69
|
+
inProp: boolean;
|
|
70
|
+
children: React.ReactNode;
|
|
298
71
|
};
|
|
299
|
-
|
|
300
|
-
declare const ScrollProgress: () => react_jsx_runtime.JSX.Element;
|
|
72
|
+
declare const Fade: ({ children, inProp }: Props$1) => react_jsx_runtime.JSX.Element;
|
|
301
73
|
|
|
302
74
|
type Props = {
|
|
303
75
|
visible: boolean;
|
|
76
|
+
onClick: () => void;
|
|
77
|
+
opacity?: number;
|
|
304
78
|
};
|
|
305
|
-
declare const
|
|
306
|
-
|
|
307
|
-
interface SpinnerProps {
|
|
308
|
-
size?: 'base' | 'small';
|
|
309
|
-
white?: boolean | string;
|
|
310
|
-
visible?: boolean | string;
|
|
311
|
-
isDark?: boolean;
|
|
312
|
-
}
|
|
313
|
-
declare const Spinner: {
|
|
314
|
-
({ visible, size, white, isDark }: SpinnerProps): react_jsx_runtime.JSX.Element | null;
|
|
315
|
-
displayName: string;
|
|
316
|
-
Centered: {
|
|
317
|
-
(props: SpinnerProps): react_jsx_runtime.JSX.Element | null;
|
|
318
|
-
displayName: string;
|
|
319
|
-
};
|
|
320
|
-
};
|
|
79
|
+
declare const Backdrop: ({ visible, onClick, opacity }: Props) => react_jsx_runtime.JSX.Element | null;
|
|
321
80
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
81
|
+
type Point = 'sm' | 'md' | 'lg' | 'xl';
|
|
82
|
+
declare const Breakpoint: React.FC<{
|
|
83
|
+
fromSize?: Point;
|
|
84
|
+
toSize?: Point;
|
|
85
|
+
children: React.ReactNode;
|
|
86
|
+
}>;
|
|
325
87
|
|
|
326
|
-
export {
|
|
88
|
+
export { Backdrop, Breakpoint, Container, ErrorText, Fade, NoResults, PRIMARY_COLOR, Pill, Spinner, StepsComponent, baseFieldStyle, createExerciseElementStyle, exerciseDeleteButton, exerciseEditButton, headerButtonClass, headerTippyClass, tippyClassname, toolbarExerciseButton, xIconButton };
|