evelearn-theme 2.0.8 → 2.0.10

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.
@@ -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
@@ -25,10 +25,9 @@ interface SpinnerProps {
25
25
  size?: 'base' | 'small';
26
26
  white?: boolean | string;
27
27
  visible?: boolean | string;
28
- isDark?: boolean;
29
28
  }
30
29
  declare const Spinner: {
31
- ({ visible, size, white, isDark }: SpinnerProps): react_jsx_runtime.JSX.Element | null;
30
+ ({ visible, size, white: isWhite }: SpinnerProps): react_jsx_runtime.JSX.Element | null;
32
31
  displayName: string;
33
32
  Centered: {
34
33
  (props: SpinnerProps): react_jsx_runtime.JSX.Element | null;
package/dist/index.d.ts CHANGED
@@ -25,10 +25,9 @@ interface SpinnerProps {
25
25
  size?: 'base' | 'small';
26
26
  white?: boolean | string;
27
27
  visible?: boolean | string;
28
- isDark?: boolean;
29
28
  }
30
29
  declare const Spinner: {
31
- ({ visible, size, white, isDark }: SpinnerProps): react_jsx_runtime.JSX.Element | null;
30
+ ({ visible, size, white: isWhite }: SpinnerProps): react_jsx_runtime.JSX.Element | null;
32
31
  displayName: string;
33
32
  Centered: {
34
33
  (props: SpinnerProps): react_jsx_runtime.JSX.Element | null;
package/dist/index.js CHANGED
@@ -340,9 +340,8 @@ var headerButtonClass = "w-10 h-10 rounded-full dark:hover:bg-slate-600 hover:bg
340
340
  // src/Spinners/Spinner.tsx
341
341
  var import_jsx_runtime2 = require("react/jsx-runtime");
342
342
  var Spinner = function(param) {
343
- var _param_visible = param.visible, visible = _param_visible === void 0 ? true : _param_visible, size = param.size, white = param.white, isDark = param.isDark;
343
+ var _param_visible = param.visible, visible = _param_visible === void 0 ? true : _param_visible, size = param.size, isWhite = param.white;
344
344
  if (visible === false) return null;
345
- var isWhite = white || isDark;
346
345
  var color = isWhite ? "stroke-white/90" : "stroke-slate-600/80";
347
346
  var bgColor = isWhite ? "stroke-white/20" : "stroke-slate-500/20";
348
347
  var dimensions = size === "small" ? "w-5 h-5" : "w-8 h-8";
@@ -619,7 +618,7 @@ var Button = function(param) {
619
618
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", {
620
619
  type: type || "button",
621
620
  disabled: disabled,
622
- 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()),
623
622
  onClick: onClick,
624
623
  children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", {
625
624
  className: "w-full max-h-11",
package/dist/index.mjs CHANGED
@@ -152,9 +152,8 @@ var headerButtonClass = "w-10 h-10 rounded-full dark:hover:bg-slate-600 hover:bg
152
152
  // src/Spinners/Spinner.tsx
153
153
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
154
154
  var Spinner = function(param) {
155
- var _param_visible = param.visible, visible = _param_visible === void 0 ? true : _param_visible, size = param.size, white = param.white, isDark = param.isDark;
155
+ var _param_visible = param.visible, visible = _param_visible === void 0 ? true : _param_visible, size = param.size, isWhite = param.white;
156
156
  if (visible === false) return null;
157
- var isWhite = white || isDark;
158
157
  var color = isWhite ? "stroke-white/90" : "stroke-slate-600/80";
159
158
  var bgColor = isWhite ? "stroke-white/20" : "stroke-slate-500/20";
160
159
  var dimensions = size === "small" ? "w-5 h-5" : "w-8 h-8";
@@ -431,7 +430,7 @@ var Button = function(param) {
431
430
  return /* @__PURE__ */ jsx11("button", {
432
431
  type: type || "button",
433
432
  disabled: disabled,
434
- 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()),
435
434
  onClick: onClick,
436
435
  children: /* @__PURE__ */ jsx11("div", {
437
436
  className: "w-full max-h-11",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evelearn-theme",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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
- };