evelearn-theme 2.0.0 → 2.0.2

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 CHANGED
@@ -1,88 +1,243 @@
1
- import React, { CSSProperties, ReactNode } from 'react';
1
+ export { Backdrop, Breakpoint, Container, ErrorText, Fade, NoResults, PRIMARY_COLOR, Pill, Spinner, StepsComponent, baseFieldStyle, createExerciseElementStyle, exerciseDeleteButton, exerciseEditButton, headerButtonClass, headerTippyClass, tippyClassname, toolbarExerciseButton, xIconButton } from './server.js';
2
+ import * as React$1 from 'react';
3
+ import React__default, { CSSProperties, ReactNode } from 'react';
2
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { Placement } from '@floating-ui/react';
3
6
 
4
- declare const PRIMARY_COLOR = "#00b4d8";
7
+ interface BaseModalProps {
8
+ visible: boolean;
9
+ children: React__default.ReactNode;
10
+ appear?: boolean;
11
+ dismissable?: boolean;
12
+ dismissOnBackdropClick?: boolean;
13
+ onDismissed?: () => void;
14
+ style?: CSSProperties;
15
+ fullscreen?: boolean;
16
+ dismissLink?: string;
17
+ bgOpacity?: number;
18
+ displayDark?: boolean;
19
+ }
20
+ type ModalProps = BaseModalProps;
21
+ declare const Modal: ({ visible, children, fullscreen, displayDark, dismissLink, bgOpacity, onDismissed, dismissable, dismissOnBackdropClick, style, ...props }: ModalProps) => react_jsx_runtime.JSX.Element | null;
5
22
 
