evelearn-theme 2.0.7 → 2.0.9
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/.github/workflows/publish.yaml +42 -0
- package/dist/index.d.mts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.js +2 -8
- package/dist/index.mjs +3 -5
- package/package.json +1 -1
- package/dist/chunk-XLPRFXMF.mjs +0 -248
- package/dist/server.d.mts +0 -88
- package/dist/server.d.ts +0 -88
- package/dist/server.js +0 -271
- package/dist/server.mjs +0 -42
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Bump & Publish to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
bump-and-publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout repo
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
with:
|
|
16
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
17
|
+
|
|
18
|
+
- name: Set up Node.js
|
|
19
|
+
uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: '20'
|
|
22
|
+
registry-url: 'https://registry.npmjs.org/'
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: npm ci
|
|
26
|
+
|
|
27
|
+
- name: Bump version (patch)
|
|
28
|
+
run: |
|
|
29
|
+
git config --global user.name "github-actions[bot]"
|
|
30
|
+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
31
|
+
npm version patch --no-git-tag-version
|
|
32
|
+
git add package.json package-lock.json
|
|
33
|
+
git commit -m "chore: bump version [skip ci]"
|
|
34
|
+
git push
|
|
35
|
+
|
|
36
|
+
- name: Build the package
|
|
37
|
+
run: npm run build
|
|
38
|
+
|
|
39
|
+
- name: Publish to npm
|
|
40
|
+
run: npm run pub
|
|
41
|
+
env:
|
|
42
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/dist/index.d.mts
CHANGED
|
@@ -20,16 +20,14 @@ declare const exerciseEditButton = "w-6 h-6 flex justify-center text-gray-700 da
|
|
|
20
20
|
declare const tippyClassname = "p-2 bg-slate-600 dark:bg-slate-900 opacity-90 text-white font-medium font-header rounded-lg";
|
|
21
21
|
declare const headerTippyClass = "rounded-lg p-2 bg-slate-950 opacity-95 text-white font-medium";
|
|
22
22
|
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";
|
|
23
|
-
declare const toolbarExerciseButton = "flex bg-gray-100/20 dark:bg-slate-50/90 items-center sm:justify-between p-4 shadow-sm w-full rounded-xl border-4 border-transparent hover:border-slate-200 text-gray-700 hover:text-gray-800 hover:bg-white transition-colors duration-75";
|
|
24
23
|
|
|
25
24
|
interface SpinnerProps {
|
|
26
25
|
size?: 'base' | 'small';
|
|
27
26
|
white?: boolean | string;
|
|
28
27
|
visible?: boolean | string;
|
|
29
|
-
isDark?: boolean;
|
|
30
28
|
}
|
|
31
29
|
declare const Spinner: {
|
|
32
|
-
({ visible, size, white
|
|
30
|
+
({ visible, size, white: isWhite }: SpinnerProps): react_jsx_runtime.JSX.Element | null;
|
|
33
31
|
displayName: string;
|
|
34
32
|
Centered: {
|
|
35
33
|
(props: SpinnerProps): react_jsx_runtime.JSX.Element | null;
|
|
@@ -323,4 +321,4 @@ declare const OverlaySpinner: ({ visible }: Props) => React$1.ReactPortal | null
|
|
|
323
321
|
|
|
324
322
|
declare const AnimateLogo: () => react_jsx_runtime.JSX.Element;
|
|
325
323
|
|
|
326
|
-
export { AnimateLogo, Backdrop, BAWrapper as BottomAlert, Breakpoint, Button, Checkbox, CircleProgress, Container, CourseProgress, ErrorText, Fade, FunButton, FunRoundButton, IconInfo, Modal, NoResults, NoticeBox, Overlay, OverlaySpinner, PRIMARY_COLOR, Pill, ProgressBar, ProgressBarSimple, RadioOption, RatingStars, ScrollProgress, Slider, Spinner, StepsComponent, Tippy, ToggleSwitch, UserContentSwitcher, baseFieldStyle, createExerciseElementStyle, exerciseDeleteButton, exerciseEditButton, headerButtonClass, headerTippyClass, tippyClassname,
|
|
324
|
+
export { AnimateLogo, Backdrop, BAWrapper as BottomAlert, Breakpoint, Button, Checkbox, CircleProgress, Container, CourseProgress, ErrorText, Fade, FunButton, FunRoundButton, IconInfo, Modal, NoResults, NoticeBox, Overlay, OverlaySpinner, PRIMARY_COLOR, Pill, ProgressBar, ProgressBarSimple, RadioOption, RatingStars, ScrollProgress, Slider, Spinner, StepsComponent, Tippy, ToggleSwitch, UserContentSwitcher, baseFieldStyle, createExerciseElementStyle, exerciseDeleteButton, exerciseEditButton, headerButtonClass, headerTippyClass, tippyClassname, xIconButton };
|
package/dist/index.d.ts
CHANGED
|
@@ -20,16 +20,14 @@ declare const exerciseEditButton = "w-6 h-6 flex justify-center text-gray-700 da
|
|
|
20
20
|
declare const tippyClassname = "p-2 bg-slate-600 dark:bg-slate-900 opacity-90 text-white font-medium font-header rounded-lg";
|
|
21
21
|
declare const headerTippyClass = "rounded-lg p-2 bg-slate-950 opacity-95 text-white font-medium";
|
|
22
22
|
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";
|
|
23
|
-
declare const toolbarExerciseButton = "flex bg-gray-100/20 dark:bg-slate-50/90 items-center sm:justify-between p-4 shadow-sm w-full rounded-xl border-4 border-transparent hover:border-slate-200 text-gray-700 hover:text-gray-800 hover:bg-white transition-colors duration-75";
|
|
24
23
|
|
|
25
24
|
interface SpinnerProps {
|
|
26
25
|
size?: 'base' | 'small';
|
|
27
26
|
white?: boolean | string;
|
|
28
27
|
visible?: boolean | string;
|
|
29
|
-
isDark?: boolean;
|
|
30
28
|
}
|
|
31
29
|
declare const Spinner: {
|
|
32
|
-
({ visible, size, white
|
|
30
|
+
({ visible, size, white: isWhite }: SpinnerProps): react_jsx_runtime.JSX.Element | null;
|
|
33
31
|
displayName: string;
|
|
34
32
|
Centered: {
|
|
35
33
|
(props: SpinnerProps): react_jsx_runtime.JSX.Element | null;
|
|
@@ -323,4 +321,4 @@ declare const OverlaySpinner: ({ visible }: Props) => React$1.ReactPortal | null
|
|
|
323
321
|
|
|
324
322
|
declare const AnimateLogo: () => react_jsx_runtime.JSX.Element;
|
|
325
323
|
|
|
326
|
-
export { AnimateLogo, Backdrop, BAWrapper as BottomAlert, Breakpoint, Button, Checkbox, CircleProgress, Container, CourseProgress, ErrorText, Fade, FunButton, FunRoundButton, IconInfo, Modal, NoResults, NoticeBox, Overlay, OverlaySpinner, PRIMARY_COLOR, Pill, ProgressBar, ProgressBarSimple, RadioOption, RatingStars, ScrollProgress, Slider, Spinner, StepsComponent, Tippy, ToggleSwitch, UserContentSwitcher, baseFieldStyle, createExerciseElementStyle, exerciseDeleteButton, exerciseEditButton, headerButtonClass, headerTippyClass, tippyClassname,
|
|
324
|
+
export { AnimateLogo, Backdrop, BAWrapper as BottomAlert, Breakpoint, Button, Checkbox, CircleProgress, Container, CourseProgress, ErrorText, Fade, FunButton, FunRoundButton, IconInfo, Modal, NoResults, NoticeBox, Overlay, OverlaySpinner, PRIMARY_COLOR, Pill, ProgressBar, ProgressBarSimple, RadioOption, RatingStars, ScrollProgress, Slider, Spinner, StepsComponent, Tippy, ToggleSwitch, UserContentSwitcher, baseFieldStyle, createExerciseElementStyle, exerciseDeleteButton, exerciseEditButton, headerButtonClass, headerTippyClass, tippyClassname, xIconButton };
|
package/dist/index.js
CHANGED
|
@@ -310,9 +310,6 @@ __export(index_exports, {
|
|
|
310
310
|
tippyClassname: function() {
|
|
311
311
|
return tippyClassname;
|
|
312
312
|
},
|
|
313
|
-
toolbarExerciseButton: function() {
|
|
314
|
-
return toolbarExerciseButton;
|
|
315
|
-
},
|
|
316
313
|
xIconButton: function() {
|
|
317
314
|
return xIconButton;
|
|
318
315
|
}
|
|
@@ -340,13 +337,11 @@ var exerciseEditButton = "w-6 h-6 flex justify-center text-gray-700 dark:text-gr
|
|
|
340
337
|
var tippyClassname = "p-2 bg-slate-600 dark:bg-slate-900 opacity-90 text-white font-medium font-header rounded-lg";
|
|
341
338
|
var headerTippyClass = "rounded-lg p-2 bg-slate-950 opacity-95 text-white font-medium";
|
|
342
339
|
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";
|
|
343
|
-
var toolbarExerciseButton = "flex bg-gray-100/20 dark:bg-slate-50/90 items-center sm:justify-between p-4 shadow-sm w-full rounded-xl border-4 border-transparent hover:border-slate-200 text-gray-700 hover:text-gray-800 hover:bg-white transition-colors duration-75";
|
|
344
340
|
// src/Spinners/Spinner.tsx
|
|
345
341
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
346
342
|
var Spinner = function(param) {
|
|
347
|
-
var _param_visible = param.visible, visible = _param_visible === void 0 ? true : _param_visible, size = param.size,
|
|
343
|
+
var _param_visible = param.visible, visible = _param_visible === void 0 ? true : _param_visible, size = param.size, isWhite = param.white;
|
|
348
344
|
if (visible === false) return null;
|
|
349
|
-
var isWhite = white || isDark;
|
|
350
345
|
var color = isWhite ? "stroke-white/90" : "stroke-slate-600/80";
|
|
351
346
|
var bgColor = isWhite ? "stroke-white/20" : "stroke-slate-500/20";
|
|
352
347
|
var dimensions = size === "small" ? "w-5 h-5" : "w-8 h-8";
|
|
@@ -623,7 +618,7 @@ var Button = function(param) {
|
|
|
623
618
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", {
|
|
624
619
|
type: type || "button",
|
|
625
620
|
disabled: disabled,
|
|
626
|
-
className: "rounded-lg focus:outline-none transition duration-100 ".concat(styled(), " ").concat(sized()),
|
|
621
|
+
className: "rounded-lg cursor-pointer focus:outline-none transition duration-100 ".concat(styled(), " ").concat(sized()),
|
|
627
622
|
onClick: onClick,
|
|
628
623
|
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", {
|
|
629
624
|
className: "w-full max-h-11",
|
|
@@ -2111,6 +2106,5 @@ var OverlaySpinner_default = OverlaySpinner;
|
|
|
2111
2106
|
headerButtonClass: headerButtonClass,
|
|
2112
2107
|
headerTippyClass: headerTippyClass,
|
|
2113
2108
|
tippyClassname: tippyClassname,
|
|
2114
|
-
toolbarExerciseButton: toolbarExerciseButton,
|
|
2115
2109
|
xIconButton: xIconButton
|
|
2116
2110
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -149,13 +149,11 @@ var exerciseEditButton = "w-6 h-6 flex justify-center text-gray-700 dark:text-gr
|
|
|
149
149
|
var tippyClassname = "p-2 bg-slate-600 dark:bg-slate-900 opacity-90 text-white font-medium font-header rounded-lg";
|
|
150
150
|
var headerTippyClass = "rounded-lg p-2 bg-slate-950 opacity-95 text-white font-medium";
|
|
151
151
|
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";
|
|
152
|
-
var toolbarExerciseButton = "flex bg-gray-100/20 dark:bg-slate-50/90 items-center sm:justify-between p-4 shadow-sm w-full rounded-xl border-4 border-transparent hover:border-slate-200 text-gray-700 hover:text-gray-800 hover:bg-white transition-colors duration-75";
|
|
153
152
|
// src/Spinners/Spinner.tsx
|
|
154
153
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
155
154
|
var Spinner = function(param) {
|
|
156
|
-
var _param_visible = param.visible, visible = _param_visible === void 0 ? true : _param_visible, size = param.size,
|
|
155
|
+
var _param_visible = param.visible, visible = _param_visible === void 0 ? true : _param_visible, size = param.size, isWhite = param.white;
|
|
157
156
|
if (visible === false) return null;
|
|
158
|
-
var isWhite = white || isDark;
|
|
159
157
|
var color = isWhite ? "stroke-white/90" : "stroke-slate-600/80";
|
|
160
158
|
var bgColor = isWhite ? "stroke-white/20" : "stroke-slate-500/20";
|
|
161
159
|
var dimensions = size === "small" ? "w-5 h-5" : "w-8 h-8";
|
|
@@ -432,7 +430,7 @@ var Button = function(param) {
|
|
|
432
430
|
return /* @__PURE__ */ jsx11("button", {
|
|
433
431
|
type: type || "button",
|
|
434
432
|
disabled: disabled,
|
|
435
|
-
className: "rounded-lg focus:outline-none transition duration-100 ".concat(styled(), " ").concat(sized()),
|
|
433
|
+
className: "rounded-lg cursor-pointer focus:outline-none transition duration-100 ".concat(styled(), " ").concat(sized()),
|
|
436
434
|
onClick: onClick,
|
|
437
435
|
children: /* @__PURE__ */ jsx11("div", {
|
|
438
436
|
className: "w-full max-h-11",
|
|
@@ -1879,4 +1877,4 @@ var OverlaySpinner = function(param) {
|
|
|
1879
1877
|
}), typeof window !== "undefined" ? document.body : {}, "spinner");
|
|
1880
1878
|
};
|
|
1881
1879
|
var OverlaySpinner_default = OverlaySpinner;
|
|
1882
|
-
export { AnimateLogo_default as AnimateLogo, Backdrop_default as Backdrop, BottomAlert_default as BottomAlert, Breakpoint_default as Breakpoint, Button_default as Button, Checkbox_default as Checkbox, CircleProgress_default as CircleProgress, Container_default as Container, CourseProgress_default as CourseProgress, ErrorText_default as ErrorText, Fade_default as Fade, FunButton_default as FunButton, FunRoundButton_default as FunRoundButton, IconInfo_default as IconInfo, Modal_default as Modal, NoResults_default as NoResults, NoticeBox_default as NoticeBox, Overlay_default as Overlay, OverlaySpinner_default as OverlaySpinner, PRIMARY_COLOR, Pill_default as Pill, ProgressBar_default as ProgressBar, ProgressBarSimple_default as ProgressBarSimple, RadioOption_default as RadioOption, RatingStars_default as RatingStars, ScrollProgress_default as ScrollProgress, Slider_default as Slider, Spinner_default as Spinner, StepsComponent_default as StepsComponent, Tippy_default as Tippy, ToggleSwitch_default as ToggleSwitch, UserContentSwitcher_default as UserContentSwitcher, baseFieldStyle, createExerciseElementStyle, exerciseDeleteButton, exerciseEditButton, headerButtonClass, headerTippyClass, tippyClassname,
|
|
1880
|
+
export { AnimateLogo_default as AnimateLogo, Backdrop_default as Backdrop, BottomAlert_default as BottomAlert, Breakpoint_default as Breakpoint, Button_default as Button, Checkbox_default as Checkbox, CircleProgress_default as CircleProgress, Container_default as Container, CourseProgress_default as CourseProgress, ErrorText_default as ErrorText, Fade_default as Fade, FunButton_default as FunButton, FunRoundButton_default as FunRoundButton, IconInfo_default as IconInfo, Modal_default as Modal, NoResults_default as NoResults, NoticeBox_default as NoticeBox, Overlay_default as Overlay, OverlaySpinner_default as OverlaySpinner, PRIMARY_COLOR, Pill_default as Pill, ProgressBar_default as ProgressBar, ProgressBarSimple_default as ProgressBarSimple, RadioOption_default as RadioOption, RatingStars_default as RatingStars, ScrollProgress_default as ScrollProgress, Slider_default as Slider, Spinner_default as Spinner, StepsComponent_default as StepsComponent, Tippy_default as Tippy, ToggleSwitch_default as ToggleSwitch, UserContentSwitcher_default as UserContentSwitcher, baseFieldStyle, createExerciseElementStyle, exerciseDeleteButton, exerciseEditButton, headerButtonClass, headerTippyClass, tippyClassname, xIconButton };
|
package/package.json
CHANGED
package/dist/chunk-XLPRFXMF.mjs
DELETED
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
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/constants.tsx
|
|
34
|
-
var PRIMARY_COLOR = "#00b4d8";
|
|
35
|
-
|
|
36
|
-
// src/Common/Container.tsx
|
|
37
|
-
import { jsx } from "react/jsx-runtime";
|
|
38
|
-
var Container = ({ backgroundImage, style, children, onClick }) => {
|
|
39
|
-
return backgroundImage ? /* @__PURE__ */ jsx(
|
|
40
|
-
"div",
|
|
41
|
-
{
|
|
42
|
-
style: __spreadValues({
|
|
43
|
-
backgroundImage,
|
|
44
|
-
backgroundSize: "cover"
|
|
45
|
-
}, style),
|
|
46
|
-
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",
|
|
47
|
-
onClick,
|
|
48
|
-
children: children ? children : null
|
|
49
|
-
}
|
|
50
|
-
) : /* @__PURE__ */ jsx(
|
|
51
|
-
"div",
|
|
52
|
-
{
|
|
53
|
-
className: `w-full dark:bg-slate-950 mx-auto overflow-y-auto overflow-x-clip px-0 sm:px-16 relative pt-20`,
|
|
54
|
-
onClick,
|
|
55
|
-
style: style || { minHeight: "100vh" },
|
|
56
|
-
children: children ? children : null
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
};
|
|
60
|
-
var Container_default = Container;
|
|
61
|
-
|
|
62
|
-
// src/Common/ErrorText.tsx
|
|
63
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
64
|
-
var ErrorText = ({ text, style, classNames }) => {
|
|
65
|
-
return /* @__PURE__ */ jsx2("p", { className: classNames ? classNames : "text-red-500 font-semibold text-wrap py-auto", style, children: text });
|
|
66
|
-
};
|
|
67
|
-
var ErrorText_default = ErrorText;
|
|
68
|
-
|
|
69
|
-
// src/Common/fieldStyle.ts
|
|
70
|
-
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";
|
|
71
|
-
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";
|
|
72
|
-
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";
|
|
73
|
-
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";
|
|
74
|
-
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";
|
|
75
|
-
var tippyClassname = "p-2 bg-slate-600 dark:bg-slate-900 opacity-90 text-white font-medium font-header rounded-lg";
|
|
76
|
-
var headerTippyClass = "rounded-lg p-2 bg-slate-950 opacity-95 text-white font-medium";
|
|
77
|
-
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";
|
|
78
|
-
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";
|
|
79
|
-
|
|
80
|
-
// src/Spinners/Spinner.tsx
|
|
81
|
-
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
82
|
-
var Spinner = ({ visible = true, size, white, isDark }) => {
|
|
83
|
-
if (visible === false) return null;
|
|
84
|
-
const isWhite = white || isDark;
|
|
85
|
-
const color = isWhite ? "stroke-white/90" : "stroke-slate-600/80";
|
|
86
|
-
const bgColor = isWhite ? "stroke-white/20" : "stroke-slate-500/20";
|
|
87
|
-
const dimensions = size === "small" ? "w-5 h-5" : "w-8 h-8";
|
|
88
|
-
const spinnerClasses = `
|
|
89
|
-
absolute
|
|
90
|
-
top-0
|
|
91
|
-
animate-spin
|
|
92
|
-
${dimensions}
|
|
93
|
-
`;
|
|
94
|
-
return /* @__PURE__ */ jsxs("div", { className: "relative h-8 w-8 flex justify-center items-center", children: [
|
|
95
|
-
/* @__PURE__ */ jsx3(
|
|
96
|
-
"svg",
|
|
97
|
-
{
|
|
98
|
-
className: `absolute top-0 ${dimensions} ${bgColor}`,
|
|
99
|
-
viewBox: "0 0 24 24",
|
|
100
|
-
fill: "none",
|
|
101
|
-
strokeWidth: "2.4",
|
|
102
|
-
children: /* @__PURE__ */ jsx3("circle", { cx: "12", cy: "12", r: "10" })
|
|
103
|
-
}
|
|
104
|
-
),
|
|
105
|
-
/* @__PURE__ */ jsx3(
|
|
106
|
-
"svg",
|
|
107
|
-
{
|
|
108
|
-
className: spinnerClasses,
|
|
109
|
-
viewBox: "0 0 24 24",
|
|
110
|
-
fill: "none",
|
|
111
|
-
strokeWidth: "2.4",
|
|
112
|
-
strokeLinecap: "round",
|
|
113
|
-
children: /* @__PURE__ */ jsx3(
|
|
114
|
-
"path",
|
|
115
|
-
{
|
|
116
|
-
d: `
|
|
117
|
-
M 12 2
|
|
118
|
-
A 10 10 0 0 1 22 12
|
|
119
|
-
A 10 10 0 0 1 12 22
|
|
120
|
-
A 10 10 0 0 1 2 12
|
|
121
|
-
A 10 10 0 0 1 12 2
|
|
122
|
-
`,
|
|
123
|
-
strokeDasharray: "13 18.4",
|
|
124
|
-
stroke: "inherit",
|
|
125
|
-
className: color
|
|
126
|
-
}
|
|
127
|
-
)
|
|
128
|
-
}
|
|
129
|
-
)
|
|
130
|
-
] });
|
|
131
|
-
};
|
|
132
|
-
var SpinnerCentered = (props) => {
|
|
133
|
-
if (props.visible === false) return null;
|
|
134
|
-
return /* @__PURE__ */ jsx3("div", { className: "w-full flex justify-center items-center", children: /* @__PURE__ */ jsx3(Spinner, __spreadValues({}, props)) });
|
|
135
|
-
};
|
|
136
|
-
Spinner.displayName = "Spinner";
|
|
137
|
-
SpinnerCentered.displayName = "Spinner.Centered";
|
|
138
|
-
Spinner.Centered = SpinnerCentered;
|
|
139
|
-
var Spinner_default = Spinner;
|
|
140
|
-
|
|
141
|
-
// src/Common/NoResults.tsx
|
|
142
|
-
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
143
|
-
var HEIGHT = 160;
|
|
144
|
-
var WIDTH = HEIGHT * (16 / 9);
|
|
145
|
-
var NoResults = ({ loading, message }) => {
|
|
146
|
-
return /* @__PURE__ */ jsxs2("div", { className: "relative w-full flex justify-center items-center", children: [
|
|
147
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex justify-start w-full space-x-2 py-3 p-4 bg-slate-100 dark:bg-slate-800 rounded-md", children: [
|
|
148
|
-
/* @__PURE__ */ jsx4("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" }),
|
|
149
|
-
/* @__PURE__ */ jsx4("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" })
|
|
150
|
-
] }),
|
|
151
|
-
!loading && /* @__PURE__ */ jsx4("div", { className: "absolute w-full h-full flex justify-center items-center m-auto", children: /* @__PURE__ */ jsx4("div", { className: "p-4 rounded-lg bg-white dark:bg-slate-700 shadow-xl", children: /* @__PURE__ */ jsx4("p", { className: "font-semibold text-lg text-gray-700 dark:text-gray-300", children: message || "No results" }) }) })
|
|
152
|
-
] });
|
|
153
|
-
};
|
|
154
|
-
var NoResults_default = NoResults;
|
|
155
|
-
|
|
156
|
-
// src/Common/Pill.tsx
|
|
157
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
158
|
-
var Pill = ({ text }) => {
|
|
159
|
-
return /* @__PURE__ */ jsx5("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 });
|
|
160
|
-
};
|
|
161
|
-
var Pill_default = Pill;
|
|
162
|
-
|
|
163
|
-
// src/Common/StepsComponent.tsx
|
|
164
|
-
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
165
|
-
var StepsComponent = ({ steps, activeStep, onStepPress }) => {
|
|
166
|
-
return /* @__PURE__ */ jsx6("div", { className: "flex justify-between items-center w-full p-1 mb-2", children: steps.map((step, index) => {
|
|
167
|
-
return /* @__PURE__ */ jsx6("div", { className: "flex justify-center items-center space-x-2 w-full", children: /* @__PURE__ */ jsx6("div", { className: "flex flex-col items-center", children: /* @__PURE__ */ jsx6(
|
|
168
|
-
"button",
|
|
169
|
-
{
|
|
170
|
-
type: "button",
|
|
171
|
-
onClick: () => onStepPress(index),
|
|
172
|
-
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
|
|
173
|
-
${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"}`,
|
|
174
|
-
children: /* @__PURE__ */ jsxs3("span", { className: "font-medium truncate", children: [
|
|
175
|
-
index + 1,
|
|
176
|
-
". ",
|
|
177
|
-
step.label
|
|
178
|
-
] })
|
|
179
|
-
}
|
|
180
|
-
) }) }, `step_${index}_${step.label}`);
|
|
181
|
-
}) });
|
|
182
|
-
};
|
|
183
|
-
var StepsComponent_default = StepsComponent;
|
|
184
|
-
|
|
185
|
-
// src/Fade/Fade.tsx
|
|
186
|
-
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
187
|
-
var Fade = ({ children, inProp }) => {
|
|
188
|
-
return /* @__PURE__ */ jsx7("div", { className: "animate-fade-in", children });
|
|
189
|
-
};
|
|
190
|
-
var Fade_default = Fade;
|
|
191
|
-
|
|
192
|
-
// src/Backdrop/Backdrop.tsx
|
|
193
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
194
|
-
var Backdrop = ({ visible, onClick, opacity }) => {
|
|
195
|
-
if (!visible) return null;
|
|
196
|
-
return /* @__PURE__ */ jsx8(
|
|
197
|
-
"div",
|
|
198
|
-
{
|
|
199
|
-
style: {
|
|
200
|
-
opacity: opacity ? opacity : 90,
|
|
201
|
-
zIndex: 21
|
|
202
|
-
},
|
|
203
|
-
className: `fixed top-0 left-0 w-full h-screen bg-gray-100 dark:bg-slate-900`,
|
|
204
|
-
onClick
|
|
205
|
-
}
|
|
206
|
-
);
|
|
207
|
-
};
|
|
208
|
-
var Backdrop_default = Backdrop;
|
|
209
|
-
|
|
210
|
-
// src/Breakpoint/Breakpoint.tsx
|
|
211
|
-
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
212
|
-
var Breakpoint = ({ children, fromSize, toSize }) => {
|
|
213
|
-
let className = "";
|
|
214
|
-
if (fromSize && toSize) {
|
|
215
|
-
className = `hidden ${fromSize}:block ${toSize}:hidden`;
|
|
216
|
-
} else if (fromSize) {
|
|
217
|
-
className = `hidden ${fromSize}:block`;
|
|
218
|
-
} else if (toSize) {
|
|
219
|
-
className = `block ${toSize}:hidden`;
|
|
220
|
-
}
|
|
221
|
-
return /* @__PURE__ */ jsx9("div", { className, children });
|
|
222
|
-
};
|
|
223
|
-
var Breakpoint_default = Breakpoint;
|
|
224
|
-
|
|
225
|
-
export {
|
|
226
|
-
__spreadValues,
|
|
227
|
-
__spreadProps,
|
|
228
|
-
__objRest,
|
|
229
|
-
PRIMARY_COLOR,
|
|
230
|
-
Container_default,
|
|
231
|
-
ErrorText_default,
|
|
232
|
-
baseFieldStyle,
|
|
233
|
-
createExerciseElementStyle,
|
|
234
|
-
exerciseDeleteButton,
|
|
235
|
-
xIconButton,
|
|
236
|
-
exerciseEditButton,
|
|
237
|
-
tippyClassname,
|
|
238
|
-
headerTippyClass,
|
|
239
|
-
headerButtonClass,
|
|
240
|
-
toolbarExerciseButton,
|
|
241
|
-
Spinner_default,
|
|
242
|
-
NoResults_default,
|
|
243
|
-
Pill_default,
|
|
244
|
-
StepsComponent_default,
|
|
245
|
-
Fade_default,
|
|
246
|
-
Backdrop_default,
|
|
247
|
-
Breakpoint_default
|
|
248
|
-
};
|
package/dist/server.d.mts
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import React__default, { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
declare const PRIMARY_COLOR = "#00b4d8";
|
|
5
|
-
|
|
6
|
-
interface ContainerProps {
|
|
7
|
-
backgroundColor?: string;
|
|
8
|
-
backgroundImage?: string;
|
|
9
|
-
style?: React__default.CSSProperties;
|
|
10
|
-
onClick?: () => void;
|
|
11
|
-
isDark?: boolean;
|
|
12
|
-
children?: React__default.ReactNode;
|
|
13
|
-
}
|
|
14
|
-
declare const Container: React__default.FC<ContainerProps>;
|
|
15
|
-
|
|
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;
|
|
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
|
-
};
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
type Props$3 = {
|
|
49
|
-
loading: boolean;
|
|
50
|
-
message?: string;
|
|
51
|
-
};
|
|
52
|
-
declare const NoResults: ({ loading, message }: Props$3) => react_jsx_runtime.JSX.Element;
|
|
53
|
-
|
|
54
|
-
declare const Pill: ({ text }: {
|
|
55
|
-
text: string;
|
|
56
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
57
|
-
|
|
58
|
-
type Step = {
|
|
59
|
-
label: ReactNode;
|
|
60
|
-
};
|
|
61
|
-
type Props$2 = {
|
|
62
|
-
steps: Step[];
|
|
63
|
-
activeStep: number;
|
|
64
|
-
onStepPress: (s: number) => void;
|
|
65
|
-
};
|
|
66
|
-
declare const StepsComponent: ({ steps, activeStep, onStepPress }: Props$2) => react_jsx_runtime.JSX.Element;
|
|
67
|
-
|
|
68
|
-
type Props$1 = {
|
|
69
|
-
inProp: boolean;
|
|
70
|
-
children: React__default.ReactNode;
|
|
71
|
-
};
|
|
72
|
-
declare const Fade: ({ children, inProp }: Props$1) => react_jsx_runtime.JSX.Element;
|
|
73
|
-
|
|
74
|
-
type Props = {
|
|
75
|
-
visible: boolean;
|
|
76
|
-
onClick: () => void;
|
|
77
|
-
opacity?: number;
|
|
78
|
-
};
|
|
79
|
-
declare const Backdrop: ({ visible, onClick, opacity }: Props) => react_jsx_runtime.JSX.Element | null;
|
|
80
|
-
|
|
81
|
-
type Point = 'sm' | 'md' | 'lg' | 'xl';
|
|
82
|
-
declare const Breakpoint: React__default.FC<{
|
|
83
|
-
fromSize?: Point;
|
|
84
|
-
toSize?: Point;
|
|
85
|
-
children: React__default.ReactNode;
|
|
86
|
-
}>;
|
|
87
|
-
|
|
88
|
-
export { Backdrop, Breakpoint, Container, ErrorText, Fade, NoResults, PRIMARY_COLOR, Pill, Spinner, StepsComponent, baseFieldStyle, createExerciseElementStyle, exerciseDeleteButton, exerciseEditButton, headerButtonClass, headerTippyClass, tippyClassname, toolbarExerciseButton, xIconButton };
|
package/dist/server.d.ts
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import React__default, { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
declare const PRIMARY_COLOR = "#00b4d8";
|
|
5
|
-
|
|
6
|
-
interface ContainerProps {
|
|
7
|
-
backgroundColor?: string;
|
|
8
|
-
backgroundImage?: string;
|
|
9
|
-
style?: React__default.CSSProperties;
|
|
10
|
-
onClick?: () => void;
|
|
11
|
-
isDark?: boolean;
|
|
12
|
-
children?: React__default.ReactNode;
|
|
13
|
-
}
|
|
14
|
-
declare const Container: React__default.FC<ContainerProps>;
|
|
15
|
-
|
|
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;
|
|
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
|
-
};
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
type Props$3 = {
|
|
49
|
-
loading: boolean;
|
|
50
|
-
message?: string;
|
|
51
|
-
};
|
|
52
|
-
declare const NoResults: ({ loading, message }: Props$3) => react_jsx_runtime.JSX.Element;
|
|
53
|
-
|
|
54
|
-
declare const Pill: ({ text }: {
|
|
55
|
-
text: string;
|
|
56
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
57
|
-
|
|
58
|
-
type Step = {
|
|
59
|
-
label: ReactNode;
|
|
60
|
-
};
|
|
61
|
-
type Props$2 = {
|
|
62
|
-
steps: Step[];
|
|
63
|
-
activeStep: number;
|
|
64
|
-
onStepPress: (s: number) => void;
|
|
65
|
-
};
|
|
66
|
-
declare const StepsComponent: ({ steps, activeStep, onStepPress }: Props$2) => react_jsx_runtime.JSX.Element;
|
|
67
|
-
|
|
68
|
-
type Props$1 = {
|
|
69
|
-
inProp: boolean;
|
|
70
|
-
children: React__default.ReactNode;
|
|
71
|
-
};
|
|
72
|
-
declare const Fade: ({ children, inProp }: Props$1) => react_jsx_runtime.JSX.Element;
|
|
73
|
-
|
|
74
|
-
type Props = {
|
|
75
|
-
visible: boolean;
|
|
76
|
-
onClick: () => void;
|
|
77
|
-
opacity?: number;
|
|
78
|
-
};
|
|
79
|
-
declare const Backdrop: ({ visible, onClick, opacity }: Props) => react_jsx_runtime.JSX.Element | null;
|
|
80
|
-
|
|
81
|
-
type Point = 'sm' | 'md' | 'lg' | 'xl';
|
|
82
|
-
declare const Breakpoint: React__default.FC<{
|
|
83
|
-
fromSize?: Point;
|
|
84
|
-
toSize?: Point;
|
|
85
|
-
children: React__default.ReactNode;
|
|
86
|
-
}>;
|
|
87
|
-
|
|
88
|
-
export { Backdrop, Breakpoint, Container, ErrorText, Fade, NoResults, PRIMARY_COLOR, Pill, Spinner, StepsComponent, baseFieldStyle, createExerciseElementStyle, exerciseDeleteButton, exerciseEditButton, headerButtonClass, headerTippyClass, tippyClassname, toolbarExerciseButton, xIconButton };
|
package/dist/server.js
DELETED
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a, b) => {
|
|
10
|
-
for (var prop in b || (b = {}))
|
|
11
|
-
if (__hasOwnProp.call(b, prop))
|
|
12
|
-
__defNormalProp(a, prop, b[prop]);
|
|
13
|
-
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
-
if (__propIsEnum.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
}
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __export = (target, all) => {
|
|
21
|
-
for (var name in all)
|
|
22
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
23
|
-
};
|
|
24
|
-
var __copyProps = (to, from, except, desc) => {
|
|
25
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
26
|
-
for (let key of __getOwnPropNames(from))
|
|
27
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
28
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
29
|
-
}
|
|
30
|
-
return to;
|
|
31
|
-
};
|
|
32
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
|
-
|
|
34
|
-
// src/server.ts
|
|
35
|
-
var server_exports = {};
|
|
36
|
-
__export(server_exports, {
|
|
37
|
-
Backdrop: () => Backdrop_default,
|
|
38
|
-
Breakpoint: () => Breakpoint_default,
|
|
39
|
-
Container: () => Container_default,
|
|
40
|
-
ErrorText: () => ErrorText_default,
|
|
41
|
-
Fade: () => Fade_default,
|
|
42
|
-
NoResults: () => NoResults_default,
|
|
43
|
-
PRIMARY_COLOR: () => PRIMARY_COLOR,
|
|
44
|
-
Pill: () => Pill_default,
|
|
45
|
-
Spinner: () => Spinner_default,
|
|
46
|
-
StepsComponent: () => StepsComponent_default,
|
|
47
|
-
baseFieldStyle: () => baseFieldStyle,
|
|
48
|
-
createExerciseElementStyle: () => createExerciseElementStyle,
|
|
49
|
-
exerciseDeleteButton: () => exerciseDeleteButton,
|
|
50
|
-
exerciseEditButton: () => exerciseEditButton,
|
|
51
|
-
headerButtonClass: () => headerButtonClass,
|
|
52
|
-
headerTippyClass: () => headerTippyClass,
|
|
53
|
-
tippyClassname: () => tippyClassname,
|
|
54
|
-
toolbarExerciseButton: () => toolbarExerciseButton,
|
|
55
|
-
xIconButton: () => xIconButton
|
|
56
|
-
});
|
|
57
|
-
module.exports = __toCommonJS(server_exports);
|
|
58
|
-
|
|
59
|
-
// src/constants.tsx
|
|
60
|
-
var PRIMARY_COLOR = "#00b4d8";
|
|
61
|
-
|
|
62
|
-
// src/Common/Container.tsx
|
|
63
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
64
|
-
var Container = ({ backgroundImage, style, children, onClick }) => {
|
|
65
|
-
return backgroundImage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
66
|
-
"div",
|
|
67
|
-
{
|
|
68
|
-
style: __spreadValues({
|
|
69
|
-
backgroundImage,
|
|
70
|
-
backgroundSize: "cover"
|
|
71
|
-
}, style),
|
|
72
|
-
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",
|
|
73
|
-
onClick,
|
|
74
|
-
children: children ? children : null
|
|
75
|
-
}
|
|
76
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
77
|
-
"div",
|
|
78
|
-
{
|
|
79
|
-
className: `w-full dark:bg-slate-950 mx-auto overflow-y-auto overflow-x-clip px-0 sm:px-16 relative pt-20`,
|
|
80
|
-
onClick,
|
|
81
|
-
style: style || { minHeight: "100vh" },
|
|
82
|
-
children: children ? children : null
|
|
83
|
-
}
|
|
84
|
-
);
|
|
85
|
-
};
|
|
86
|
-
var Container_default = Container;
|
|
87
|
-
|
|
88
|
-
// src/Common/ErrorText.tsx
|
|
89
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
90
|
-
var ErrorText = ({ text, style, classNames }) => {
|
|
91
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: classNames ? classNames : "text-red-500 font-semibold text-wrap py-auto", style, children: text });
|
|
92
|
-
};
|
|
93
|
-
var ErrorText_default = ErrorText;
|
|
94
|
-
|
|
95
|
-
// src/Common/fieldStyle.ts
|
|
96
|
-
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";
|
|
97
|
-
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";
|
|
98
|
-
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";
|
|
99
|
-
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";
|
|
100
|
-
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";
|
|
101
|
-
var tippyClassname = "p-2 bg-slate-600 dark:bg-slate-900 opacity-90 text-white font-medium font-header rounded-lg";
|
|
102
|
-
var headerTippyClass = "rounded-lg p-2 bg-slate-950 opacity-95 text-white font-medium";
|
|
103
|
-
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";
|
|
104
|
-
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";
|
|
105
|
-
|
|
106
|
-
// src/Spinners/Spinner.tsx
|
|
107
|
-
var import_jsx_runtime3 = require("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__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "relative h-8 w-8 flex justify-center items-center", children: [
|
|
121
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
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__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "10" })
|
|
129
|
-
}
|
|
130
|
-
),
|
|
131
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
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__ */ (0, import_jsx_runtime3.jsx)(
|
|
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__ */ (0, import_jsx_runtime3.jsx)("div", { className: "w-full flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Spinner, __spreadValues({}, props)) });
|
|
161
|
-
};
|
|
162
|
-
Spinner.displayName = "Spinner";
|
|
163
|
-
SpinnerCentered.displayName = "Spinner.Centered";
|
|
164
|
-
Spinner.Centered = SpinnerCentered;
|
|
165
|
-
var Spinner_default = Spinner;
|
|
166
|
-
|
|
167
|
-
// src/Common/NoResults.tsx
|
|
168
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
169
|
-
var HEIGHT = 160;
|
|
170
|
-
var WIDTH = HEIGHT * (16 / 9);
|
|
171
|
-
var NoResults = ({ loading, message }) => {
|
|
172
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "relative w-full flex justify-center items-center", children: [
|
|
173
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex justify-start w-full space-x-2 py-3 p-4 bg-slate-100 dark:bg-slate-800 rounded-md", children: [
|
|
174
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("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" }),
|
|
175
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("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" })
|
|
176
|
-
] }),
|
|
177
|
-
!loading && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "absolute w-full h-full flex justify-center items-center m-auto", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "p-4 rounded-lg bg-white dark:bg-slate-700 shadow-xl", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "font-semibold text-lg text-gray-700 dark:text-gray-300", children: message || "No results" }) }) })
|
|
178
|
-
] });
|
|
179
|
-
};
|
|
180
|
-
var NoResults_default = NoResults;
|
|
181
|
-
|
|
182
|
-
// src/Common/Pill.tsx
|
|
183
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
184
|
-
var Pill = ({ text }) => {
|
|
185
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("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 });
|
|
186
|
-
};
|
|
187
|
-
var Pill_default = Pill;
|
|
188
|
-
|
|
189
|
-
// src/Common/StepsComponent.tsx
|
|
190
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
191
|
-
var StepsComponent = ({ steps, activeStep, onStepPress }) => {
|
|
192
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex justify-between items-center w-full p-1 mb-2", children: steps.map((step, index) => {
|
|
193
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex justify-center items-center space-x-2 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
194
|
-
"button",
|
|
195
|
-
{
|
|
196
|
-
type: "button",
|
|
197
|
-
onClick: () => onStepPress(index),
|
|
198
|
-
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
|
|
199
|
-
${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"}`,
|
|
200
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "font-medium truncate", children: [
|
|
201
|
-
index + 1,
|
|
202
|
-
". ",
|
|
203
|
-
step.label
|
|
204
|
-
] })
|
|
205
|
-
}
|
|
206
|
-
) }) }, `step_${index}_${step.label}`);
|
|
207
|
-
}) });
|
|
208
|
-
};
|
|
209
|
-
var StepsComponent_default = StepsComponent;
|
|
210
|
-
|
|
211
|
-
// src/Fade/Fade.tsx
|
|
212
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
213
|
-
var Fade = ({ children, inProp }) => {
|
|
214
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "animate-fade-in", children });
|
|
215
|
-
};
|
|
216
|
-
var Fade_default = Fade;
|
|
217
|
-
|
|
218
|
-
// src/Backdrop/Backdrop.tsx
|
|
219
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
220
|
-
var Backdrop = ({ visible, onClick, opacity }) => {
|
|
221
|
-
if (!visible) return null;
|
|
222
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
223
|
-
"div",
|
|
224
|
-
{
|
|
225
|
-
style: {
|
|
226
|
-
opacity: opacity ? opacity : 90,
|
|
227
|
-
zIndex: 21
|
|
228
|
-
},
|
|
229
|
-
className: `fixed top-0 left-0 w-full h-screen bg-gray-100 dark:bg-slate-900`,
|
|
230
|
-
onClick
|
|
231
|
-
}
|
|
232
|
-
);
|
|
233
|
-
};
|
|
234
|
-
var Backdrop_default = Backdrop;
|
|
235
|
-
|
|
236
|
-
// src/Breakpoint/Breakpoint.tsx
|
|
237
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
238
|
-
var Breakpoint = ({ children, fromSize, toSize }) => {
|
|
239
|
-
let className = "";
|
|
240
|
-
if (fromSize && toSize) {
|
|
241
|
-
className = `hidden ${fromSize}:block ${toSize}:hidden`;
|
|
242
|
-
} else if (fromSize) {
|
|
243
|
-
className = `hidden ${fromSize}:block`;
|
|
244
|
-
} else if (toSize) {
|
|
245
|
-
className = `block ${toSize}:hidden`;
|
|
246
|
-
}
|
|
247
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className, children });
|
|
248
|
-
};
|
|
249
|
-
var Breakpoint_default = Breakpoint;
|
|
250
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
251
|
-
0 && (module.exports = {
|
|
252
|
-
Backdrop,
|
|
253
|
-
Breakpoint,
|
|
254
|
-
Container,
|
|
255
|
-
ErrorText,
|
|
256
|
-
Fade,
|
|
257
|
-
NoResults,
|
|
258
|
-
PRIMARY_COLOR,
|
|
259
|
-
Pill,
|
|
260
|
-
Spinner,
|
|
261
|
-
StepsComponent,
|
|
262
|
-
baseFieldStyle,
|
|
263
|
-
createExerciseElementStyle,
|
|
264
|
-
exerciseDeleteButton,
|
|
265
|
-
exerciseEditButton,
|
|
266
|
-
headerButtonClass,
|
|
267
|
-
headerTippyClass,
|
|
268
|
-
tippyClassname,
|
|
269
|
-
toolbarExerciseButton,
|
|
270
|
-
xIconButton
|
|
271
|
-
});
|
package/dist/server.mjs
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
baseFieldStyle,
|
|
13
|
-
createExerciseElementStyle,
|
|
14
|
-
exerciseDeleteButton,
|
|
15
|
-
exerciseEditButton,
|
|
16
|
-
headerButtonClass,
|
|
17
|
-
headerTippyClass,
|
|
18
|
-
tippyClassname,
|
|
19
|
-
toolbarExerciseButton,
|
|
20
|
-
xIconButton
|
|
21
|
-
} from "./chunk-XLPRFXMF.mjs";
|
|
22
|
-
export {
|
|
23
|
-
Backdrop_default as Backdrop,
|
|
24
|
-
Breakpoint_default as Breakpoint,
|
|
25
|
-
Container_default as Container,
|
|
26
|
-
ErrorText_default as ErrorText,
|
|
27
|
-
Fade_default as Fade,
|
|
28
|
-
NoResults_default as NoResults,
|
|
29
|
-
PRIMARY_COLOR,
|
|
30
|
-
Pill_default as Pill,
|
|
31
|
-
Spinner_default as Spinner,
|
|
32
|
-
StepsComponent_default as StepsComponent,
|
|
33
|
-
baseFieldStyle,
|
|
34
|
-
createExerciseElementStyle,
|
|
35
|
-
exerciseDeleteButton,
|
|
36
|
-
exerciseEditButton,
|
|
37
|
-
headerButtonClass,
|
|
38
|
-
headerTippyClass,
|
|
39
|
-
tippyClassname,
|
|
40
|
-
toolbarExerciseButton,
|
|
41
|
-
xIconButton
|
|
42
|
-
};
|