evelearn-theme 1.0.6 → 2.0.1
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/chunk-XLPRFXMF.mjs +248 -0
- package/dist/index.d.mts +21 -104
- package/dist/index.d.ts +21 -104
- package/dist/index.js +277 -279
- package/dist/index.mjs +174 -375
- package/dist/server.d.mts +88 -0
- package/dist/server.d.ts +88 -0
- package/dist/server.js +271 -0
- package/dist/server.mjs +42 -0
- package/package.json +11 -2
package/dist/index.mjs
CHANGED
|
@@ -1,57 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
// src/Backdrop/Backdrop.tsx
|
|
34
|
-
import { jsx } from "react/jsx-runtime";
|
|
35
|
-
var Backdrop = ({ visible, onClick, opacity }) => {
|
|
36
|
-
if (!visible) return null;
|
|
37
|
-
return /* @__PURE__ */ jsx(
|
|
38
|
-
"div",
|
|
39
|
-
{
|
|
40
|
-
style: {
|
|
41
|
-
opacity: opacity ? opacity : 90,
|
|
42
|
-
zIndex: 21
|
|
43
|
-
},
|
|
44
|
-
className: `fixed top-0 left-0 w-full h-screen bg-gray-100 dark:bg-slate-900`,
|
|
45
|
-
onClick
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
var Backdrop_default = Backdrop;
|
|
1
|
+
import {
|
|
2
|
+
Backdrop_default,
|
|
3
|
+
Breakpoint_default,
|
|
4
|
+
Container_default,
|
|
5
|
+
ErrorText_default,
|
|
6
|
+
Fade_default,
|
|
7
|
+
NoResults_default,
|
|
8
|
+
PRIMARY_COLOR,
|
|
9
|
+
Pill_default,
|
|
10
|
+
Spinner_default,
|
|
11
|
+
StepsComponent_default,
|
|
12
|
+
__objRest,
|
|
13
|
+
__spreadProps,
|
|
14
|
+
__spreadValues,
|
|
15
|
+
baseFieldStyle,
|
|
16
|
+
createExerciseElementStyle,
|
|
17
|
+
exerciseDeleteButton,
|
|
18
|
+
exerciseEditButton,
|
|
19
|
+
headerButtonClass,
|
|
20
|
+
headerTippyClass,
|
|
21
|
+
tippyClassname,
|
|
22
|
+
toolbarExerciseButton,
|
|
23
|
+
xIconButton
|
|
24
|
+
} from "./chunk-XLPRFXMF.mjs";
|
|
50
25
|
|
|
51
26
|
// src/Backdrop/Overlay.tsx
|
|
52
27
|
import { useEffect, useState } from "react";
|
|
53
28
|
import ReactDOM from "react-dom";
|
|
54
|
-
import { jsx
|
|
29
|
+
import { jsx } from "react/jsx-runtime";
|
|
55
30
|
var Overlay = ({ visible, onDismissed, onClick, zIndex, isDark, children, opacity, withContainer = true }) => {
|
|
56
31
|
const [modalRoot, setModalRoot] = useState(null);
|
|
57
32
|
useEffect(() => {
|
|
@@ -71,7 +46,7 @@ var Overlay = ({ visible, onDismissed, onClick, zIndex, isDark, children, opacit
|
|
|
71
46
|
}, [visible]);
|
|
72
47
|
if (!visible || !modalRoot) return null;
|
|
73
48
|
return ReactDOM.createPortal(
|
|
74
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ jsx("div", { className: "animate-fade-in", children: withContainer ? /* @__PURE__ */ jsx(
|
|
75
50
|
"div",
|
|
76
51
|
{
|
|
77
52
|
onClick: onDismissed || onClick,
|
|
@@ -88,84 +63,8 @@ var Overlay = ({ visible, onDismissed, onClick, zIndex, isDark, children, opacit
|
|
|
88
63
|
};
|
|
89
64
|
var Overlay_default = Overlay;
|
|
90
65
|
|
|
91
|
-
// src/Breakpoint/Breakpoint.tsx
|
|
92
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
93
|
-
var Breakpoint = ({ children, fromSize, toSize }) => {
|
|
94
|
-
let className = "";
|
|
95
|
-
if (fromSize && toSize) {
|
|
96
|
-
className = `hidden ${fromSize}:block ${toSize}:hidden`;
|
|
97
|
-
} else if (fromSize) {
|
|
98
|
-
className = `hidden ${fromSize}:block`;
|
|
99
|
-
} else if (toSize) {
|
|
100
|
-
className = `block ${toSize}:hidden`;
|
|
101
|
-
}
|
|
102
|
-
return /* @__PURE__ */ jsx3("div", { className, children });
|
|
103
|
-
};
|
|
104
|
-
var Breakpoint_default = Breakpoint;
|
|
105
|
-
|
|
106
|
-
// src/Spinners/Spinner.tsx
|
|
107
|
-
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
108
|
-
var Spinner = ({ visible = true, size, white, isDark }) => {
|
|
109
|
-
if (visible === false) return null;
|
|
110
|
-
const isWhite = white || isDark;
|
|
111
|
-
const color = isWhite ? "stroke-white/90" : "stroke-slate-600/80";
|
|
112
|
-
const bgColor = isWhite ? "stroke-white/20" : "stroke-slate-500/20";
|
|
113
|
-
const dimensions = size === "small" ? "w-5 h-5" : "w-8 h-8";
|
|
114
|
-
const spinnerClasses = `
|
|
115
|
-
absolute
|
|
116
|
-
top-0
|
|
117
|
-
animate-spin
|
|
118
|
-
${dimensions}
|
|
119
|
-
`;
|
|
120
|
-
return /* @__PURE__ */ jsxs("div", { className: "relative h-8 w-8 flex justify-center items-center", children: [
|
|
121
|
-
/* @__PURE__ */ jsx4(
|
|
122
|
-
"svg",
|
|
123
|
-
{
|
|
124
|
-
className: `absolute top-0 ${dimensions} ${bgColor}`,
|
|
125
|
-
viewBox: "0 0 24 24",
|
|
126
|
-
fill: "none",
|
|
127
|
-
strokeWidth: "2.4",
|
|
128
|
-
children: /* @__PURE__ */ jsx4("circle", { cx: "12", cy: "12", r: "10" })
|
|
129
|
-
}
|
|
130
|
-
),
|
|
131
|
-
/* @__PURE__ */ jsx4(
|
|
132
|
-
"svg",
|
|
133
|
-
{
|
|
134
|
-
className: spinnerClasses,
|
|
135
|
-
viewBox: "0 0 24 24",
|
|
136
|
-
fill: "none",
|
|
137
|
-
strokeWidth: "2.4",
|
|
138
|
-
strokeLinecap: "round",
|
|
139
|
-
children: /* @__PURE__ */ jsx4(
|
|
140
|
-
"path",
|
|
141
|
-
{
|
|
142
|
-
d: `
|
|
143
|
-
M 12 2
|
|
144
|
-
A 10 10 0 0 1 22 12
|
|
145
|
-
A 10 10 0 0 1 12 22
|
|
146
|
-
A 10 10 0 0 1 2 12
|
|
147
|
-
A 10 10 0 0 1 12 2
|
|
148
|
-
`,
|
|
149
|
-
strokeDasharray: "13 18.4",
|
|
150
|
-
stroke: "inherit",
|
|
151
|
-
className: color
|
|
152
|
-
}
|
|
153
|
-
)
|
|
154
|
-
}
|
|
155
|
-
)
|
|
156
|
-
] });
|
|
157
|
-
};
|
|
158
|
-
var SpinnerCentered = (props) => {
|
|
159
|
-
if (props.visible === false) return null;
|
|
160
|
-
return /* @__PURE__ */ jsx4("div", { className: "w-full flex justify-center items-center", children: /* @__PURE__ */ jsx4(Spinner, __spreadValues({}, props)) });
|
|
161
|
-
};
|
|
162
|
-
Spinner.displayName = "Spinner";
|
|
163
|
-
SpinnerCentered.displayName = "Spinner.Centered";
|
|
164
|
-
Spinner.Centered = SpinnerCentered;
|
|
165
|
-
var Spinner_default = Spinner;
|
|
166
|
-
|
|
167
66
|
// src/Button/Button.tsx
|
|
168
|
-
import { jsx as
|
|
67
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
169
68
|
var Button = ({ disabled = false, loading, onClick, kind = "primary", size = "small", type = "button", children }) => {
|
|
170
69
|
const styled = () => {
|
|
171
70
|
switch (kind) {
|
|
@@ -203,14 +102,14 @@ var Button = ({ disabled = false, loading, onClick, kind = "primary", size = "sm
|
|
|
203
102
|
return "px-2 py-1";
|
|
204
103
|
}
|
|
205
104
|
};
|
|
206
|
-
return /* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ jsx2("button", { type: type || "button", disabled, className: `rounded-lg focus:outline-none transition duration-100 ${styled()} ${sized()}`, onClick, children: /* @__PURE__ */ jsx2("div", { className: "w-full max-h-11", children: loading ? /* @__PURE__ */ jsx2("div", { className: "flex w-full justify-center items-center", children: /* @__PURE__ */ jsx2(Spinner_default, { white: true }) }) : children }) });
|
|
207
106
|
};
|
|
208
107
|
var Button_default = Button;
|
|
209
108
|
|
|
210
109
|
// src/Button/FunButton.tsx
|
|
211
110
|
import { useMemo } from "react";
|
|
212
111
|
import { motion } from "framer-motion";
|
|
213
|
-
import { jsx as
|
|
112
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
214
113
|
var FunButton = ({
|
|
215
114
|
onClick,
|
|
216
115
|
disabled,
|
|
@@ -264,7 +163,7 @@ var FunButton = ({
|
|
|
264
163
|
const cName = classStyle;
|
|
265
164
|
return cName + (disabled ? " opacity-70 cursor-default hover:bg-black/70" : "");
|
|
266
165
|
}, [classStyle, disabled]);
|
|
267
|
-
return /* @__PURE__ */
|
|
166
|
+
return /* @__PURE__ */ jsx3(
|
|
268
167
|
motion.button,
|
|
269
168
|
{
|
|
270
169
|
className: `${computedClassName}`,
|
|
@@ -273,7 +172,7 @@ var FunButton = ({
|
|
|
273
172
|
onMouseDown: onClick,
|
|
274
173
|
whileTap: { y: disabled ? 0 : 2 },
|
|
275
174
|
transition: { duration: 0.1, ease: "easeInOut" },
|
|
276
|
-
children: /* @__PURE__ */
|
|
175
|
+
children: /* @__PURE__ */ jsx3(
|
|
277
176
|
motion.span,
|
|
278
177
|
{
|
|
279
178
|
className: computedClassStyle,
|
|
@@ -285,7 +184,7 @@ var FunButton = ({
|
|
|
285
184
|
animate: { y: active ? 0 : -6 },
|
|
286
185
|
whileTap: { y: disabled ? -6 : 0 },
|
|
287
186
|
transition: { duration: 0.1, ease: "easeInOut" },
|
|
288
|
-
children: loading ? /* @__PURE__ */
|
|
187
|
+
children: loading ? /* @__PURE__ */ jsx3("div", { className: size === "small" ? "min-h-6" : "min-h-10", children: /* @__PURE__ */ jsx3(Spinner_default.Centered, { visible: true, size: size === "small" ? "small" : "base", white: true }) }) : children
|
|
289
188
|
}
|
|
290
189
|
)
|
|
291
190
|
}
|
|
@@ -296,7 +195,7 @@ var FunButton_default = FunButton;
|
|
|
296
195
|
// src/Button/FunRoundButton.tsx
|
|
297
196
|
import { useMemo as useMemo2 } from "react";
|
|
298
197
|
import { motion as motion2 } from "framer-motion";
|
|
299
|
-
import { jsx as
|
|
198
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
300
199
|
var FunRoundButton = ({ onClick, disabled, type, children, color, active, className, size = 44 }) => {
|
|
301
200
|
const { front, bottom } = useMemo2(() => {
|
|
302
201
|
switch (color) {
|
|
@@ -316,7 +215,7 @@ var FunRoundButton = ({ onClick, disabled, type, children, color, active, classN
|
|
|
316
215
|
return { bottom: disabled ? "#d1d5db" : "#00b4d8", front: disabled ? "#38bdf8" : "#0369a1" };
|
|
317
216
|
}
|
|
318
217
|
}, [color, disabled]);
|
|
319
|
-
return /* @__PURE__ */
|
|
218
|
+
return /* @__PURE__ */ jsx4(
|
|
320
219
|
motion2.button,
|
|
321
220
|
{
|
|
322
221
|
className: `${className || "border-none p-0 flex justify-center items-center cursor-pointer z-10"} ${disabled ? "opacity-70 cursor-default" : "hover:opacity-95"}`,
|
|
@@ -332,7 +231,7 @@ var FunRoundButton = ({ onClick, disabled, type, children, color, active, classN
|
|
|
332
231
|
onClick,
|
|
333
232
|
whileHover: { opacity: 0.95 },
|
|
334
233
|
whileTap: { y: disabled ? 0 : 2 },
|
|
335
|
-
children: /* @__PURE__ */
|
|
234
|
+
children: /* @__PURE__ */ jsx4(
|
|
336
235
|
motion2.span,
|
|
337
236
|
{
|
|
338
237
|
className: "flex justify-center items-center z-10",
|
|
@@ -358,16 +257,7 @@ var FunRoundButton_default = FunRoundButton;
|
|
|
358
257
|
// src/Checkbox/Checkbox.tsx
|
|
359
258
|
import { useMemo as useMemo3 } from "react";
|
|
360
259
|
import { useField } from "formik";
|
|
361
|
-
|
|
362
|
-
// src/Common/ErrorText.tsx
|
|
363
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
364
|
-
var ErrorText = ({ text, style, classNames }) => {
|
|
365
|
-
return /* @__PURE__ */ jsx8("p", { className: classNames ? classNames : "text-red-500 font-semibold text-wrap py-auto", style, children: text });
|
|
366
|
-
};
|
|
367
|
-
var ErrorText_default = ErrorText;
|
|
368
|
-
|
|
369
|
-
// src/Checkbox/Checkbox.tsx
|
|
370
|
-
import { jsx as jsx9, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
260
|
+
import { jsx as jsx5, jsxs } from "react/jsx-runtime";
|
|
371
261
|
var Checkbox = ({ name, labelText, isLarge, onChange, isDisabled }) => {
|
|
372
262
|
const [{ value }, { error }, { setValue, setTouched }] = useField(name);
|
|
373
263
|
const onCheck = (e) => {
|
|
@@ -377,9 +267,9 @@ var Checkbox = ({ name, labelText, isLarge, onChange, isDisabled }) => {
|
|
|
377
267
|
const rand = useMemo3(() => {
|
|
378
268
|
return Math.random();
|
|
379
269
|
}, []);
|
|
380
|
-
return /* @__PURE__ */
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
-
/* @__PURE__ */
|
|
270
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative flex flex-col justify-center items-center", children: [
|
|
271
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
272
|
+
/* @__PURE__ */ jsx5(
|
|
383
273
|
"input",
|
|
384
274
|
{
|
|
385
275
|
disabled: !!isDisabled,
|
|
@@ -395,9 +285,9 @@ var Checkbox = ({ name, labelText, isLarge, onChange, isDisabled }) => {
|
|
|
395
285
|
className: `form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded ${isLarge ? "h-5 w-5" : "h-4 w-4"}`
|
|
396
286
|
}
|
|
397
287
|
),
|
|
398
|
-
typeof labelText === "string" ? /* @__PURE__ */
|
|
288
|
+
typeof labelText === "string" ? /* @__PURE__ */ jsx5("label", { htmlFor: `${name}${rand}`, className: "ml-2 block text-sm text-gray-800 dark:text-gray-200", children: labelText }) : /* @__PURE__ */ jsx5("label", { htmlFor: `${name}${rand}`, children: labelText })
|
|
399
289
|
] }),
|
|
400
|
-
error && /* @__PURE__ */
|
|
290
|
+
error && /* @__PURE__ */ jsx5(ErrorText_default, { classNames: "absolute w-64 left-6 top-4 text-xs text-red-500", text: error })
|
|
401
291
|
] });
|
|
402
292
|
};
|
|
403
293
|
var MultiChoiceCheckBox = ({ name, hasMultipleAnswers, index, isLarge, allOptionsName }) => {
|
|
@@ -411,7 +301,7 @@ var MultiChoiceCheckBox = ({ name, hasMultipleAnswers, index, isLarge, allOption
|
|
|
411
301
|
}
|
|
412
302
|
setOptionsValue(optionsValue == null ? void 0 : optionsValue.map((el, idx) => ({ option: el.option, id: el.id, isCorrectAnswer: index === idx ? !el.isCorrectAnswer : false })));
|
|
413
303
|
};
|
|
414
|
-
return /* @__PURE__ */
|
|
304
|
+
return /* @__PURE__ */ jsx5("div", { className: "flex flex-col justify-center items-center", children: /* @__PURE__ */ jsx5("div", { className: "flex items-center", children: /* @__PURE__ */ jsx5(
|
|
415
305
|
"input",
|
|
416
306
|
{
|
|
417
307
|
onChange: (e) => onCheck(e),
|
|
@@ -429,11 +319,11 @@ var Checkbox_default = Checkbox;
|
|
|
429
319
|
|
|
430
320
|
// src/Checkbox/RadioOption.tsx
|
|
431
321
|
import { useField as useField2 } from "formik";
|
|
432
|
-
import { jsx as
|
|
322
|
+
import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
433
323
|
var RadioOption = ({ name, isLarge, labelText, option, onSelect }) => {
|
|
434
324
|
const [{ value }, {}, { setValue }] = useField2(name);
|
|
435
|
-
return /* @__PURE__ */
|
|
436
|
-
/* @__PURE__ */
|
|
325
|
+
return /* @__PURE__ */ jsxs2("div", { className: "flex items-center", children: [
|
|
326
|
+
/* @__PURE__ */ jsx6(
|
|
437
327
|
"input",
|
|
438
328
|
{
|
|
439
329
|
onChange: () => {
|
|
@@ -448,19 +338,19 @@ var RadioOption = ({ name, isLarge, labelText, option, onSelect }) => {
|
|
|
448
338
|
className: `form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded ${isLarge ? "h-5 w-5" : "h-4 w-4"}`
|
|
449
339
|
}
|
|
450
340
|
),
|
|
451
|
-
typeof labelText === "string" ? /* @__PURE__ */
|
|
341
|
+
typeof labelText === "string" ? /* @__PURE__ */ jsx6("label", { htmlFor: option, className: "ml-2 block text-sm text-gray-900", children: labelText }) : /* @__PURE__ */ jsx6("label", { htmlFor: option, children: labelText })
|
|
452
342
|
] });
|
|
453
343
|
};
|
|
454
344
|
var RadioOption_default = RadioOption;
|
|
455
345
|
|
|
456
346
|
// src/Common/BottomAlert.tsx
|
|
457
347
|
import ReactDOM2 from "react-dom";
|
|
458
|
-
import { jsx as
|
|
348
|
+
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
459
349
|
var BottomAlert = ({ isDark, setDontShowAgain, dontShowAgain, title, borderColor, onDismissed, cancelText, confirmText, onConfirm, onCancel, isSingleAction, children, buttonColor }) => {
|
|
460
350
|
const dismiss = () => {
|
|
461
351
|
onDismissed == null ? void 0 : onDismissed();
|
|
462
352
|
};
|
|
463
|
-
return /* @__PURE__ */
|
|
353
|
+
return /* @__PURE__ */ jsx7(
|
|
464
354
|
"div",
|
|
465
355
|
{
|
|
466
356
|
className: "top-0 left-0 fixed w-full h-screen flex justify-center",
|
|
@@ -468,11 +358,11 @@ var BottomAlert = ({ isDark, setDontShowAgain, dontShowAgain, title, borderColor
|
|
|
468
358
|
background: isDark ? "rgba(0, 0, 0, 0.1)" : "rgba(255, 255, 255, 0.1)",
|
|
469
359
|
zIndex: 9999
|
|
470
360
|
},
|
|
471
|
-
children: /* @__PURE__ */
|
|
472
|
-
/* @__PURE__ */
|
|
473
|
-
/* @__PURE__ */
|
|
474
|
-
setDontShowAgain ? /* @__PURE__ */
|
|
475
|
-
/* @__PURE__ */
|
|
361
|
+
children: /* @__PURE__ */ jsx7("div", { className: "absolute top-0 w-full h-screen flex justify-center bg-gray-200/90 dark:bg-slate-800/50", children: /* @__PURE__ */ jsx7("div", { className: "absolute sm:w-1/2 w-full mx-auto shadow-xl rounded-md p-6 flex z-50 flex-col top-24 bg-white dark:bg-slate-900 overflow-clip rounded-bl-lg rounded-br-lg border-b-8 border-b-blue-500", children: /* @__PURE__ */ jsxs3("div", { style: { borderColor: borderColor || "#0ea5e9" }, children: [
|
|
362
|
+
/* @__PURE__ */ jsx7("h3", { className: "font-semibold font-header text-gray-700 dark:text-gray-300 text-xl", children: title }),
|
|
363
|
+
/* @__PURE__ */ jsx7("div", { className: "mt-2 text-lg", children }),
|
|
364
|
+
setDontShowAgain ? /* @__PURE__ */ jsxs3("div", { className: "flex items-center space-x-1", children: [
|
|
365
|
+
/* @__PURE__ */ jsx7(
|
|
476
366
|
"input",
|
|
477
367
|
{
|
|
478
368
|
onChange: () => {
|
|
@@ -484,9 +374,9 @@ var BottomAlert = ({ isDark, setDontShowAgain, dontShowAgain, title, borderColor
|
|
|
484
374
|
className: `form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded h-4 w-4`
|
|
485
375
|
}
|
|
486
376
|
),
|
|
487
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ jsx7("label", { htmlFor: "show_again_check", className: "dark:text-gray-200 text-gray-700", children: "Don't show again" })
|
|
488
378
|
] }) : null,
|
|
489
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ jsx7("div", { className: "mt-4 flex items-center justify-end space-x-4 z-10", children: isSingleAction ? /* @__PURE__ */ jsx7(
|
|
490
380
|
Button_default,
|
|
491
381
|
{
|
|
492
382
|
type: "button",
|
|
@@ -497,8 +387,8 @@ var BottomAlert = ({ isDark, setDontShowAgain, dontShowAgain, title, borderColor
|
|
|
497
387
|
},
|
|
498
388
|
children: confirmText || "Okay"
|
|
499
389
|
}
|
|
500
|
-
) : /* @__PURE__ */
|
|
501
|
-
/* @__PURE__ */
|
|
390
|
+
) : /* @__PURE__ */ jsxs3("div", { className: "w-1/3 flex justify-end space-x-4", children: [
|
|
391
|
+
/* @__PURE__ */ jsx7("div", { className: "w-full flex flex-col", children: /* @__PURE__ */ jsx7(
|
|
502
392
|
Button_default,
|
|
503
393
|
{
|
|
504
394
|
type: "button",
|
|
@@ -510,7 +400,7 @@ var BottomAlert = ({ isDark, setDontShowAgain, dontShowAgain, title, borderColor
|
|
|
510
400
|
children: cancelText || "Cancel"
|
|
511
401
|
}
|
|
512
402
|
) }),
|
|
513
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ jsx7("div", { className: "w-full flex flex-col", children: /* @__PURE__ */ jsx7(
|
|
514
404
|
Button_default,
|
|
515
405
|
{
|
|
516
406
|
type: "button",
|
|
@@ -530,49 +420,12 @@ var BottomAlert = ({ isDark, setDontShowAgain, dontShowAgain, title, borderColor
|
|
|
530
420
|
var BAWrapper = (props) => {
|
|
531
421
|
if (!props.isVisible) return null;
|
|
532
422
|
return ReactDOM2.createPortal(
|
|
533
|
-
/* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ jsx7(BottomAlert, __spreadValues({}, props)),
|
|
534
424
|
document.body
|
|
535
425
|
);
|
|
536
426
|
};
|
|
537
427
|
var BottomAlert_default = BAWrapper;
|
|
538
428
|
|
|
539
|
-
// src/Common/Container.tsx
|
|
540
|
-
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
541
|
-
var Container = ({ backgroundImage, style, children, onClick }) => {
|
|
542
|
-
return backgroundImage ? /* @__PURE__ */ jsx12(
|
|
543
|
-
"div",
|
|
544
|
-
{
|
|
545
|
-
style: __spreadValues({
|
|
546
|
-
backgroundImage,
|
|
547
|
-
backgroundSize: "cover"
|
|
548
|
-
}, style),
|
|
549
|
-
className: "w-full md:min-h-screen dark:bg-slate-950 mx-auto overflow-y-auto overflow-x-clip px-0 md:px-2 sm:py-4 py-1 relative",
|
|
550
|
-
onClick,
|
|
551
|
-
children: children ? children : null
|
|
552
|
-
}
|
|
553
|
-
) : /* @__PURE__ */ jsx12(
|
|
554
|
-
"div",
|
|
555
|
-
{
|
|
556
|
-
className: `w-full dark:bg-slate-950 mx-auto overflow-y-auto overflow-x-clip px-0 sm:px-16 relative pt-20`,
|
|
557
|
-
onClick,
|
|
558
|
-
style: style || { minHeight: "100vh" },
|
|
559
|
-
children: children ? children : null
|
|
560
|
-
}
|
|
561
|
-
);
|
|
562
|
-
};
|
|
563
|
-
var Container_default = Container;
|
|
564
|
-
|
|
565
|
-
// src/Common/fieldStyle.ts
|
|
566
|
-
var 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";
|
|
567
|
-
var 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";
|
|
568
|
-
var 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";
|
|
569
|
-
var 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";
|
|
570
|
-
var 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";
|
|
571
|
-
var tippyClassname = "p-2 bg-slate-600 dark:bg-slate-900 opacity-90 text-white font-medium font-header rounded-lg";
|
|
572
|
-
var headerTippyClass = "rounded-lg p-2 bg-slate-950 opacity-95 text-white font-medium";
|
|
573
|
-
var 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";
|
|
574
|
-
var 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";
|
|
575
|
-
|
|
576
429
|
// src/Common/Tippy.tsx
|
|
577
430
|
import { useState as useState2, useRef, useEffect as useEffect2 } from "react";
|
|
578
431
|
import {
|
|
@@ -588,7 +441,7 @@ import {
|
|
|
588
441
|
FloatingArrow,
|
|
589
442
|
FloatingPortal
|
|
590
443
|
} from "@floating-ui/react";
|
|
591
|
-
import { Fragment, jsx as
|
|
444
|
+
import { Fragment, jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
592
445
|
var Tippy = ({ children, content, placement = "top", className = "", wrapperClassname = "", disabled = false, arrow: useArrow = false, visible }) => {
|
|
593
446
|
const [isOpen, setIsOpen] = useState2(false);
|
|
594
447
|
const arrowRef = useRef(null);
|
|
@@ -624,9 +477,9 @@ var Tippy = ({ children, content, placement = "top", className = "", wrapperClas
|
|
|
624
477
|
dismiss,
|
|
625
478
|
role
|
|
626
479
|
]);
|
|
627
|
-
return /* @__PURE__ */
|
|
628
|
-
isOpen && /* @__PURE__ */
|
|
629
|
-
/* @__PURE__ */
|
|
480
|
+
return /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
481
|
+
isOpen && /* @__PURE__ */ jsxs4(FloatingPortal, { children: [
|
|
482
|
+
/* @__PURE__ */ jsx8(
|
|
630
483
|
"div",
|
|
631
484
|
__spreadProps(__spreadValues({
|
|
632
485
|
ref: refs.setFloating,
|
|
@@ -641,7 +494,7 @@ var Tippy = ({ children, content, placement = "top", className = "", wrapperClas
|
|
|
641
494
|
children: content
|
|
642
495
|
})
|
|
643
496
|
),
|
|
644
|
-
useArrow && /* @__PURE__ */
|
|
497
|
+
useArrow && /* @__PURE__ */ jsx8(
|
|
645
498
|
FloatingArrow,
|
|
646
499
|
{
|
|
647
500
|
ref: arrowRef,
|
|
@@ -651,22 +504,22 @@ var Tippy = ({ children, content, placement = "top", className = "", wrapperClas
|
|
|
651
504
|
}
|
|
652
505
|
)
|
|
653
506
|
] }),
|
|
654
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ jsx8("div", __spreadProps(__spreadValues({ ref: refs.setReference }, getReferenceProps()), { className: wrapperClassname, children }))
|
|
655
508
|
] });
|
|
656
509
|
};
|
|
657
510
|
var Tippy_default = Tippy;
|
|
658
511
|
|
|
659
512
|
// src/Common/IconInfo.tsx
|
|
660
|
-
import { jsx as
|
|
513
|
+
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
661
514
|
var IconInfo = ({ content, icon, number, color }) => {
|
|
662
|
-
return /* @__PURE__ */
|
|
515
|
+
return /* @__PURE__ */ jsx9("div", { className: "flex flex-shrink-0 items-center justify-center w-8 h-8 rounded-full bg-slate-400 dark:bg-slate-600 dark:border dark:border-white", children: /* @__PURE__ */ jsx9(
|
|
663
516
|
Tippy_default,
|
|
664
517
|
{
|
|
665
518
|
className: tippyClassname,
|
|
666
519
|
content,
|
|
667
|
-
children: /* @__PURE__ */
|
|
520
|
+
children: /* @__PURE__ */ jsxs5("div", { className: "relative", children: [
|
|
668
521
|
icon,
|
|
669
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ jsx9("p", { className: `absolute -bottom-1 ${number > 9 ? number > 99 ? number > 999 ? "w-8 h-8 -right-6 -bottom-3" : "w-6 h-6 -right-5 -bottom-2" : "w-5 h-5 -right-3" : "w-4 -right-3"} flex justify-center items-center text-xs font-sans rounded-full text-white ${color || "bg-secondary"}`, children: number })
|
|
670
523
|
] })
|
|
671
524
|
}
|
|
672
525
|
) });
|
|
@@ -677,37 +530,37 @@ var IconInfo_default = IconInfo;
|
|
|
677
530
|
import Link from "next/link";
|
|
678
531
|
|
|
679
532
|
// src/Icons/XIcon.tsx
|
|
680
|
-
import { jsx as
|
|
533
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
681
534
|
var XIcon = ({ className }) => {
|
|
682
|
-
return /* @__PURE__ */
|
|
535
|
+
return /* @__PURE__ */ jsx10("svg", { xmlns: "http://www.w3.org/2000/svg", className: className || "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx10("path", { fillRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z", clipRule: "evenodd" }) });
|
|
683
536
|
};
|
|
684
537
|
var XIcon_default = XIcon;
|
|
685
538
|
|
|
686
539
|
// src/Common/Modal.tsx
|
|
687
|
-
import { Fragment as Fragment2, jsx as
|
|
540
|
+
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
688
541
|
var Modal = (_a) => {
|
|
689
542
|
var _b = _a, { visible, children, fullscreen, displayDark, dismissLink, bgOpacity, onDismissed, dismissable = true, dismissOnBackdropClick = true, style } = _b, props = __objRest(_b, ["visible", "children", "fullscreen", "displayDark", "dismissLink", "bgOpacity", "onDismissed", "dismissable", "dismissOnBackdropClick", "style"]);
|
|
690
543
|
if (!visible) return null;
|
|
691
|
-
return /* @__PURE__ */
|
|
544
|
+
return /* @__PURE__ */ jsx11(Overlay_default, __spreadProps(__spreadValues({ visible, onClick: dismissOnBackdropClick ? onDismissed : void 0, isDark: displayDark, withContainer: true }, props), { children: /* @__PURE__ */ jsx11(
|
|
692
545
|
"div",
|
|
693
546
|
{
|
|
694
547
|
className: `${displayDark && "dark"} bg-slate-900/20 fixed inset-0 flex items-center justify-center`,
|
|
695
548
|
style: { zIndex: 1e4 },
|
|
696
|
-
children: /* @__PURE__ */
|
|
697
|
-
/* @__PURE__ */
|
|
549
|
+
children: /* @__PURE__ */ jsxs6("div", { className: ["relative mx-1 w-full md:mx-auto md:w-3/4 lg:w-1/2", fullscreen && `md:w-5/6 lg:w-5/6`].join(" "), children: [
|
|
550
|
+
/* @__PURE__ */ jsx11(Fragment2, { children: dismissLink ? /* @__PURE__ */ jsx11(
|
|
698
551
|
Link,
|
|
699
552
|
{
|
|
700
553
|
href: dismissLink,
|
|
701
554
|
scroll: false,
|
|
702
|
-
children: /* @__PURE__ */
|
|
555
|
+
children: /* @__PURE__ */ jsx11("div", { onClick: onDismissed, children: /* @__PURE__ */ jsx11(XIcon_default, { className: "absolute h-5 w-5 top-5 sm:top-20 right-4 transition-colors cursor-pointer duration-75 hover:text-blue-500 dark:text-gray-200 dark:hover:text-blue-500" }) })
|
|
703
556
|
}
|
|
704
|
-
) : dismissable ? /* @__PURE__ */
|
|
557
|
+
) : dismissable ? /* @__PURE__ */ jsx11(
|
|
705
558
|
"button",
|
|
706
559
|
{
|
|
707
560
|
className: "absolute top-5 sm:top-20 right-4 transition-colors cursor-pointer duration-75 hover:text-blue-500 dark:text-gray-200 dark:hover:text-blue-500",
|
|
708
561
|
type: "button",
|
|
709
562
|
onClick: onDismissed,
|
|
710
|
-
children: /* @__PURE__ */
|
|
563
|
+
children: /* @__PURE__ */ jsx11(
|
|
711
564
|
XIcon_default,
|
|
712
565
|
{
|
|
713
566
|
className: "h-5 w-5"
|
|
@@ -715,13 +568,13 @@ var Modal = (_a) => {
|
|
|
715
568
|
)
|
|
716
569
|
}
|
|
717
570
|
) : null }),
|
|
718
|
-
/* @__PURE__ */
|
|
571
|
+
/* @__PURE__ */ jsx11(
|
|
719
572
|
"div",
|
|
720
573
|
{
|
|
721
574
|
className: "my-1 sm:mt-16 bg-white dark:bg-slate-900 shadow-lg border border-gray-100 dark:border-none rounded-xl overflow-x-visible overflow-y-visible no-scrollbar",
|
|
722
575
|
onClick: (e) => e.stopPropagation(),
|
|
723
576
|
style: __spreadValues({ maxHeight: "calc(100vh - 6rem)" }, style),
|
|
724
|
-
children: /* @__PURE__ */
|
|
577
|
+
children: /* @__PURE__ */ jsx11("div", { className: "p-4 sm:p-10", children: /* @__PURE__ */ jsx11("div", { className: "mt-8 sm:mt-0", children }) })
|
|
725
578
|
}
|
|
726
579
|
)
|
|
727
580
|
] })
|
|
@@ -730,24 +583,9 @@ var Modal = (_a) => {
|
|
|
730
583
|
};
|
|
731
584
|
var Modal_default = Modal;
|
|
732
585
|
|
|
733
|
-
// src/Common/NoResults.tsx
|
|
734
|
-
import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
735
|
-
var HEIGHT = 160;
|
|
736
|
-
var WIDTH = HEIGHT * (16 / 9);
|
|
737
|
-
var NoResults = ({ loading, message }) => {
|
|
738
|
-
return /* @__PURE__ */ jsxs8("div", { className: "relative w-full flex justify-center items-center", children: [
|
|
739
|
-
/* @__PURE__ */ jsxs8("div", { className: "flex justify-start w-full space-x-2 py-3 p-4 bg-slate-100 dark:bg-slate-800 rounded-md", children: [
|
|
740
|
-
/* @__PURE__ */ jsx17("div", { style: { width: `calc(${WIDTH}px + 1rem)`, height: 320 }, className: "rounded-lg overflow-hidden cursor-pointer hover:shadow-md transition-shadow duration-150 px-2 pt-2 bg-slate-200 dark:bg-slate-700 animate-pulse" }),
|
|
741
|
-
/* @__PURE__ */ jsx17("div", { style: { width: `calc(${WIDTH}px + 1rem)`, height: 320 }, className: "rounded-lg overflow-hidden cursor-pointer hover:shadow-md transition-shadow duration-150 px-2 pt-2 bg-slate-200 dark:bg-slate-700 animate-pulse" })
|
|
742
|
-
] }),
|
|
743
|
-
!loading && /* @__PURE__ */ jsx17("div", { className: "absolute w-full h-full flex justify-center items-center m-auto", children: /* @__PURE__ */ jsx17("div", { className: "p-4 rounded-lg bg-white dark:bg-slate-700 shadow-xl", children: /* @__PURE__ */ jsx17("p", { className: "font-semibold text-lg text-gray-700 dark:text-gray-300", children: message || "No results" }) }) })
|
|
744
|
-
] });
|
|
745
|
-
};
|
|
746
|
-
var NoResults_default = NoResults;
|
|
747
|
-
|
|
748
586
|
// src/Common/NoticeBox.tsx
|
|
749
587
|
import { useEffect as useEffect3, useMemo as useMemo4, useState as useState3 } from "react";
|
|
750
|
-
import { jsx as
|
|
588
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
751
589
|
var NoticeBox = ({ children, type, isDismissible, isVisible, onDismiss }) => {
|
|
752
590
|
const [visible, setVisible] = useState3(true);
|
|
753
591
|
const styles = useMemo4(() => {
|
|
@@ -768,15 +606,15 @@ var NoticeBox = ({ children, type, isDismissible, isVisible, onDismiss }) => {
|
|
|
768
606
|
setVisible(isVisible);
|
|
769
607
|
}, [isVisible]);
|
|
770
608
|
if (!isVisible) return null;
|
|
771
|
-
return /* @__PURE__ */
|
|
609
|
+
return /* @__PURE__ */ jsx12(
|
|
772
610
|
"div",
|
|
773
611
|
{
|
|
774
612
|
style: {
|
|
775
613
|
zIndex: 100
|
|
776
614
|
},
|
|
777
615
|
className: styles,
|
|
778
|
-
children: /* @__PURE__ */
|
|
779
|
-
isDismissible && /* @__PURE__ */
|
|
616
|
+
children: /* @__PURE__ */ jsxs7("div", { className: "relative", children: [
|
|
617
|
+
isDismissible && /* @__PURE__ */ jsx12(
|
|
780
618
|
"button",
|
|
781
619
|
{
|
|
782
620
|
type: "button",
|
|
@@ -785,7 +623,7 @@ var NoticeBox = ({ children, type, isDismissible, isVisible, onDismiss }) => {
|
|
|
785
623
|
onDismiss == null ? void 0 : onDismiss();
|
|
786
624
|
},
|
|
787
625
|
className: "absolute bottom-1 right-1 transition-colors cursor-pointer duration-75 hover:text-blue-500",
|
|
788
|
-
children: /* @__PURE__ */
|
|
626
|
+
children: /* @__PURE__ */ jsx12(XIcon_default, { className: "h-5 w-5" })
|
|
789
627
|
}
|
|
790
628
|
),
|
|
791
629
|
children
|
|
@@ -795,58 +633,51 @@ var NoticeBox = ({ children, type, isDismissible, isVisible, onDismiss }) => {
|
|
|
795
633
|
};
|
|
796
634
|
var NoticeBox_default = NoticeBox;
|
|
797
635
|
|
|
798
|
-
// src/Common/Pill.tsx
|
|
799
|
-
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
800
|
-
var Pill = ({ text }) => {
|
|
801
|
-
return /* @__PURE__ */ jsx19("span", { className: "rounded-full px-3 py-1 text-sm font-header font-medium bg-white dark:bg-slate-900 text-gray-700 dark:text-gray-300 mr-2 mb-2", children: text });
|
|
802
|
-
};
|
|
803
|
-
var Pill_default = Pill;
|
|
804
|
-
|
|
805
636
|
// src/Icons/StarIcon.tsx
|
|
806
|
-
import { jsx as
|
|
637
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
807
638
|
var StarIcon = ({ className, percentage, color }) => {
|
|
808
|
-
return /* @__PURE__ */
|
|
809
|
-
/* @__PURE__ */
|
|
810
|
-
/* @__PURE__ */
|
|
811
|
-
/* @__PURE__ */
|
|
639
|
+
return /* @__PURE__ */ jsxs8("svg", { xmlns: "http://www.w3.org/2000/svg", className: className || "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: [
|
|
640
|
+
/* @__PURE__ */ jsx13("defs", { children: /* @__PURE__ */ jsxs8("linearGradient", { id: "grad", children: [
|
|
641
|
+
/* @__PURE__ */ jsx13("stop", { offset: `${(percentage || 0.5) * 100}%`, "stop-color": color ? color : "#4b5563" }),
|
|
642
|
+
/* @__PURE__ */ jsx13("stop", { offset: `${100 - (percentage || 0.5) * 100}%`, "stop-color": "white" })
|
|
812
643
|
] }) }),
|
|
813
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ jsx13("path", { fill: "url(#grad)", d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" })
|
|
814
645
|
] });
|
|
815
646
|
};
|
|
816
647
|
var StarIcon_default = StarIcon;
|
|
817
648
|
|
|
818
649
|
// src/Icons/StarIconSolid.tsx
|
|
819
|
-
import { jsx as
|
|
650
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
820
651
|
var StartIconSolid = ({ className }) => {
|
|
821
|
-
return /* @__PURE__ */
|
|
652
|
+
return /* @__PURE__ */ jsx14("svg", { xmlns: "http://www.w3.org/2000/svg", className: className || "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx14("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) });
|
|
822
653
|
};
|
|
823
654
|
var StarIconSolid_default = StartIconSolid;
|
|
824
655
|
|
|
825
656
|
// src/Common/RatingStars.tsx
|
|
826
|
-
import { jsx as
|
|
657
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
827
658
|
var RatingStars = ({ avgRating, large }) => {
|
|
828
659
|
const icons = [1, 2, 3, 4, 5].map((el) => {
|
|
829
660
|
if (avgRating === 0) {
|
|
830
|
-
return /* @__PURE__ */
|
|
661
|
+
return /* @__PURE__ */ jsx15(StarIconSolid_default, { className: `${large ? "h-5 w-5" : "h-3 w-3"} text-gray-200 dark:text-gray-400` }, `rating_star_${el}`);
|
|
831
662
|
}
|
|
832
663
|
if (Number.isInteger(avgRating)) {
|
|
833
664
|
if (el <= avgRating) {
|
|
834
|
-
return /* @__PURE__ */
|
|
665
|
+
return /* @__PURE__ */ jsx15(StarIconSolid_default, { className: `${large ? "h-5 w-5" : "h-3 w-3"} text-blue-500` }, `rating_star_${el}`);
|
|
835
666
|
}
|
|
836
|
-
return /* @__PURE__ */
|
|
667
|
+
return /* @__PURE__ */ jsx15(StarIconSolid_default, { className: `${large ? "h-5 w-5" : "h-3 w-3"} text-gray-200 dark:text-gray-400` }, `rating_star_${el}`);
|
|
837
668
|
}
|
|
838
669
|
const whole = Math.floor(avgRating);
|
|
839
670
|
if (el <= whole) {
|
|
840
|
-
return /* @__PURE__ */
|
|
671
|
+
return /* @__PURE__ */ jsx15(StarIconSolid_default, { className: `${large ? "h-5 w-5" : "h-3 w-3"} text-blue-500` }, `rating_star_${el}`);
|
|
841
672
|
}
|
|
842
|
-
return /* @__PURE__ */
|
|
673
|
+
return /* @__PURE__ */ jsx15(StarIcon_default, { percentage: avgRating - whole, color: "#00b4d8", className: `${large ? "h-5 w-5" : "h-3 w-3"}` }, `rating_star_${el}`);
|
|
843
674
|
});
|
|
844
|
-
return /* @__PURE__ */
|
|
675
|
+
return /* @__PURE__ */ jsx15(
|
|
845
676
|
Tippy_default,
|
|
846
677
|
{
|
|
847
678
|
content: avgRating === 0 ? "No ratings" : "Average Rating " + avgRating,
|
|
848
679
|
className: "bg-gray-800 opacity-90 text-white rounded-md px-2 py-1 cursor-pointer h-fit",
|
|
849
|
-
children: /* @__PURE__ */
|
|
680
|
+
children: /* @__PURE__ */ jsx15("div", { className: "flex items-center space-x-0 justify-start", children: icons })
|
|
850
681
|
}
|
|
851
682
|
);
|
|
852
683
|
};
|
|
@@ -855,12 +686,12 @@ var RatingStars_default = RatingStars;
|
|
|
855
686
|
// src/Common/Slider.tsx
|
|
856
687
|
import { useState as useState4 } from "react";
|
|
857
688
|
import { useDebouncedCallback } from "use-debounce";
|
|
858
|
-
import { jsx as
|
|
689
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
859
690
|
var Slider = ({ min, max, step, value, onChange }) => {
|
|
860
691
|
const handleChange = (event) => {
|
|
861
692
|
onChange(parseFloat(event.target.value));
|
|
862
693
|
};
|
|
863
|
-
return /* @__PURE__ */
|
|
694
|
+
return /* @__PURE__ */ jsx16(
|
|
864
695
|
"input",
|
|
865
696
|
{
|
|
866
697
|
type: "range",
|
|
@@ -878,7 +709,7 @@ var DebouncedSlider = ({ min, max, handleUpdate, initialValue }) => {
|
|
|
878
709
|
const debouncedUpdate = useDebouncedCallback((v) => {
|
|
879
710
|
handleUpdate(v);
|
|
880
711
|
}, 120, { trailing: true, leading: false });
|
|
881
|
-
return /* @__PURE__ */
|
|
712
|
+
return /* @__PURE__ */ jsx16(
|
|
882
713
|
Slider,
|
|
883
714
|
{
|
|
884
715
|
min,
|
|
@@ -895,40 +726,18 @@ var DebouncedSlider = ({ min, max, handleUpdate, initialValue }) => {
|
|
|
895
726
|
Slider.Debounced = DebouncedSlider;
|
|
896
727
|
var Slider_default = Slider;
|
|
897
728
|
|
|
898
|
-
// src/Common/StepsComponent.tsx
|
|
899
|
-
import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
900
|
-
var StepsComponent = ({ steps, activeStep, onStepPress }) => {
|
|
901
|
-
return /* @__PURE__ */ jsx24("div", { className: "flex justify-between items-center w-full p-1 mb-2", children: steps.map((step, index) => {
|
|
902
|
-
return /* @__PURE__ */ jsx24("div", { className: "flex justify-center items-center space-x-2 w-full", children: /* @__PURE__ */ jsx24("div", { className: "flex flex-col items-center", children: /* @__PURE__ */ jsx24(
|
|
903
|
-
"button",
|
|
904
|
-
{
|
|
905
|
-
type: "button",
|
|
906
|
-
onClick: () => onStepPress(index),
|
|
907
|
-
className: `flex items-center space-x-2 px-4 py-2 rounded-lg min-w-10 md:min-w-20 sm:min-w-40 font-header transition-all duration-150
|
|
908
|
-
${activeStep === index ? "bg-primary text-white shadow-lg scale-110 border-2 border-primary" : "bg-gray-100 dark:bg-slate-800 text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-slate-700 border-2 border-transparent hover:border-primary/30"}`,
|
|
909
|
-
children: /* @__PURE__ */ jsxs11("span", { className: "font-medium truncate", children: [
|
|
910
|
-
index + 1,
|
|
911
|
-
". ",
|
|
912
|
-
step.label
|
|
913
|
-
] })
|
|
914
|
-
}
|
|
915
|
-
) }) }, `step_${index}_${step.label}`);
|
|
916
|
-
}) });
|
|
917
|
-
};
|
|
918
|
-
var StepsComponent_default = StepsComponent;
|
|
919
|
-
|
|
920
729
|
// src/Common/ToggleSwitch.tsx
|
|
921
730
|
import { useField as useField3 } from "formik";
|
|
922
731
|
import { motion as motion3 } from "framer-motion";
|
|
923
|
-
import { jsx as
|
|
732
|
+
import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
924
733
|
var Formik = ({ label, name }) => {
|
|
925
734
|
const [{ value }, , { setValue }] = useField3(name);
|
|
926
735
|
const handleChange = (e) => {
|
|
927
736
|
setValue(e.target.checked);
|
|
928
737
|
};
|
|
929
|
-
return /* @__PURE__ */
|
|
930
|
-
/* @__PURE__ */
|
|
931
|
-
/* @__PURE__ */
|
|
738
|
+
return /* @__PURE__ */ jsxs9("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
|
|
739
|
+
/* @__PURE__ */ jsxs9("div", { className: "relative", children: [
|
|
740
|
+
/* @__PURE__ */ jsx17(
|
|
932
741
|
"input",
|
|
933
742
|
{
|
|
934
743
|
type: "checkbox",
|
|
@@ -937,7 +746,7 @@ var Formik = ({ label, name }) => {
|
|
|
937
746
|
onChange: handleChange
|
|
938
747
|
}
|
|
939
748
|
),
|
|
940
|
-
/* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ jsx17("div", { className: `w-10 h-6 rounded-full p-[4px] transition-colors duration-300 ${value ? "bg-[#00b4d8]" : "bg-[#64748b]"}`, children: /* @__PURE__ */ jsx17(
|
|
941
750
|
motion3.div,
|
|
942
751
|
{
|
|
943
752
|
className: "w-4 h-4 bg-white rounded-full absolute top-1",
|
|
@@ -949,16 +758,16 @@ var Formik = ({ label, name }) => {
|
|
|
949
758
|
}
|
|
950
759
|
) })
|
|
951
760
|
] }),
|
|
952
|
-
/* @__PURE__ */
|
|
761
|
+
/* @__PURE__ */ jsx17("span", { className: "text-sm font-medium text-gray-800 dark:text-gray-200", children: label })
|
|
953
762
|
] });
|
|
954
763
|
};
|
|
955
764
|
var ToggleSwitch = ({ label, onChange, value }) => {
|
|
956
765
|
const handleChange = (e) => {
|
|
957
766
|
onChange(e.target.checked);
|
|
958
767
|
};
|
|
959
|
-
return /* @__PURE__ */
|
|
960
|
-
/* @__PURE__ */
|
|
961
|
-
/* @__PURE__ */
|
|
768
|
+
return /* @__PURE__ */ jsxs9("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
|
|
769
|
+
/* @__PURE__ */ jsxs9("div", { className: "relative", children: [
|
|
770
|
+
/* @__PURE__ */ jsx17(
|
|
962
771
|
"input",
|
|
963
772
|
{
|
|
964
773
|
type: "checkbox",
|
|
@@ -967,7 +776,7 @@ var ToggleSwitch = ({ label, onChange, value }) => {
|
|
|
967
776
|
onChange: handleChange
|
|
968
777
|
}
|
|
969
778
|
),
|
|
970
|
-
/* @__PURE__ */
|
|
779
|
+
/* @__PURE__ */ jsx17("div", { className: `w-10 h-6 rounded-full p-[4px] transition-colors duration-300 ${value ? "bg-[#00b4d8]" : "bg-[#64748b]"}`, children: /* @__PURE__ */ jsx17(
|
|
971
780
|
motion3.div,
|
|
972
781
|
{
|
|
973
782
|
className: "w-4 h-4 bg-white rounded-full absolute top-1",
|
|
@@ -979,7 +788,7 @@ var ToggleSwitch = ({ label, onChange, value }) => {
|
|
|
979
788
|
}
|
|
980
789
|
) })
|
|
981
790
|
] }),
|
|
982
|
-
/* @__PURE__ */
|
|
791
|
+
/* @__PURE__ */ jsx17("span", { className: "text-sm font-medium text-gray-800 dark:text-gray-200", children: label })
|
|
983
792
|
] });
|
|
984
793
|
};
|
|
985
794
|
ToggleSwitch.Formik = Formik;
|
|
@@ -989,24 +798,24 @@ var ToggleSwitch_default = ToggleSwitch;
|
|
|
989
798
|
import { motion as motion4 } from "framer-motion";
|
|
990
799
|
|
|
991
800
|
// src/Icons/PlusCircleIcon.tsx
|
|
992
|
-
import { jsx as
|
|
801
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
993
802
|
var PlusCircleIcon = ({ className }) => {
|
|
994
|
-
return /* @__PURE__ */
|
|
803
|
+
return /* @__PURE__ */ jsx18("svg", { xmlns: "http://www.w3.org/2000/svg", className: className || "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx18("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" }) });
|
|
995
804
|
};
|
|
996
805
|
var PlusCircleIcon_default = PlusCircleIcon;
|
|
997
806
|
|
|
998
807
|
// src/Icons/ArrowCircleRight.tsx
|
|
999
|
-
import { jsx as
|
|
808
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1000
809
|
var StartIconSolid2 = ({ className }) => {
|
|
1001
|
-
return /* @__PURE__ */
|
|
810
|
+
return /* @__PURE__ */ jsx19("svg", { xmlns: "http://www.w3.org/2000/svg", className: className || "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx19("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z" }) });
|
|
1002
811
|
};
|
|
1003
812
|
var ArrowCircleRight_default = StartIconSolid2;
|
|
1004
813
|
|
|
1005
814
|
// src/Common/UserContentSwitcher.tsx
|
|
1006
|
-
import { jsx as
|
|
815
|
+
import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1007
816
|
var UserContentSwitcher = ({ icon1: Icon1, icon2: Icon2, setGalleryMode, galleryMode, title1, title2 }) => {
|
|
1008
|
-
return /* @__PURE__ */
|
|
1009
|
-
/* @__PURE__ */
|
|
817
|
+
return /* @__PURE__ */ jsxs10("div", { className: "relative flex flex-row items-center my-2 bg-slate-100 dark:bg-slate-900 w-full h-14 rounded-lg", children: [
|
|
818
|
+
/* @__PURE__ */ jsx20(
|
|
1010
819
|
motion4.div,
|
|
1011
820
|
{
|
|
1012
821
|
className: "absolute w-1/2 h-11 rounded-md bg-white dark:bg-slate-600",
|
|
@@ -1020,25 +829,25 @@ var UserContentSwitcher = ({ icon1: Icon1, icon2: Icon2, setGalleryMode, gallery
|
|
|
1020
829
|
}
|
|
1021
830
|
}
|
|
1022
831
|
),
|
|
1023
|
-
/* @__PURE__ */
|
|
832
|
+
/* @__PURE__ */ jsxs10(
|
|
1024
833
|
"button",
|
|
1025
834
|
{
|
|
1026
835
|
onClick: () => setGalleryMode(title1.toLowerCase()),
|
|
1027
836
|
className: "py-2 flex flex-row w-1/2 justify-center items-center gap-1 z-10",
|
|
1028
837
|
children: [
|
|
1029
|
-
/* @__PURE__ */
|
|
838
|
+
/* @__PURE__ */ jsx20(
|
|
1030
839
|
"span",
|
|
1031
840
|
{
|
|
1032
841
|
className: `truncate ${galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`,
|
|
1033
842
|
children: title1.toLocaleUpperCase()
|
|
1034
843
|
}
|
|
1035
844
|
),
|
|
1036
|
-
Icon1 ? /* @__PURE__ */
|
|
845
|
+
Icon1 ? /* @__PURE__ */ jsx20(
|
|
1037
846
|
Icon1,
|
|
1038
847
|
{
|
|
1039
848
|
className: `h-5 w-5 ${galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`
|
|
1040
849
|
}
|
|
1041
|
-
) : /* @__PURE__ */
|
|
850
|
+
) : /* @__PURE__ */ jsx20(
|
|
1042
851
|
PlusCircleIcon_default,
|
|
1043
852
|
{
|
|
1044
853
|
className: `h-5 w-5 ${galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`
|
|
@@ -1047,25 +856,25 @@ var UserContentSwitcher = ({ icon1: Icon1, icon2: Icon2, setGalleryMode, gallery
|
|
|
1047
856
|
]
|
|
1048
857
|
}
|
|
1049
858
|
),
|
|
1050
|
-
/* @__PURE__ */
|
|
859
|
+
/* @__PURE__ */ jsxs10(
|
|
1051
860
|
"button",
|
|
1052
861
|
{
|
|
1053
862
|
onClick: () => setGalleryMode(title2.toLowerCase()),
|
|
1054
863
|
className: "py-2 flex flex-row w-1/2 justify-center items-center gap-1 z-10",
|
|
1055
864
|
children: [
|
|
1056
|
-
/* @__PURE__ */
|
|
865
|
+
/* @__PURE__ */ jsx20(
|
|
1057
866
|
"span",
|
|
1058
867
|
{
|
|
1059
868
|
className: `truncate ${galleryMode === title2.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`,
|
|
1060
869
|
children: title2.toLocaleUpperCase()
|
|
1061
870
|
}
|
|
1062
871
|
),
|
|
1063
|
-
Icon2 ? /* @__PURE__ */
|
|
872
|
+
Icon2 ? /* @__PURE__ */ jsx20(
|
|
1064
873
|
Icon2,
|
|
1065
874
|
{
|
|
1066
875
|
className: `h-5 w-5 ${galleryMode === title2.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`
|
|
1067
876
|
}
|
|
1068
|
-
) : /* @__PURE__ */
|
|
877
|
+
) : /* @__PURE__ */ jsx20(
|
|
1069
878
|
ArrowCircleRight_default,
|
|
1070
879
|
{
|
|
1071
880
|
className: `h-5 w-5 ${galleryMode === title2.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`
|
|
@@ -1078,17 +887,10 @@ var UserContentSwitcher = ({ icon1: Icon1, icon2: Icon2, setGalleryMode, gallery
|
|
|
1078
887
|
};
|
|
1079
888
|
var UserContentSwitcher_default = UserContentSwitcher;
|
|
1080
889
|
|
|
1081
|
-
// src/Fade/Fade.tsx
|
|
1082
|
-
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1083
|
-
var Fade = ({ children, inProp }) => {
|
|
1084
|
-
return /* @__PURE__ */ jsx29("div", { className: "animate-fade-in", children });
|
|
1085
|
-
};
|
|
1086
|
-
var Fade_default = Fade;
|
|
1087
|
-
|
|
1088
890
|
// src/ProgressBar/ProgressBarSimple.tsx
|
|
1089
|
-
import { jsx as
|
|
891
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1090
892
|
var ProgressBarSimple = ({ progress, color, height = 10, backgroundColor = "#ccc" }) => {
|
|
1091
|
-
return /* @__PURE__ */
|
|
893
|
+
return /* @__PURE__ */ jsx21("div", { className: "w-full", children: /* @__PURE__ */ jsx21(
|
|
1092
894
|
"div",
|
|
1093
895
|
{
|
|
1094
896
|
className: "w-full overflow-hidden transition-all duration-150 ease-in-out",
|
|
@@ -1097,7 +899,7 @@ var ProgressBarSimple = ({ progress, color, height = 10, backgroundColor = "#ccc
|
|
|
1097
899
|
height: `${height}px`,
|
|
1098
900
|
borderRadius: `${height / 2}px`
|
|
1099
901
|
},
|
|
1100
|
-
children: /* @__PURE__ */
|
|
902
|
+
children: /* @__PURE__ */ jsx21(
|
|
1101
903
|
"div",
|
|
1102
904
|
{
|
|
1103
905
|
className: "transition-all duration-150 ease-in-out",
|
|
@@ -1115,8 +917,8 @@ var ProgressBarSimple = ({ progress, color, height = 10, backgroundColor = "#ccc
|
|
|
1115
917
|
var ProgressBarSimple_default = ProgressBarSimple;
|
|
1116
918
|
|
|
1117
919
|
// src/ProgressBar/ProgressBar.tsx
|
|
1118
|
-
import { jsx as
|
|
1119
|
-
var ProgressBar = ({ progress }) => /* @__PURE__ */
|
|
920
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
921
|
+
var ProgressBar = ({ progress }) => /* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */ jsx22("div", { className: "-mt-2 mb-6", children: /* @__PURE__ */ jsx22("div", { className: "bg-gray-100 rounded-full h-2", children: /* @__PURE__ */ jsx22(
|
|
1120
922
|
"div",
|
|
1121
923
|
{
|
|
1122
924
|
className: `rounded-full h-2 ${progress === 100 ? "bg-green-400" : "bg-gray-100"}`,
|
|
@@ -1128,18 +930,18 @@ var ProgressBar = ({ progress }) => /* @__PURE__ */ jsx31("div", { children: /*
|
|
|
1128
930
|
}
|
|
1129
931
|
) }) }) });
|
|
1130
932
|
var ProgressStepBar = ({ steps, stepIndex, onStepClick, color }) => {
|
|
1131
|
-
return /* @__PURE__ */
|
|
1132
|
-
return /* @__PURE__ */
|
|
933
|
+
return /* @__PURE__ */ jsx22("div", { className: "flex w-full items-center space-x-0.5 -mt-1 overflow-hidden", children: steps.map((el, i) => {
|
|
934
|
+
return /* @__PURE__ */ jsx22("div", { className: "flex-1 relative", children: /* @__PURE__ */ jsx22(
|
|
1133
935
|
Tippy_default,
|
|
1134
936
|
{
|
|
1135
937
|
content: el.label,
|
|
1136
938
|
className: tippyClassname,
|
|
1137
|
-
children: /* @__PURE__ */
|
|
939
|
+
children: /* @__PURE__ */ jsx22("div", { className: "mb-4", children: /* @__PURE__ */ jsx22(
|
|
1138
940
|
"div",
|
|
1139
941
|
{
|
|
1140
942
|
onClick: () => onStepClick == null ? void 0 : onStepClick(i),
|
|
1141
943
|
className: "cursor-pointer bg-gray-100 rounded-full h-2 overflow-hidden",
|
|
1142
|
-
children: /* @__PURE__ */
|
|
944
|
+
children: /* @__PURE__ */ jsx22(
|
|
1143
945
|
"div",
|
|
1144
946
|
{
|
|
1145
947
|
className: `cursor-pointer rounded-full h-2 ${stepIndex >= i ? "bg-green-400" : "bg-gray-100"}`,
|
|
@@ -1159,7 +961,7 @@ ProgressBar.Step = ProgressStepBar;
|
|
|
1159
961
|
var ProgressBar_default = ProgressBar;
|
|
1160
962
|
|
|
1161
963
|
// src/ProgressBar/CircleProgress.tsx
|
|
1162
|
-
import { jsx as
|
|
964
|
+
import { jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1163
965
|
var CircleProgress = ({ twColor, percentage, radius, fill, strokeWidth }) => {
|
|
1164
966
|
const r = radius;
|
|
1165
967
|
const cx = "50%";
|
|
@@ -1167,8 +969,8 @@ var CircleProgress = ({ twColor, percentage, radius, fill, strokeWidth }) => {
|
|
|
1167
969
|
const w = Math.round(radius / 16);
|
|
1168
970
|
const strokeWidthCalc = strokeWidth ? strokeWidth : w < 8 ? 8 : w;
|
|
1169
971
|
const size = radius * 2 + strokeWidthCalc;
|
|
1170
|
-
return /* @__PURE__ */
|
|
1171
|
-
/* @__PURE__ */
|
|
972
|
+
return /* @__PURE__ */ jsx23("div", { style: { height: size, width: size }, children: /* @__PURE__ */ jsxs11("svg", { viewBox: `0 0 ${size} ${size}`, className: "-rotate-90", children: [
|
|
973
|
+
/* @__PURE__ */ jsx23(
|
|
1172
974
|
"circle",
|
|
1173
975
|
{
|
|
1174
976
|
className: "text-white/50 dark:text-slate-200/50",
|
|
@@ -1180,7 +982,7 @@ var CircleProgress = ({ twColor, percentage, radius, fill, strokeWidth }) => {
|
|
|
1180
982
|
cy
|
|
1181
983
|
}
|
|
1182
984
|
),
|
|
1183
|
-
/* @__PURE__ */
|
|
985
|
+
/* @__PURE__ */ jsx23(
|
|
1184
986
|
"circle",
|
|
1185
987
|
{
|
|
1186
988
|
strokeDasharray: 2 * Math.PI * r,
|
|
@@ -1199,8 +1001,8 @@ var CircleProgress = ({ twColor, percentage, radius, fill, strokeWidth }) => {
|
|
|
1199
1001
|
var CircleProgress_default = CircleProgress;
|
|
1200
1002
|
|
|
1201
1003
|
// src/ProgressBar/CourseProgress.tsx
|
|
1202
|
-
import { jsx as
|
|
1203
|
-
var
|
|
1004
|
+
import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1005
|
+
var PRIMARY_COLOR2 = "#00b4d8";
|
|
1204
1006
|
var CourseProgress = ({ twColor, percentage, label }) => {
|
|
1205
1007
|
const cx = "50%";
|
|
1206
1008
|
const cy = "50%";
|
|
@@ -1209,10 +1011,10 @@ var CourseProgress = ({ twColor, percentage, label }) => {
|
|
|
1209
1011
|
const fullLength = 2 * Math.PI * r;
|
|
1210
1012
|
const length = fullLength * (percentage < 1 ? 1 - percentage : 0.01);
|
|
1211
1013
|
const strokeDashoffset = 2 * Math.PI * r - percentage / 100 * 2 * Math.PI * r;
|
|
1212
|
-
return /* @__PURE__ */
|
|
1213
|
-
/* @__PURE__ */
|
|
1214
|
-
/* @__PURE__ */
|
|
1215
|
-
/* @__PURE__ */
|
|
1014
|
+
return /* @__PURE__ */ jsxs12("div", { className: "flex items-center flex-col justify-center space-y-0 dark:bg-inherit dark:text-gray-300", children: [
|
|
1015
|
+
/* @__PURE__ */ jsxs12("div", { className: `relative flex items-center justify-center -my-2 -mt-1 overflow-hidden rounded-full`, children: [
|
|
1016
|
+
/* @__PURE__ */ jsxs12("svg", { className: `-rotate-90`, children: [
|
|
1017
|
+
/* @__PURE__ */ jsx24(
|
|
1216
1018
|
"circle",
|
|
1217
1019
|
{
|
|
1218
1020
|
className: "text-gray-300",
|
|
@@ -1224,11 +1026,11 @@ var CourseProgress = ({ twColor, percentage, label }) => {
|
|
|
1224
1026
|
cy
|
|
1225
1027
|
}
|
|
1226
1028
|
),
|
|
1227
|
-
/* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ jsx24(
|
|
1228
1030
|
"circle",
|
|
1229
1031
|
{
|
|
1230
1032
|
style: { strokeDashoffset },
|
|
1231
|
-
color: twColor ||
|
|
1033
|
+
color: twColor || PRIMARY_COLOR2,
|
|
1232
1034
|
ref: (ref) => {
|
|
1233
1035
|
if (ref) {
|
|
1234
1036
|
}
|
|
@@ -1245,9 +1047,9 @@ var CourseProgress = ({ twColor, percentage, label }) => {
|
|
|
1245
1047
|
}
|
|
1246
1048
|
)
|
|
1247
1049
|
] }),
|
|
1248
|
-
/* @__PURE__ */
|
|
1050
|
+
/* @__PURE__ */ jsx24("span", { className: `absolute top-[${50 / 2}] text-xl leading-none font-medium font-header hidden sm:block`, children: percentage.toString() + "%" })
|
|
1249
1051
|
] }),
|
|
1250
|
-
/* @__PURE__ */
|
|
1052
|
+
/* @__PURE__ */ jsx24("p", { className: "font-medium sm:text-xl font-header text-center w-full", children: label })
|
|
1251
1053
|
] });
|
|
1252
1054
|
};
|
|
1253
1055
|
var Small = ({ twColor, percentage, label }) => {
|
|
@@ -1256,9 +1058,9 @@ var Small = ({ twColor, percentage, label }) => {
|
|
|
1256
1058
|
const r = 14;
|
|
1257
1059
|
const strokeWidth = 4;
|
|
1258
1060
|
const strokeDashoffset = 2 * Math.PI * r - percentage / 100 * 2 * Math.PI * r;
|
|
1259
|
-
return /* @__PURE__ */
|
|
1260
|
-
/* @__PURE__ */
|
|
1261
|
-
/* @__PURE__ */
|
|
1061
|
+
return /* @__PURE__ */ jsxs12("div", { className: "flex items-center space-x-2 rounded-full bg-transparent border-2 border-slate-100 w-full", children: [
|
|
1062
|
+
/* @__PURE__ */ jsx24("div", { className: `flex items-center justify-center overflow-hidden`, children: /* @__PURE__ */ jsxs12("svg", { className: `w-10 h-11 transform translate-x-1 translate-y-1`, children: [
|
|
1063
|
+
/* @__PURE__ */ jsx24(
|
|
1262
1064
|
"circle",
|
|
1263
1065
|
{
|
|
1264
1066
|
className: "text-gray-300",
|
|
@@ -1270,7 +1072,7 @@ var Small = ({ twColor, percentage, label }) => {
|
|
|
1270
1072
|
cy
|
|
1271
1073
|
}
|
|
1272
1074
|
),
|
|
1273
|
-
/* @__PURE__ */
|
|
1075
|
+
/* @__PURE__ */ jsx24(
|
|
1274
1076
|
"circle",
|
|
1275
1077
|
{
|
|
1276
1078
|
style: { strokeDashoffset },
|
|
@@ -1289,7 +1091,7 @@ var Small = ({ twColor, percentage, label }) => {
|
|
|
1289
1091
|
}
|
|
1290
1092
|
)
|
|
1291
1093
|
] }) }),
|
|
1292
|
-
/* @__PURE__ */
|
|
1094
|
+
/* @__PURE__ */ jsxs12("p", { className: "font-medium dark:text-gray-300 text-gray-600 text-sm font-header mt-1", children: [
|
|
1293
1095
|
label,
|
|
1294
1096
|
" ",
|
|
1295
1097
|
percentage.toString() + "%"
|
|
@@ -1301,8 +1103,8 @@ var CourseProgress_default = CourseProgress;
|
|
|
1301
1103
|
|
|
1302
1104
|
// src/ProgressBar/ScrollProgress.tsx
|
|
1303
1105
|
import { useEffect as useEffect4, useState as useState5 } from "react";
|
|
1304
|
-
import { jsx as
|
|
1305
|
-
var
|
|
1106
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1107
|
+
var PRIMARY_COLOR3 = "#00b4d8";
|
|
1306
1108
|
var ScrollProgress = () => {
|
|
1307
1109
|
const [scrollPercentage, setScrollPercentage] = useState5(0);
|
|
1308
1110
|
useEffect4(() => {
|
|
@@ -1318,7 +1120,7 @@ var ScrollProgress = () => {
|
|
|
1318
1120
|
window.removeEventListener("scroll", handleScroll);
|
|
1319
1121
|
};
|
|
1320
1122
|
}, []);
|
|
1321
|
-
return /* @__PURE__ */
|
|
1123
|
+
return /* @__PURE__ */ jsx25(
|
|
1322
1124
|
"div",
|
|
1323
1125
|
{
|
|
1324
1126
|
style: {
|
|
@@ -1331,12 +1133,12 @@ var ScrollProgress = () => {
|
|
|
1331
1133
|
left: "0px",
|
|
1332
1134
|
right: "0px"
|
|
1333
1135
|
},
|
|
1334
|
-
children: /* @__PURE__ */
|
|
1136
|
+
children: /* @__PURE__ */ jsx25(
|
|
1335
1137
|
"div",
|
|
1336
1138
|
{
|
|
1337
1139
|
style: {
|
|
1338
1140
|
height: "100%",
|
|
1339
|
-
backgroundColor:
|
|
1141
|
+
backgroundColor: PRIMARY_COLOR3,
|
|
1340
1142
|
borderRadius: 2,
|
|
1341
1143
|
width: `${scrollPercentage}%`
|
|
1342
1144
|
}
|
|
@@ -1349,7 +1151,7 @@ var ScrollProgress_default = ScrollProgress;
|
|
|
1349
1151
|
|
|
1350
1152
|
// src/Icons/AnimateLogo.tsx
|
|
1351
1153
|
import { useEffect as useEffect5, useState as useState6 } from "react";
|
|
1352
|
-
import { jsx as
|
|
1154
|
+
import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1353
1155
|
var AnimateLogo = () => {
|
|
1354
1156
|
const [isFirefox, setIsFirefox] = useState6(false);
|
|
1355
1157
|
useEffect5(() => {
|
|
@@ -1357,7 +1159,7 @@ var AnimateLogo = () => {
|
|
|
1357
1159
|
setIsFirefox(userAgent.indexOf("Firefox") > -1);
|
|
1358
1160
|
}, []);
|
|
1359
1161
|
if (isFirefox) {
|
|
1360
|
-
return /* @__PURE__ */
|
|
1162
|
+
return /* @__PURE__ */ jsx26("svg", { xmlns: "http://www.w3.org/2000/svg", className: "animate-pulse", viewBox: "0 0 600 600", children: /* @__PURE__ */ jsx26("g", { children: /* @__PURE__ */ jsxs13(
|
|
1361
1163
|
"path",
|
|
1362
1164
|
{
|
|
1363
1165
|
className: "stroke-black dark:stroke-white text-gray-900 dark:text-gray-50",
|
|
@@ -1369,7 +1171,7 @@ var AnimateLogo = () => {
|
|
|
1369
1171
|
strokeDasharray: "1600",
|
|
1370
1172
|
d: "M466.49 164.79c17.79 34.76 25.48 75.66 19.08 118.96-11.28 76.36-67.11 139.06-141.89 158.25-127.11 32.61-243.49-61.27-245.86-184.81C95.79 150.86 182.9 60.52 289.23 58.56c33.95-.63 66.08 7.48 94.22 22.29 0 0 15.68 6.34 10.14 23.19 0 0-68.52 219.82-352.61 268.06",
|
|
1371
1173
|
children: [
|
|
1372
|
-
/* @__PURE__ */
|
|
1174
|
+
/* @__PURE__ */ jsx26(
|
|
1373
1175
|
"animate",
|
|
1374
1176
|
{
|
|
1375
1177
|
attributeName: "stroke-dashoffset",
|
|
@@ -1384,7 +1186,7 @@ var AnimateLogo = () => {
|
|
|
1384
1186
|
values: "1600;0;0;1600;1600"
|
|
1385
1187
|
}
|
|
1386
1188
|
),
|
|
1387
|
-
/* @__PURE__ */
|
|
1189
|
+
/* @__PURE__ */ jsx26(
|
|
1388
1190
|
"animateTransform",
|
|
1389
1191
|
{
|
|
1390
1192
|
attributeName: "transform",
|
|
@@ -1404,7 +1206,7 @@ var AnimateLogo = () => {
|
|
|
1404
1206
|
}
|
|
1405
1207
|
) }) });
|
|
1406
1208
|
}
|
|
1407
|
-
return /* @__PURE__ */
|
|
1209
|
+
return /* @__PURE__ */ jsx26("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 600 600", children: /* @__PURE__ */ jsxs13(
|
|
1408
1210
|
"g",
|
|
1409
1211
|
{
|
|
1410
1212
|
style: {
|
|
@@ -1414,7 +1216,7 @@ var AnimateLogo = () => {
|
|
|
1414
1216
|
height: 176,
|
|
1415
1217
|
width: 176,
|
|
1416
1218
|
children: [
|
|
1417
|
-
/* @__PURE__ */
|
|
1219
|
+
/* @__PURE__ */ jsx26(
|
|
1418
1220
|
"path",
|
|
1419
1221
|
{
|
|
1420
1222
|
className: "stroke-black dark:stroke-white text-gray-900 dark:text-gray-50",
|
|
@@ -1431,7 +1233,7 @@ var AnimateLogo = () => {
|
|
|
1431
1233
|
strokeWidth: "82",
|
|
1432
1234
|
strokeDasharray: "1600",
|
|
1433
1235
|
d: "M466.49 164.79c17.79 34.76 25.48 75.66 19.08 118.96-11.28 76.36-67.11 139.06-141.89 158.25-127.11 32.61-243.49-61.27-245.86-184.81C95.79 150.86 182.9 60.52 289.23 58.56c33.95-.63 66.08 7.48 94.22 22.29 0 0 15.68 6.34 10.14 23.19 0 0-68.52 219.82-352.61 268.06",
|
|
1434
|
-
children: /* @__PURE__ */
|
|
1236
|
+
children: /* @__PURE__ */ jsx26(
|
|
1435
1237
|
"animate",
|
|
1436
1238
|
{
|
|
1437
1239
|
attributeName: "stroke-dashoffset",
|
|
@@ -1448,7 +1250,7 @@ var AnimateLogo = () => {
|
|
|
1448
1250
|
)
|
|
1449
1251
|
}
|
|
1450
1252
|
),
|
|
1451
|
-
/* @__PURE__ */
|
|
1253
|
+
/* @__PURE__ */ jsx26(
|
|
1452
1254
|
"animateTransform",
|
|
1453
1255
|
{
|
|
1454
1256
|
attributeName: "transform",
|
|
@@ -1473,22 +1275,19 @@ var AnimateLogo_default = AnimateLogo;
|
|
|
1473
1275
|
// src/Spinners/OverlaySpinner.tsx
|
|
1474
1276
|
import { useEffect as useEffect6, useState as useState7 } from "react";
|
|
1475
1277
|
import { createPortal } from "react-dom";
|
|
1476
|
-
import { jsx as
|
|
1278
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1477
1279
|
var OverlaySpinner = ({ visible }) => {
|
|
1478
1280
|
const [mounted, setMounted] = useState7(false);
|
|
1479
1281
|
useEffect6(() => setMounted(true), []);
|
|
1480
1282
|
if (!mounted) return null;
|
|
1481
1283
|
if (!visible) return null;
|
|
1482
1284
|
return createPortal(
|
|
1483
|
-
/* @__PURE__ */
|
|
1285
|
+
/* @__PURE__ */ jsx27("div", { className: "animate-fade-in", children: /* @__PURE__ */ jsx27("div", { className: "fixed top-0 left-0 w-full h-screen flex items-center justify-center z-50 dark:bg-black/70 bg-white/60", children: /* @__PURE__ */ jsx27("div", { className: "h-44 w-44 overflow-visible", children: /* @__PURE__ */ jsx27(AnimateLogo_default, {}) }) }) }),
|
|
1484
1286
|
typeof window !== "undefined" ? document.body : {},
|
|
1485
1287
|
"spinner"
|
|
1486
1288
|
);
|
|
1487
1289
|
};
|
|
1488
1290
|
var OverlaySpinner_default = OverlaySpinner;
|
|
1489
|
-
|
|
1490
|
-
// src/constants.tsx
|
|
1491
|
-
var PRIMARY_COLOR3 = "#00b4d8";
|
|
1492
1291
|
export {
|
|
1493
1292
|
AnimateLogo_default as AnimateLogo,
|
|
1494
1293
|
Backdrop_default as Backdrop,
|
|
@@ -1509,7 +1308,7 @@ export {
|
|
|
1509
1308
|
NoticeBox_default as NoticeBox,
|
|
1510
1309
|
Overlay_default as Overlay,
|
|
1511
1310
|
OverlaySpinner_default as OverlaySpinner,
|
|
1512
|
-
|
|
1311
|
+
PRIMARY_COLOR,
|
|
1513
1312
|
Pill_default as Pill,
|
|
1514
1313
|
ProgressBar_default as ProgressBar,
|
|
1515
1314
|
ProgressBarSimple_default as ProgressBarSimple,
|