6
- interface ContainerProps {
7
- backgroundColor?: string;
8
- backgroundImage?: string;
9
- style?: React.CSSProperties;
10
- onClick?: () => void;
23
+ type OverlayProps = BaseModalProps & {
24
+ children?: React__default.ReactNode;
25
+ withContainer?: boolean;
26
+ opacity?: number;
11
27
  isDark?: boolean;
12
- children?: React.ReactNode;
28
+ zIndex?: number;
29
+ onClick?: () => void;
30
+ };
31
+ declare const Overlay: ({ visible, onDismissed, onClick, zIndex, isDark, children, opacity, withContainer, }: OverlayProps) => React__default.ReactPortal | null;
32
+
33
+ interface Props$c {
34
+ disabled?: boolean;
35
+ kind?: 'primary' | 'secondary' | 'base' | 'warning' | 'alert' | 'gray' | 'green' | 'teal' | 'indigo';
36
+ size?: 'small' | 'fixed' | 'large';
37
+ type?: 'button' | 'submit';
38
+ loading?: boolean;
39
+ children: React__default.ReactNode;
40
+ onClick?: (e: React__default.MouseEvent<HTMLButtonElement>) => void;
13
41
  }
14
- declare const Container: React.FC<ContainerProps>;
42
+ declare const Button: ({ disabled, loading, onClick, kind, size, type, children }: Props$c) => react_jsx_runtime.JSX.Element;
15
43
 
16
- type Props$4 = {
17
- text: string;
18
- style?: CSSProperties | undefined;
19
- classNames?: string;
20
- };
21
- declare const ErrorText: ({ text, style, classNames }: Props$4) => react_jsx_runtime.JSX.Element;
22
-
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";
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";
25
- declare const exerciseDeleteButton = "w-6 h-6 flex justify-center text-gray-700 dark:text-gray-200 hover:text-red-600 dark:hover:text-red-500 transition-all duration-150 hover:scale-125";
26
- declare const xIconButton = "w-6 h-6 flex justify-center text-gray-700 dark:text-gray-200 hover:text-gray-950 dark:hover:text-gray-100 transition-all duration-150 hover:scale-125";
27
- declare const exerciseEditButton = "w-6 h-6 flex justify-center text-gray-700 dark:text-gray-200 hover:text-red-600 dark:hover:text-green-500 transition-all duration-150 hover:scale-125";
28
- declare const tippyClassname = "p-2 bg-slate-600 dark:bg-slate-900 opacity-90 text-white font-medium font-header rounded-lg";
29
- declare const headerTippyClass = "rounded-lg p-2 bg-slate-950 opacity-95 text-white font-medium";
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";
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";
32
-
33
- interface SpinnerProps {
34
- size?: 'base' | 'small';
35
- white?: boolean | string;
36
- visible?: boolean | string;
44
+ interface Props$b {
45
+ disabled?: boolean;
46
+ color?: 'primary' | 'red' | 'green' | 'purple' | 'teal' | 'yellow' | 'cyan';
47
+ type?: 'button' | 'submit';
48
+ active?: boolean;
49
+ children: React__default.ReactNode;
50
+ loading?: boolean;
51
+ className?: string;
52
+ size?: 'big' | 'base' | 'small' | 'square';
53
+ onClick?: (e: React__default.MouseEvent<HTMLButtonElement>) => void;
54
+ }
55
+ declare const FunButton: React__default.FC<Props$b>;
56
+
57
+ interface Props$a {
58
+ disabled?: boolean;
59
+ color?: 'primary' | 'red' | 'green' | 'purple' | 'teal' | 'yellow';
60
+ type?: 'button' | 'submit';
61
+ active?: boolean;
62
+ children: React__default.ReactNode;
63
+ className?: string;
64
+ size?: number;
65
+ onClick?: (e: React__default.MouseEvent<HTMLButtonElement>) => void;
66
+ }
67
+ declare const FunRoundButton: ({ onClick, disabled, type, children, color, active, className, size }: Props$a) => react_jsx_runtime.JSX.Element;
68
+
69
+ type Props$9 = {
70
+ name: string;
71
+ labelText: React__default.ReactNode;
72
+ onChange?: (value: boolean) => void;
73
+ isLarge?: boolean;
74
+ isDisabled?: boolean;
75
+ };
76
+ declare const Checkbox: {
77
+ ({ name, labelText, isLarge, onChange, isDisabled }: Props$9): react_jsx_runtime.JSX.Element;
78
+ Multi: ({ name, hasMultipleAnswers, index, isLarge, allOptionsName }: MultiChoiceCheckBoxProps) => react_jsx_runtime.JSX.Element;
79
+ };
80
+ type MultiChoiceCheckBoxProps = {
81
+ name: string;
82
+ allOptionsName: string;
83
+ hasMultipleAnswers: boolean;
84
+ index: number;
85
+ isLarge?: boolean;
86
+ };
87
+
88
+ type Props$8 = {
89
+ name: string;
90
+ isLarge?: boolean;
91
+ labelText?: string;
92
+ option: string;
93
+ onSelect?: () => void;
94
+ };
95
+ declare const RadioOption: ({ name, isLarge, labelText, option, onSelect }: Props$8) => react_jsx_runtime.JSX.Element;
96
+
97
+ interface Props$7 {
98
+ title: string;
99
+ cancelText?: string;
100
+ isVisible: boolean;
101
+ confirmText?: string;
102
+ isSingleAction?: boolean;
103
+ setDontShowAgain?: React__default.Dispatch<React__default.SetStateAction<boolean>>;
104
+ dontShowAgain?: boolean;
105
+ borderColor?: string;
106
+ buttonColor?: 'base' | 'primary' | 'secondary' | 'warning' | 'alert' | 'gray' | undefined;
107
+ onConfirm: (confirmed: boolean) => void;
108
+ onDismissed?: () => void;
109
+ onCancel?: () => void;
37
110
  isDark?: boolean;
111
+ children?: React__default.ReactNode;
38
112
  }
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
- };
113
+ declare const BAWrapper: React__default.FC<Props$7>;
114
+
115
+ type IconInfoProps = {
116
+ content: string;
117
+ icon: React.ReactNode;
118
+ number: number;
119
+ color?: string;
46
120
  };
121
+ declare const IconInfo: ({ content, icon, number, color }: IconInfoProps) => react_jsx_runtime.JSX.Element;
47
122
 
48
- type Props$3 = {
49
- loading: boolean;
50
- message?: string;
123
+ interface Props$6 {
124
+ type?: 'error' | 'warning' | 'info';
125
+ isDismissible?: boolean;
126
+ onDismiss?: () => void;
127
+ isVisible: boolean;
128
+ }
129
+ declare const NoticeBox: React__default.FC<Props$6 & React__default.HTMLAttributes<HTMLDivElement>>;
130
+
131
+ type Props$5 = {
132
+ avgRating: number;
133
+ large?: boolean;
134
+ };
135
+ declare const RatingStars: ({ avgRating, large }: Props$5) => react_jsx_runtime.JSX.Element;
136
+
137
+ interface SliderProps {
138
+ min: number;
139
+ max: number;
140
+ step: number;
141
+ value: number;
142
+ sliderColor?: string;
143
+ onChange: (value: number) => void;
144
+ }
145
+ declare const Slider: {
146
+ ({ min, max, step, value, onChange }: SliderProps): react_jsx_runtime.JSX.Element;
147
+ Debounced: ({ min, max, handleUpdate, initialValue }: DebouncedSliderProps) => react_jsx_runtime.JSX.Element;
148
+ };
149
+ type DebouncedSliderProps = {
150
+ min: number;
151
+ max: number;
152
+ handleUpdate: (n: number) => void;
153
+ initialValue: number;
154
+ };
155
+
156
+ interface TippyProps {
157
+ children: ReactNode;
158
+ content: ReactNode;
159
+ placement?: Placement;
160
+ className?: string;
161
+ disabled?: boolean;
162
+ arrow?: boolean;
163
+ visible?: boolean;
164
+ wrapperClassname?: string;
165
+ }
166
+ declare const Tippy: ({ children, content, placement, className, wrapperClassname, disabled, arrow: useArrow, visible }: TippyProps) => react_jsx_runtime.JSX.Element;
167
+
168
+ type FormikProps = {
169
+ label: string;
170
+ name: string;
171
+ };
172
+ type Props$4 = {
173
+ label: string;
174
+ onChange: (bool: boolean) => void;
175
+ value: boolean;
51
176
  };
52
- declare const NoResults: ({ loading, message }: Props$3) => react_jsx_runtime.JSX.Element;
177
+ declare const ToggleSwitch: {
178
+ ({ label, onChange, value }: Props$4): react_jsx_runtime.JSX.Element;
179
+ Formik: ({ label, name }: FormikProps) => react_jsx_runtime.JSX.Element;
180
+ };
181
+
182
+ type ModeProps = {
183
+ setGalleryMode: React.Dispatch<React.SetStateAction<string>>;
184
+ galleryMode: string;
185
+ title1: string;
186
+ title2: string;
187
+ icon1?: React.ComponentType<React.ComponentProps<"svg">>;
188
+ icon2?: React.ComponentType<React.ComponentProps<"svg">>;
189
+ };
190
+ declare const UserContentSwitcher: ({ icon1: Icon1, icon2: Icon2, setGalleryMode, galleryMode, title1, title2 }: ModeProps) => react_jsx_runtime.JSX.Element;
53
191
 
54
- declare const Pill: ({ text }: {
55
- text: string;
56
- }) => react_jsx_runtime.JSX.Element;
192
+ type ProgressBarProps = {
193
+ progress: number;
194
+ height?: number;
195
+ backgroundColor?: string;
196
+ color: string;
197
+ };
198
+ declare const ProgressBarSimple: ({ progress, color, height, backgroundColor }: ProgressBarProps) => react_jsx_runtime.JSX.Element;
57
199
 
58
- type Step = {
59
- label: ReactNode;
200
+ declare const ProgressBar: {
201
+ ({ progress }: {
202
+ progress: number;
203
+ }): react_jsx_runtime.JSX.Element;
204
+ Step: ({ steps, stepIndex, onStepClick, color }: Props$3) => react_jsx_runtime.JSX.Element;
60
205
  };
206
+ type Props$3 = {
207
+ steps: {
208
+ label: string;
209
+ }[];
210
+ stepIndex: number;
211
+ color?: string;
212
+ onStepClick?: (i: number) => void;
213
+ };
214
+
61
215
  type Props$2 = {
62
- steps: Step[];
63
- activeStep: number;
64
- onStepPress: (s: number) => void;
216
+ twColor?: string;
217
+ percentage: number;
218
+ radius: number;
219
+ fill?: string;
220
+ strokeWidth?: number;
65
221
  };
66
- declare const StepsComponent: ({ steps, activeStep, onStepPress }: Props$2) => react_jsx_runtime.JSX.Element;
222
+ declare const CircleProgress: ({ twColor, percentage, radius, fill, strokeWidth }: Props$2) => react_jsx_runtime.JSX.Element;
67
223
 
68
224
  type Props$1 = {
69
- inProp: boolean;
70
- children: React.ReactNode;
225
+ twColor?: string;
226
+ percentage: number;
227
+ label: string;
228
+ };
229
+ declare const CourseProgress: {
230
+ ({ twColor, percentage, label }: Props$1): react_jsx_runtime.JSX.Element;
231
+ Small: ({ twColor, percentage, label }: Props$1) => react_jsx_runtime.JSX.Element;
71
232
  };
72
- declare const Fade: ({ children, inProp }: Props$1) => react_jsx_runtime.JSX.Element;
233
+
234
+ declare const ScrollProgress: () => react_jsx_runtime.JSX.Element;
73
235
 
74
236
  type Props = {
75
237
  visible: boolean;
76
- onClick: () => void;
77
- opacity?: number;
78
238
  };
79
- declare const Backdrop: ({ visible, onClick, opacity }: Props) => react_jsx_runtime.JSX.Element | null;
239
+ declare const OverlaySpinner: ({ visible }: Props) => React$1.ReactPortal | null;
80
240
 
81
- type Point = 'sm' | 'md' | 'lg' | 'xl';
82
- declare const Breakpoint: React.FC<{
83
- fromSize?: Point;
84
- toSize?: Point;
85
- children: React.ReactNode;
86
- }>;
241
+ declare const AnimateLogo: () => react_jsx_runtime.JSX.Element;
87
242
 
88
- export { Backdrop, Breakpoint, Container, ErrorText, Fade, NoResults, PRIMARY_COLOR, Pill, Spinner, StepsComponent, baseFieldStyle, createExerciseElementStyle, exerciseDeleteButton, exerciseEditButton, headerButtonClass, headerTippyClass, tippyClassname, toolbarExerciseButton, xIconButton };
243
+ export { AnimateLogo, BAWrapper as BottomAlert, Button, Checkbox, CircleProgress, CourseProgress, FunButton, FunRoundButton, IconInfo, Modal, NoticeBox, Overlay, OverlaySpinner, ProgressBar, ProgressBarSimple, RadioOption, RatingStars, ScrollProgress, Slider, Tippy, ToggleSwitch, UserContentSwitcher };