evelearn-theme 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +86 -3
- package/dist/index.d.ts +86 -3
- package/dist/index.js +1895 -1373
- package/dist/index.mjs +1756 -1207
- package/package.json +5 -10
package/dist/index.mjs
CHANGED
|
@@ -1,1333 +1,1882 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
headerTippyClass,
|
|
21
|
-
tippyClassname,
|
|
22
|
-
toolbarExerciseButton,
|
|
23
|
-
xIconButton
|
|
24
|
-
} from "./chunk-XLPRFXMF.mjs";
|
|
25
|
-
|
|
26
|
-
// src/Backdrop/Overlay.tsx
|
|
27
|
-
import { useEffect, useState } from "react";
|
|
28
|
-
import ReactDOM from "react-dom";
|
|
29
|
-
import { jsx } from "react/jsx-runtime";
|
|
30
|
-
var Overlay = ({ visible, onDismissed, onClick, zIndex, isDark, children, opacity, withContainer = true }) => {
|
|
31
|
-
const [modalRoot, setModalRoot] = useState(null);
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
let root = document.getElementById("modal-root");
|
|
34
|
-
if (!root) {
|
|
35
|
-
root = document.createElement("div");
|
|
36
|
-
root.id = "modal-root";
|
|
37
|
-
document.body.appendChild(root);
|
|
1
|
+
// src/constants.tsx
|
|
2
|
+
function _array_like_to_array(arr, len) {
|
|
3
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
4
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5
|
+
return arr2;
|
|
6
|
+
}
|
|
7
|
+
function _array_with_holes(arr) {
|
|
8
|
+
if (Array.isArray(arr)) return arr;
|
|
9
|
+
}
|
|
10
|
+
function _define_property(obj, key, value) {
|
|
11
|
+
if (key in obj) {
|
|
12
|
+
Object.defineProperty(obj, key, {
|
|
13
|
+
value: value,
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true
|
|
17
|
+
});
|
|
18
|
+
} else {
|
|
19
|
+
obj[key] = value;
|
|
38
20
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
21
|
+
return obj;
|
|
22
|
+
}
|
|
23
|
+
function _iterable_to_array_limit(arr, i) {
|
|
24
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
25
|
+
if (_i == null) return;
|
|
26
|
+
var _arr = [];
|
|
27
|
+
var _n = true;
|
|
28
|
+
var _d = false;
|
|
29
|
+
var _s, _e;
|
|
30
|
+
try {
|
|
31
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
32
|
+
_arr.push(_s.value);
|
|
33
|
+
if (i && _arr.length === i) break;
|
|
34
|
+
}
|
|
35
|
+
} catch (err) {
|
|
36
|
+
_d = true;
|
|
37
|
+
_e = err;
|
|
38
|
+
} finally{
|
|
39
|
+
try {
|
|
40
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
41
|
+
} finally{
|
|
42
|
+
if (_d) throw _e;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return _arr;
|
|
46
|
+
}
|
|
47
|
+
function _non_iterable_rest() {
|
|
48
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
49
|
+
}
|
|
50
|
+
function _object_destructuring_empty(o) {
|
|
51
|
+
if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
|
|
52
|
+
return o;
|
|
53
|
+
}
|
|
54
|
+
function _object_spread(target) {
|
|
55
|
+
for(var i = 1; i < arguments.length; i++){
|
|
56
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
57
|
+
var ownKeys = Object.keys(source);
|
|
58
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
59
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
60
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
ownKeys.forEach(function(key) {
|
|
64
|
+
_define_property(target, key, source[key]);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return target;
|
|
68
|
+
}
|
|
69
|
+
function ownKeys(object, enumerableOnly) {
|
|
70
|
+
var keys = Object.keys(object);
|
|
71
|
+
if (Object.getOwnPropertySymbols) {
|
|
72
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
73
|
+
if (enumerableOnly) {
|
|
74
|
+
symbols = symbols.filter(function(sym) {
|
|
75
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
keys.push.apply(keys, symbols);
|
|
79
|
+
}
|
|
80
|
+
return keys;
|
|
81
|
+
}
|
|
82
|
+
function _object_spread_props(target, source) {
|
|
83
|
+
source = source != null ? source : {};
|
|
84
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
85
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
86
|
+
} else {
|
|
87
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
88
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return target;
|
|
92
|
+
}
|
|
93
|
+
function _object_without_properties(source, excluded) {
|
|
94
|
+
if (source == null) return {};
|
|
95
|
+
var target = _object_without_properties_loose(source, excluded);
|
|
96
|
+
var key, i;
|
|
97
|
+
if (Object.getOwnPropertySymbols) {
|
|
98
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
99
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
100
|
+
key = sourceSymbolKeys[i];
|
|
101
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
102
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
103
|
+
target[key] = source[key];
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return target;
|
|
107
|
+
}
|
|
108
|
+
function _object_without_properties_loose(source, excluded) {
|
|
109
|
+
if (source == null) return {};
|
|
110
|
+
var target = {};
|
|
111
|
+
var sourceKeys = Object.keys(source);
|
|
112
|
+
var key, i;
|
|
113
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
114
|
+
key = sourceKeys[i];
|
|
115
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
116
|
+
target[key] = source[key];
|
|
117
|
+
}
|
|
118
|
+
return target;
|
|
119
|
+
}
|
|
120
|
+
function _sliced_to_array(arr, i) {
|
|
121
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
122
|
+
}
|
|
123
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
124
|
+
if (!o) return;
|
|
125
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
126
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
127
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
128
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
129
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
130
|
+
}
|
|
131
|
+
var PRIMARY_COLOR = "#00b4d8";
|
|
132
|
+
// src/Common/ErrorText.tsx
|
|
133
|
+
import { jsx } from "react/jsx-runtime";
|
|
134
|
+
var ErrorText = function(param) {
|
|
135
|
+
var text = param.text, style = param.style, classNames = param.classNames;
|
|
136
|
+
return /* @__PURE__ */ jsx("p", {
|
|
137
|
+
className: classNames ? classNames : "text-red-500 font-semibold text-wrap py-auto",
|
|
138
|
+
style: style,
|
|
139
|
+
children: text
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
var ErrorText_default = ErrorText;
|
|
143
|
+
// src/Common/fieldStyle.ts
|
|
144
|
+
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";
|
|
145
|
+
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";
|
|
146
|
+
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";
|
|
147
|
+
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";
|
|
148
|
+
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";
|
|
149
|
+
var tippyClassname = "p-2 bg-slate-600 dark:bg-slate-900 opacity-90 text-white font-medium font-header rounded-lg";
|
|
150
|
+
var headerTippyClass = "rounded-lg p-2 bg-slate-950 opacity-95 text-white font-medium";
|
|
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-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";
|
|
153
|
+
// src/Spinners/Spinner.tsx
|
|
154
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
155
|
+
var Spinner = function(param) {
|
|
156
|
+
var _param_visible = param.visible, visible = _param_visible === void 0 ? true : _param_visible, size = param.size, white = param.white, isDark = param.isDark;
|
|
157
|
+
if (visible === false) return null;
|
|
158
|
+
var isWhite = white || isDark;
|
|
159
|
+
var color = isWhite ? "stroke-white/90" : "stroke-slate-600/80";
|
|
160
|
+
var bgColor = isWhite ? "stroke-white/20" : "stroke-slate-500/20";
|
|
161
|
+
var dimensions = size === "small" ? "w-5 h-5" : "w-8 h-8";
|
|
162
|
+
var spinnerClasses = "\n absolute\n top-0\n animate-spin\n ".concat(dimensions, "\n ");
|
|
163
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
164
|
+
className: "relative h-8 w-8 flex justify-center items-center",
|
|
165
|
+
children: [
|
|
166
|
+
/* @__PURE__ */ jsx2("svg", {
|
|
167
|
+
className: "absolute top-0 ".concat(dimensions, " ").concat(bgColor),
|
|
168
|
+
viewBox: "0 0 24 24",
|
|
169
|
+
fill: "none",
|
|
170
|
+
strokeWidth: "2.4",
|
|
171
|
+
children: /* @__PURE__ */ jsx2("circle", {
|
|
172
|
+
cx: "12",
|
|
173
|
+
cy: "12",
|
|
174
|
+
r: "10"
|
|
175
|
+
})
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ jsx2("svg", {
|
|
178
|
+
className: spinnerClasses,
|
|
179
|
+
viewBox: "0 0 24 24",
|
|
180
|
+
fill: "none",
|
|
181
|
+
strokeWidth: "2.4",
|
|
182
|
+
strokeLinecap: "round",
|
|
183
|
+
children: /* @__PURE__ */ jsx2("path", {
|
|
184
|
+
d: "\n M 12 2 \n A 10 10 0 0 1 22 12 \n A 10 10 0 0 1 12 22 \n A 10 10 0 0 1 2 12 \n A 10 10 0 0 1 12 2\n ",
|
|
185
|
+
strokeDasharray: "13 18.4",
|
|
186
|
+
stroke: "inherit",
|
|
187
|
+
className: color
|
|
188
|
+
})
|
|
189
|
+
})
|
|
190
|
+
]
|
|
191
|
+
});
|
|
192
|
+
};
|
|
193
|
+
var SpinnerCentered = function(props) {
|
|
194
|
+
if (props.visible === false) return null;
|
|
195
|
+
return /* @__PURE__ */ jsx2("div", {
|
|
196
|
+
className: "w-full flex justify-center items-center",
|
|
197
|
+
children: /* @__PURE__ */ jsx2(Spinner, _object_spread({}, props))
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
Spinner.displayName = "Spinner";
|
|
201
|
+
SpinnerCentered.displayName = "Spinner.Centered";
|
|
202
|
+
Spinner.Centered = SpinnerCentered;
|
|
203
|
+
var Spinner_default = Spinner;
|
|
204
|
+
// src/Common/NoResults.tsx
|
|
205
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
206
|
+
var HEIGHT = 160;
|
|
207
|
+
var WIDTH = HEIGHT * (16 / 9);
|
|
208
|
+
var NoResults = function(param) {
|
|
209
|
+
var loading = param.loading, message = param.message;
|
|
210
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
211
|
+
className: "relative w-full flex justify-center items-center",
|
|
212
|
+
children: [
|
|
213
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
214
|
+
className: "flex justify-start w-full space-x-2 py-3 p-4 bg-slate-100 dark:bg-slate-800 rounded-md",
|
|
215
|
+
children: [
|
|
216
|
+
/* @__PURE__ */ jsx3("div", {
|
|
217
|
+
style: {
|
|
218
|
+
width: "calc(".concat(WIDTH, "px + 1rem)"),
|
|
219
|
+
height: 320
|
|
220
|
+
},
|
|
221
|
+
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"
|
|
222
|
+
}),
|
|
223
|
+
/* @__PURE__ */ jsx3("div", {
|
|
224
|
+
style: {
|
|
225
|
+
width: "calc(".concat(WIDTH, "px + 1rem)"),
|
|
226
|
+
height: 320
|
|
227
|
+
},
|
|
228
|
+
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"
|
|
229
|
+
})
|
|
230
|
+
]
|
|
231
|
+
}),
|
|
232
|
+
!loading && /* @__PURE__ */ jsx3("div", {
|
|
233
|
+
className: "absolute w-full h-full flex justify-center items-center m-auto",
|
|
234
|
+
children: /* @__PURE__ */ jsx3("div", {
|
|
235
|
+
className: "p-4 rounded-lg bg-white dark:bg-slate-700 shadow-xl",
|
|
236
|
+
children: /* @__PURE__ */ jsx3("p", {
|
|
237
|
+
className: "font-semibold text-lg text-gray-700 dark:text-gray-300",
|
|
238
|
+
children: message || "No results"
|
|
239
|
+
})
|
|
240
|
+
})
|
|
241
|
+
})
|
|
242
|
+
]
|
|
243
|
+
});
|
|
244
|
+
};
|
|
245
|
+
var NoResults_default = NoResults;
|
|
246
|
+
// src/Common/Container.tsx
|
|
247
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
248
|
+
var Container = function(param) {
|
|
249
|
+
var backgroundImage = param.backgroundImage, style = param.style, children = param.children, onClick = param.onClick;
|
|
250
|
+
return backgroundImage ? /* @__PURE__ */ jsx4("div", {
|
|
251
|
+
style: _object_spread({
|
|
252
|
+
backgroundImage: backgroundImage,
|
|
253
|
+
backgroundSize: "cover"
|
|
254
|
+
}, style),
|
|
255
|
+
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",
|
|
256
|
+
onClick: onClick,
|
|
257
|
+
children: children ? children : null
|
|
258
|
+
}) : /* @__PURE__ */ jsx4("div", {
|
|
259
|
+
className: "w-full dark:bg-slate-950 mx-auto overflow-y-auto overflow-x-clip px-0 sm:px-16 relative pt-20",
|
|
260
|
+
onClick: onClick,
|
|
261
|
+
style: style || {
|
|
262
|
+
minHeight: "100vh"
|
|
263
|
+
},
|
|
264
|
+
children: children ? children : null
|
|
265
|
+
});
|
|
266
|
+
};
|
|
267
|
+
var Container_default = Container;
|
|
268
|
+
// src/Common/Pill.tsx
|
|
269
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
270
|
+
var Pill = function(param) {
|
|
271
|
+
var text = param.text;
|
|
272
|
+
return /* @__PURE__ */ jsx5("span", {
|
|
273
|
+
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",
|
|
274
|
+
children: text
|
|
275
|
+
});
|
|
276
|
+
};
|
|
277
|
+
var Pill_default = Pill;
|
|
278
|
+
// src/Common/StepsComponent.tsx
|
|
279
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
280
|
+
var StepsComponent = function(param) {
|
|
281
|
+
var steps = param.steps, activeStep = param.activeStep, onStepPress = param.onStepPress;
|
|
282
|
+
return /* @__PURE__ */ jsx6("div", {
|
|
283
|
+
className: "flex justify-between items-center w-full p-1 mb-2",
|
|
284
|
+
children: steps.map(function(step, index) {
|
|
285
|
+
return /* @__PURE__ */ jsx6("div", {
|
|
286
|
+
className: "flex justify-center items-center space-x-2 w-full",
|
|
287
|
+
children: /* @__PURE__ */ jsx6("div", {
|
|
288
|
+
className: "flex flex-col items-center",
|
|
289
|
+
children: /* @__PURE__ */ jsx6("button", {
|
|
290
|
+
type: "button",
|
|
291
|
+
onClick: function() {
|
|
292
|
+
return onStepPress(index);
|
|
293
|
+
},
|
|
294
|
+
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\n ".concat(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"),
|
|
295
|
+
children: /* @__PURE__ */ jsxs3("span", {
|
|
296
|
+
className: "font-medium truncate",
|
|
297
|
+
children: [
|
|
298
|
+
index + 1,
|
|
299
|
+
". ",
|
|
300
|
+
step.label
|
|
301
|
+
]
|
|
302
|
+
})
|
|
303
|
+
})
|
|
304
|
+
})
|
|
305
|
+
}, "step_".concat(index, "_").concat(step.label));
|
|
306
|
+
})
|
|
307
|
+
});
|
|
308
|
+
};
|
|
309
|
+
var StepsComponent_default = StepsComponent;
|
|
310
|
+
// src/Fade/Fade.tsx
|
|
311
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
312
|
+
var Fade = function(param) {
|
|
313
|
+
var children = param.children, inProp = param.inProp;
|
|
314
|
+
return /* @__PURE__ */ jsx7("div", {
|
|
315
|
+
className: "animate-fade-in",
|
|
316
|
+
children: children
|
|
317
|
+
});
|
|
318
|
+
};
|
|
319
|
+
var Fade_default = Fade;
|
|
320
|
+
// src/Backdrop/Backdrop.tsx
|
|
321
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
322
|
+
var Backdrop = function(param) {
|
|
323
|
+
var visible = param.visible, onClick = param.onClick, opacity = param.opacity;
|
|
324
|
+
if (!visible) return null;
|
|
325
|
+
return /* @__PURE__ */ jsx8("div", {
|
|
54
326
|
style: {
|
|
55
|
-
|
|
56
|
-
|
|
327
|
+
opacity: opacity ? opacity : 90,
|
|
328
|
+
zIndex: 21
|
|
57
329
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
330
|
+
className: "fixed top-0 left-0 w-full h-screen bg-gray-100 dark:bg-slate-900",
|
|
331
|
+
onClick: onClick
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
var Backdrop_default = Backdrop;
|
|
335
|
+
// src/Breakpoint/Breakpoint.tsx
|
|
336
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
337
|
+
var Breakpoint = function(param) {
|
|
338
|
+
var children = param.children, fromSize = param.fromSize, toSize = param.toSize;
|
|
339
|
+
var className = "";
|
|
340
|
+
if (fromSize && toSize) {
|
|
341
|
+
className = "hidden ".concat(fromSize, ":block ").concat(toSize, ":hidden");
|
|
342
|
+
} else if (fromSize) {
|
|
343
|
+
className = "hidden ".concat(fromSize, ":block");
|
|
344
|
+
} else if (toSize) {
|
|
345
|
+
className = "block ".concat(toSize, ":hidden");
|
|
346
|
+
}
|
|
347
|
+
return /* @__PURE__ */ jsx9("div", {
|
|
348
|
+
className: className,
|
|
349
|
+
children: children
|
|
350
|
+
});
|
|
351
|
+
};
|
|
352
|
+
var Breakpoint_default = Breakpoint;
|
|
353
|
+
// src/Backdrop/Overlay.tsx
|
|
354
|
+
import { useEffect, useState } from "react";
|
|
355
|
+
import ReactDOM from "react-dom";
|
|
356
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
357
|
+
var Overlay = function(param) {
|
|
358
|
+
var visible = param.visible, onDismissed = param.onDismissed, onClick = param.onClick, zIndex = param.zIndex, isDark = param.isDark, children = param.children, opacity = param.opacity, _param_withContainer = param.withContainer, withContainer = _param_withContainer === void 0 ? true : _param_withContainer;
|
|
359
|
+
var _useState = _sliced_to_array(useState(null), 2), modalRoot = _useState[0], setModalRoot = _useState[1];
|
|
360
|
+
useEffect(function() {
|
|
361
|
+
var root = document.getElementById("modal-root");
|
|
362
|
+
if (!root) {
|
|
363
|
+
root = document.createElement("div");
|
|
364
|
+
root.id = "modal-root";
|
|
365
|
+
document.body.appendChild(root);
|
|
366
|
+
}
|
|
367
|
+
setModalRoot(root);
|
|
368
|
+
return function() {
|
|
369
|
+
var root2 = document.getElementById("modal-root");
|
|
370
|
+
if (root2) {
|
|
371
|
+
document.body.removeChild(root2);
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
}, [
|
|
375
|
+
visible
|
|
376
|
+
]);
|
|
377
|
+
if (!visible || !modalRoot) return null;
|
|
378
|
+
return ReactDOM.createPortal(/* @__PURE__ */ jsx10("div", {
|
|
379
|
+
className: "animate-fade-in",
|
|
380
|
+
children: withContainer ? /* @__PURE__ */ jsx10("div", {
|
|
381
|
+
onClick: onDismissed || onClick,
|
|
382
|
+
className: "top-0 left-0 fixed w-full h-screen flex items-center justify-center",
|
|
383
|
+
style: {
|
|
384
|
+
background: isDark ? "rgba(0, 0, 0, ".concat(opacity || "0.7", ")") : "rgba(255, 255, 255, ".concat(opacity || "0.6", ")"),
|
|
385
|
+
zIndex: zIndex || 9999
|
|
386
|
+
},
|
|
387
|
+
children: children
|
|
388
|
+
}) : children
|
|
389
|
+
}), modalRoot);
|
|
63
390
|
};
|
|
64
391
|
var Overlay_default = Overlay;
|
|
65
|
-
|
|
66
392
|
// src/Button/Button.tsx
|
|
67
|
-
import { jsx as
|
|
68
|
-
var Button = (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
393
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
394
|
+
var Button = function(param) {
|
|
395
|
+
var _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, loading = param.loading, onClick = param.onClick, _param_kind = param.kind, kind = _param_kind === void 0 ? "primary" : _param_kind, _param_size = param.size, size = _param_size === void 0 ? "small" : _param_size, _param_type = param.type, type = _param_type === void 0 ? "button" : _param_type, children = param.children;
|
|
396
|
+
var styled = function() {
|
|
397
|
+
switch(kind){
|
|
398
|
+
case "primary":
|
|
399
|
+
return "bg-primary font-header text-white font-medium transition-all duration-75 ".concat(disabled ? "bg-white/50" : "hover:bg-black/10");
|
|
400
|
+
case "indigo":
|
|
401
|
+
return "bg-indigo-500 font-header text-white font-medium transition-all duration-75 ".concat(disabled ? "bg-white/50" : "hover:bg-black/10");
|
|
402
|
+
case "green":
|
|
403
|
+
return "bg-green-500 font-header text-white font-medium transition-all duration-75 ".concat(disabled ? "bg-white/50" : "hover:bg-black/10");
|
|
404
|
+
case "teal":
|
|
405
|
+
return "bg-teal-500 font-header text-white font-medium transition-all duration-75 ".concat(disabled ? "bg-white/50" : "hover:bg-black/10");
|
|
406
|
+
case "secondary":
|
|
407
|
+
return "bg-secondary text-white font-header font-medium hover:bg-black/10 transition-all duration-75";
|
|
408
|
+
case "base":
|
|
409
|
+
return "bg-white border-1 font-header border-gray-200 dark:bg-slate-600 dark:text-gray-100 dark:hover:bg-slate-400 hover:bg-slate-100 transition-all duration-75";
|
|
410
|
+
case "gray":
|
|
411
|
+
return "bg-slate-400 dark:bg-slate-700 font-header text-white border-1 font-medium hover:bg-black/10 transition-opacity duration-75";
|
|
412
|
+
case "alert":
|
|
413
|
+
return "bg-amber-500 font-header text-white transition-all hover:bg-black/10 duration-75";
|
|
414
|
+
case "warning":
|
|
415
|
+
return "bg-red-500 font-header text-white font-medium hover:bg-black/10 transition-opacity duration-100";
|
|
416
|
+
default:
|
|
417
|
+
break;
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
var sized = function() {
|
|
421
|
+
switch(size){
|
|
422
|
+
case "small":
|
|
423
|
+
return "p-1";
|
|
424
|
+
case "fixed":
|
|
425
|
+
return "box-border w-32 h-11";
|
|
426
|
+
case "large":
|
|
427
|
+
return "px-2 h-11";
|
|
428
|
+
default:
|
|
429
|
+
return "px-2 py-1";
|
|
430
|
+
}
|
|
431
|
+
};
|
|
432
|
+
return /* @__PURE__ */ jsx11("button", {
|
|
433
|
+
type: type || "button",
|
|
434
|
+
disabled: disabled,
|
|
435
|
+
className: "rounded-lg focus:outline-none transition duration-100 ".concat(styled(), " ").concat(sized()),
|
|
436
|
+
onClick: onClick,
|
|
437
|
+
children: /* @__PURE__ */ jsx11("div", {
|
|
438
|
+
className: "w-full max-h-11",
|
|
439
|
+
children: loading ? /* @__PURE__ */ jsx11("div", {
|
|
440
|
+
className: "flex w-full justify-center items-center",
|
|
441
|
+
children: /* @__PURE__ */ jsx11(Spinner_default, {
|
|
442
|
+
white: true
|
|
443
|
+
})
|
|
444
|
+
}) : children
|
|
445
|
+
})
|
|
446
|
+
});
|
|
106
447
|
};
|
|
107
448
|
var Button_default = Button;
|
|
108
|
-
|
|
109
449
|
// src/Button/FunButton.tsx
|
|
110
450
|
import { useMemo } from "react";
|
|
111
451
|
import { motion } from "framer-motion";
|
|
112
|
-
import { jsx as
|
|
113
|
-
var FunButton = ({
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}, [size]);
|
|
158
|
-
const computedClassName = useMemo(() => {
|
|
159
|
-
const cName = className + " rounded-lg border-none p-0 cursor-pointer opacity-90 hover:bg-black/30 transition-opacity";
|
|
160
|
-
return cName + (disabled ? " opacity-70 cursor-default" : "");
|
|
161
|
-
}, [className, disabled]);
|
|
162
|
-
const computedClassStyle = useMemo(() => {
|
|
163
|
-
const cName = classStyle;
|
|
164
|
-
return cName + (disabled ? " opacity-70 cursor-default hover:bg-black/70" : "");
|
|
165
|
-
}, [classStyle, disabled]);
|
|
166
|
-
return /* @__PURE__ */ jsx3(
|
|
167
|
-
motion.button,
|
|
168
|
-
{
|
|
169
|
-
className: `${computedClassName}`,
|
|
170
|
-
style: { background: front, outlineOffset: "4px" },
|
|
171
|
-
type,
|
|
172
|
-
onMouseDown: onClick,
|
|
173
|
-
whileTap: { y: disabled ? 0 : 2 },
|
|
174
|
-
transition: { duration: 0.1, ease: "easeInOut" },
|
|
175
|
-
children: /* @__PURE__ */ jsx3(
|
|
176
|
-
motion.span,
|
|
177
|
-
{
|
|
178
|
-
className: computedClassStyle,
|
|
179
|
-
style: {
|
|
180
|
-
background: bottom,
|
|
181
|
-
opacity: 1
|
|
182
|
-
},
|
|
183
|
-
initial: { y: active ? 0 : -6 },
|
|
184
|
-
animate: { y: active ? 0 : -6 },
|
|
185
|
-
whileTap: { y: disabled ? -6 : 0 },
|
|
186
|
-
transition: { duration: 0.1, ease: "easeInOut" },
|
|
187
|
-
children: loading ? /* @__PURE__ */ jsx3("div", { className: size === "small" ? "min-h-6" : "min-h-10", children: /* @__PURE__ */ jsx3(Spinner_default.Centered, { visible: true, size: size === "small" ? "small" : "base", white: true }) }) : children
|
|
452
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
453
|
+
var FunButton = function(param) {
|
|
454
|
+
var onClick = param.onClick, disabled = param.disabled, type = param.type, children = param.children, _param_color = param.color, color = _param_color === void 0 ? "primary" : _param_color, loading = param.loading, active = param.active, className = param.className, _param_size = param.size, size = _param_size === void 0 ? "base" : _param_size;
|
|
455
|
+
var _useMemo = useMemo(function() {
|
|
456
|
+
switch(color){
|
|
457
|
+
case "primary":
|
|
458
|
+
return {
|
|
459
|
+
bottom: "#00b4d8",
|
|
460
|
+
front: "#0284c7"
|
|
461
|
+
};
|
|
462
|
+
case "red":
|
|
463
|
+
return {
|
|
464
|
+
bottom: "#f00f0f",
|
|
465
|
+
front: "#b91c1c"
|
|
466
|
+
};
|
|
467
|
+
case "green":
|
|
468
|
+
return {
|
|
469
|
+
bottom: "#22c55e",
|
|
470
|
+
front: "#16a34a"
|
|
471
|
+
};
|
|
472
|
+
case "purple":
|
|
473
|
+
return {
|
|
474
|
+
bottom: "#6366f1",
|
|
475
|
+
front: "#4f46e5"
|
|
476
|
+
};
|
|
477
|
+
case "teal":
|
|
478
|
+
return {
|
|
479
|
+
bottom: "#14b8a6",
|
|
480
|
+
front: "#0d9488"
|
|
481
|
+
};
|
|
482
|
+
case "cyan":
|
|
483
|
+
return {
|
|
484
|
+
bottom: "#06b6d4",
|
|
485
|
+
front: "#0891b2"
|
|
486
|
+
};
|
|
487
|
+
case "yellow":
|
|
488
|
+
return {
|
|
489
|
+
bottom: "#eab308",
|
|
490
|
+
front: "#ca8a04"
|
|
491
|
+
};
|
|
492
|
+
default:
|
|
493
|
+
return {
|
|
494
|
+
bottom: "#00b4d8",
|
|
495
|
+
front: "#0369a1"
|
|
496
|
+
};
|
|
188
497
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
498
|
+
}, [
|
|
499
|
+
color
|
|
500
|
+
]), front = _useMemo.front, bottom = _useMemo.bottom;
|
|
501
|
+
var classStyle = useMemo(function() {
|
|
502
|
+
switch(size){
|
|
503
|
+
case "base":
|
|
504
|
+
return "relative block px-8 py-3 rounded-lg text-lg text-white font-medium font-header hover:bg-slate-900/20";
|
|
505
|
+
case "big":
|
|
506
|
+
return "relative block px-12 py-4 rounded-lg text-lg text-white font-medium font-header hover:bg-slate-900/20";
|
|
507
|
+
case "small":
|
|
508
|
+
return "relative block px-6 py-1 rounded-lg text-lg text-white font-medium font-header hover:bg-slate-900/20";
|
|
509
|
+
case "square":
|
|
510
|
+
return "relative block h-12 w-12 rounded text-lg flex items-center justify-center text-white font-medium font-header hover:bg-slate-900/20";
|
|
511
|
+
default:
|
|
512
|
+
return "relative block px-8 py-3 rounded-lg text-lg text-white font-medium font-header hover:bg-slate-900/20";
|
|
513
|
+
}
|
|
514
|
+
}, [
|
|
515
|
+
size
|
|
516
|
+
]);
|
|
517
|
+
var computedClassName = useMemo(function() {
|
|
518
|
+
var cName = className + " rounded-lg border-none p-0 cursor-pointer opacity-90 hover:bg-black/30 transition-opacity";
|
|
519
|
+
return cName + (disabled ? " opacity-70 cursor-default" : "");
|
|
520
|
+
}, [
|
|
521
|
+
className,
|
|
522
|
+
disabled
|
|
523
|
+
]);
|
|
524
|
+
var computedClassStyle = useMemo(function() {
|
|
525
|
+
var cName = classStyle;
|
|
526
|
+
return cName + (disabled ? " opacity-70 cursor-default hover:bg-black/70" : "");
|
|
527
|
+
}, [
|
|
528
|
+
classStyle,
|
|
529
|
+
disabled
|
|
530
|
+
]);
|
|
531
|
+
return /* @__PURE__ */ jsx12(motion.button, {
|
|
532
|
+
className: "".concat(computedClassName),
|
|
533
|
+
style: {
|
|
534
|
+
background: front,
|
|
535
|
+
outlineOffset: "4px"
|
|
536
|
+
},
|
|
537
|
+
type: type,
|
|
538
|
+
onMouseDown: onClick,
|
|
539
|
+
whileTap: {
|
|
540
|
+
y: disabled ? 0 : 2
|
|
541
|
+
},
|
|
542
|
+
transition: {
|
|
543
|
+
duration: 0.1,
|
|
544
|
+
ease: "easeInOut"
|
|
545
|
+
},
|
|
546
|
+
children: /* @__PURE__ */ jsx12(motion.span, {
|
|
547
|
+
className: computedClassStyle,
|
|
548
|
+
style: {
|
|
549
|
+
background: bottom,
|
|
550
|
+
opacity: 1
|
|
551
|
+
},
|
|
552
|
+
initial: {
|
|
553
|
+
y: active ? 0 : -6
|
|
554
|
+
},
|
|
555
|
+
animate: {
|
|
556
|
+
y: active ? 0 : -6
|
|
557
|
+
},
|
|
558
|
+
whileTap: {
|
|
559
|
+
y: disabled ? -6 : 0
|
|
560
|
+
},
|
|
561
|
+
transition: {
|
|
562
|
+
duration: 0.1,
|
|
563
|
+
ease: "easeInOut"
|
|
564
|
+
},
|
|
565
|
+
children: loading ? /* @__PURE__ */ jsx12("div", {
|
|
566
|
+
className: size === "small" ? "min-h-6" : "min-h-10",
|
|
567
|
+
children: /* @__PURE__ */ jsx12(Spinner_default.Centered, {
|
|
568
|
+
visible: true,
|
|
569
|
+
size: size === "small" ? "small" : "base",
|
|
570
|
+
white: true
|
|
571
|
+
})
|
|
572
|
+
}) : children
|
|
573
|
+
})
|
|
574
|
+
});
|
|
192
575
|
};
|
|
193
576
|
var FunButton_default = FunButton;
|
|
194
|
-
|
|
195
577
|
// src/Button/FunRoundButton.tsx
|
|
196
578
|
import { useMemo as useMemo2 } from "react";
|
|
197
579
|
import { motion as motion2 } from "framer-motion";
|
|
198
|
-
import { jsx as
|
|
199
|
-
var FunRoundButton = (
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
580
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
581
|
+
var FunRoundButton = function(param) {
|
|
582
|
+
var onClick = param.onClick, disabled = param.disabled, type = param.type, children = param.children, color = param.color, active = param.active, className = param.className, _param_size = param.size, size = _param_size === void 0 ? 44 : _param_size;
|
|
583
|
+
var _useMemo2 = useMemo2(function() {
|
|
584
|
+
switch(color){
|
|
585
|
+
case "primary":
|
|
586
|
+
return {
|
|
587
|
+
bottom: "#00b4d8",
|
|
588
|
+
front: "#0284c7"
|
|
589
|
+
};
|
|
590
|
+
case "red":
|
|
591
|
+
return {
|
|
592
|
+
bottom: disabled ? "hsl(340deg 100% 42%)" : "hsl(345deg 100% 47%)",
|
|
593
|
+
front: disabled ? "hsl(340deg 100% 52%)" : "hsl(340deg 100% 32%)"
|
|
594
|
+
};
|
|
595
|
+
case "green":
|
|
596
|
+
return {
|
|
597
|
+
bottom: disabled ? "#86efac" : "#22c55e",
|
|
598
|
+
front: disabled ? "#4ade80" : "#16a34a"
|
|
599
|
+
};
|
|
600
|
+
case "purple":
|
|
601
|
+
return {
|
|
602
|
+
bottom: disabled ? "#a5b4fc" : "#6366f1",
|
|
603
|
+
front: disabled ? "#818cf8" : "#4f46e5"
|
|
604
|
+
};
|
|
605
|
+
case "teal":
|
|
606
|
+
return {
|
|
607
|
+
bottom: disabled ? "#5eead4" : "#14b8a6",
|
|
608
|
+
front: disabled ? "#2dd4bf" : "#0d9488"
|
|
609
|
+
};
|
|
610
|
+
case "yellow":
|
|
611
|
+
return {
|
|
612
|
+
bottom: disabled ? "#fde047" : "#eab308",
|
|
613
|
+
front: disabled ? "#facc15" : "#ca8a04"
|
|
614
|
+
};
|
|
615
|
+
default:
|
|
616
|
+
return {
|
|
617
|
+
bottom: disabled ? "#d1d5db" : "#00b4d8",
|
|
618
|
+
front: disabled ? "#38bdf8" : "#0369a1"
|
|
619
|
+
};
|
|
620
|
+
}
|
|
621
|
+
}, [
|
|
622
|
+
color,
|
|
623
|
+
disabled
|
|
624
|
+
]), front = _useMemo2.front, bottom = _useMemo2.bottom;
|
|
625
|
+
return /* @__PURE__ */ jsx13(motion2.button, {
|
|
626
|
+
className: "".concat(className || "border-none p-0 flex justify-center items-center cursor-pointer z-10", " ").concat(disabled ? "opacity-70 cursor-default" : "hover:opacity-95"),
|
|
627
|
+
style: {
|
|
628
|
+
background: front,
|
|
240
629
|
height: size,
|
|
241
630
|
width: size + 2,
|
|
242
|
-
borderRadius: (size + 2) / 2
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
631
|
+
borderRadius: (size + 2) / 2,
|
|
632
|
+
outlineOffset: 0
|
|
633
|
+
},
|
|
634
|
+
type: type,
|
|
635
|
+
disabled: disabled,
|
|
636
|
+
onClick: onClick,
|
|
637
|
+
whileHover: {
|
|
638
|
+
opacity: 0.95
|
|
639
|
+
},
|
|
640
|
+
whileTap: {
|
|
641
|
+
y: disabled ? 0 : 2
|
|
642
|
+
},
|
|
643
|
+
children: /* @__PURE__ */ jsx13(motion2.span, {
|
|
644
|
+
className: "flex justify-center items-center z-10",
|
|
645
|
+
style: {
|
|
646
|
+
background: bottom,
|
|
647
|
+
height: size,
|
|
648
|
+
width: size + 2,
|
|
649
|
+
borderRadius: (size + 2) / 2
|
|
650
|
+
},
|
|
651
|
+
initial: {
|
|
652
|
+
y: active ? 0 : -6
|
|
653
|
+
},
|
|
654
|
+
animate: {
|
|
655
|
+
y: active ? 0 : -6
|
|
656
|
+
},
|
|
657
|
+
transition: {
|
|
658
|
+
duration: 0.1,
|
|
659
|
+
ease: "easeInOut"
|
|
660
|
+
},
|
|
661
|
+
whileHover: {
|
|
662
|
+
opacity: 0.95
|
|
663
|
+
},
|
|
664
|
+
whileTap: {
|
|
665
|
+
y: disabled ? active ? 0 : -6 : 0
|
|
666
|
+
},
|
|
667
|
+
children: children
|
|
668
|
+
})
|
|
669
|
+
});
|
|
254
670
|
};
|
|
255
671
|
var FunRoundButton_default = FunRoundButton;
|
|
256
|
-
|
|
257
672
|
// src/Checkbox/Checkbox.tsx
|
|
258
673
|
import { useMemo as useMemo3 } from "react";
|
|
259
674
|
import { useField } from "formik";
|
|
260
|
-
import { jsx as
|
|
261
|
-
var Checkbox = (
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
675
|
+
import { jsx as jsx14, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
676
|
+
var Checkbox = function(param) {
|
|
677
|
+
var name = param.name, labelText = param.labelText, isLarge = param.isLarge, onChange = param.onChange, isDisabled = param.isDisabled;
|
|
678
|
+
var _useField = _sliced_to_array(useField(name), 3), value = _useField[0].value, error = _useField[1].error, _useField_ = _useField[2], setValue = _useField_.setValue, setTouched = _useField_.setTouched;
|
|
679
|
+
var onCheck = function(e) {
|
|
680
|
+
setTouched(true);
|
|
681
|
+
setValue(!value, true);
|
|
682
|
+
};
|
|
683
|
+
var rand = useMemo3(function() {
|
|
684
|
+
return Math.random();
|
|
685
|
+
}, []);
|
|
686
|
+
return /* @__PURE__ */ jsxs4("div", {
|
|
687
|
+
className: "relative flex flex-col justify-center items-center",
|
|
688
|
+
children: [
|
|
689
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
690
|
+
className: "flex items-center",
|
|
691
|
+
children: [
|
|
692
|
+
/* @__PURE__ */ jsx14("input", {
|
|
693
|
+
disabled: !!isDisabled,
|
|
694
|
+
onChange: function(e) {
|
|
695
|
+
onCheck(e);
|
|
696
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(Boolean(e.target.value));
|
|
697
|
+
},
|
|
698
|
+
value: value ? "true" : "false",
|
|
699
|
+
id: "".concat(name).concat(rand),
|
|
700
|
+
name: name,
|
|
701
|
+
type: "checkbox",
|
|
702
|
+
checked: !!value,
|
|
703
|
+
className: "form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded ".concat(isLarge ? "h-5 w-5" : "h-4 w-4")
|
|
704
|
+
}),
|
|
705
|
+
typeof labelText === "string" ? /* @__PURE__ */ jsx14("label", {
|
|
706
|
+
htmlFor: "".concat(name).concat(rand),
|
|
707
|
+
className: "ml-2 block text-sm text-gray-800 dark:text-gray-200",
|
|
708
|
+
children: labelText
|
|
709
|
+
}) : /* @__PURE__ */ jsx14("label", {
|
|
710
|
+
htmlFor: "".concat(name).concat(rand),
|
|
711
|
+
children: labelText
|
|
712
|
+
})
|
|
713
|
+
]
|
|
714
|
+
}),
|
|
715
|
+
error && /* @__PURE__ */ jsx14(ErrorText_default, {
|
|
716
|
+
classNames: "absolute w-64 left-6 top-4 text-xs text-red-500",
|
|
717
|
+
text: error
|
|
718
|
+
})
|
|
719
|
+
]
|
|
720
|
+
});
|
|
292
721
|
};
|
|
293
|
-
var MultiChoiceCheckBox = (
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
722
|
+
var MultiChoiceCheckBox = function(param) {
|
|
723
|
+
var name = param.name, hasMultipleAnswers = param.hasMultipleAnswers, index = param.index, isLarge = param.isLarge, allOptionsName = param.allOptionsName;
|
|
724
|
+
var _useField = _sliced_to_array(useField(name), 3), value = _useField[0].value, ref = _object_destructuring_empty(_useField[1]), _useField_ = _useField[2], setValue = _useField_.setValue, setTouched = _useField_.setTouched;
|
|
725
|
+
var _useField1 = _sliced_to_array(useField(allOptionsName), 3), _useField_1 = _useField1[0], optionsValue = _useField_1.value, _useField_2 = _useField1[2], setOptionsValue = _useField_2.setValue;
|
|
726
|
+
var onCheck = function(e) {
|
|
727
|
+
setTouched(true);
|
|
728
|
+
if (hasMultipleAnswers) {
|
|
729
|
+
setValue(!value);
|
|
730
|
+
return;
|
|
731
|
+
}
|
|
732
|
+
setOptionsValue(optionsValue === null || optionsValue === void 0 ? void 0 : optionsValue.map(function(el, idx) {
|
|
733
|
+
return {
|
|
734
|
+
option: el.option,
|
|
735
|
+
id: el.id,
|
|
736
|
+
isCorrectAnswer: index === idx ? !el.isCorrectAnswer : false
|
|
737
|
+
};
|
|
738
|
+
}));
|
|
739
|
+
};
|
|
740
|
+
return /* @__PURE__ */ jsx14("div", {
|
|
741
|
+
className: "flex flex-col justify-center items-center",
|
|
742
|
+
children: /* @__PURE__ */ jsx14("div", {
|
|
743
|
+
className: "flex items-center",
|
|
744
|
+
children: /* @__PURE__ */ jsx14("input", {
|
|
745
|
+
onChange: function(e) {
|
|
746
|
+
return onCheck(e);
|
|
747
|
+
},
|
|
748
|
+
value: index,
|
|
749
|
+
checked: !!value,
|
|
750
|
+
id: name,
|
|
751
|
+
name: name,
|
|
752
|
+
type: "checkbox",
|
|
753
|
+
className: "form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded ".concat(isLarge ? "h-5 w-5" : "h-4 w-4")
|
|
754
|
+
})
|
|
755
|
+
})
|
|
756
|
+
});
|
|
316
757
|
};
|
|
317
758
|
Checkbox.Multi = MultiChoiceCheckBox;
|
|
318
759
|
var Checkbox_default = Checkbox;
|
|
319
|
-
|
|
320
760
|
// src/Checkbox/RadioOption.tsx
|
|
321
761
|
import { useField as useField2 } from "formik";
|
|
322
|
-
import { jsx as
|
|
323
|
-
var RadioOption = (
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
762
|
+
import { jsx as jsx15, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
763
|
+
var RadioOption = function(param) {
|
|
764
|
+
var name = param.name, isLarge = param.isLarge, labelText = param.labelText, option = param.option, onSelect = param.onSelect;
|
|
765
|
+
var _useField2 = _sliced_to_array(useField2(name), 3), value = _useField2[0].value, ref = _object_destructuring_empty(_useField2[1]), setValue = _useField2[2].setValue;
|
|
766
|
+
return /* @__PURE__ */ jsxs5("div", {
|
|
767
|
+
className: "flex items-center",
|
|
768
|
+
children: [
|
|
769
|
+
/* @__PURE__ */ jsx15("input", {
|
|
770
|
+
onChange: function() {
|
|
771
|
+
setValue(option);
|
|
772
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect();
|
|
773
|
+
},
|
|
774
|
+
value: option,
|
|
775
|
+
id: option,
|
|
776
|
+
name: name,
|
|
777
|
+
type: "checkbox",
|
|
778
|
+
checked: value === option,
|
|
779
|
+
className: "form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded ".concat(isLarge ? "h-5 w-5" : "h-4 w-4")
|
|
780
|
+
}),
|
|
781
|
+
typeof labelText === "string" ? /* @__PURE__ */ jsx15("label", {
|
|
782
|
+
htmlFor: option,
|
|
783
|
+
className: "ml-2 block text-sm text-gray-900",
|
|
784
|
+
children: labelText
|
|
785
|
+
}) : /* @__PURE__ */ jsx15("label", {
|
|
786
|
+
htmlFor: option,
|
|
787
|
+
children: labelText
|
|
788
|
+
})
|
|
789
|
+
]
|
|
790
|
+
});
|
|
343
791
|
};
|
|
344
792
|
var RadioOption_default = RadioOption;
|
|
345
|
-
|
|
346
793
|
// src/Common/BottomAlert.tsx
|
|
347
794
|
import ReactDOM2 from "react-dom";
|
|
348
|
-
import { jsx as
|
|
349
|
-
var BottomAlert = (
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
"div",
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
795
|
+
import { jsx as jsx16, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
796
|
+
var BottomAlert = function(param) {
|
|
797
|
+
var isDark = param.isDark, setDontShowAgain = param.setDontShowAgain, dontShowAgain = param.dontShowAgain, title = param.title, borderColor = param.borderColor, onDismissed = param.onDismissed, cancelText = param.cancelText, confirmText = param.confirmText, onConfirm = param.onConfirm, onCancel = param.onCancel, isSingleAction = param.isSingleAction, children = param.children, buttonColor = param.buttonColor;
|
|
798
|
+
var dismiss = function() {
|
|
799
|
+
onDismissed === null || onDismissed === void 0 ? void 0 : onDismissed();
|
|
800
|
+
};
|
|
801
|
+
return /* @__PURE__ */ jsx16("div", {
|
|
802
|
+
className: "top-0 left-0 fixed w-full h-screen flex justify-center",
|
|
803
|
+
style: {
|
|
804
|
+
background: isDark ? "rgba(0, 0, 0, 0.1)" : "rgba(255, 255, 255, 0.1)",
|
|
805
|
+
zIndex: 9999
|
|
806
|
+
},
|
|
807
|
+
children: /* @__PURE__ */ jsx16("div", {
|
|
808
|
+
className: "absolute top-0 w-full h-screen flex justify-center bg-gray-200/90 dark:bg-slate-800/50",
|
|
809
|
+
children: /* @__PURE__ */ jsx16("div", {
|
|
810
|
+
className: "absolute sm:w-1/2 w-full mx-auto shadow-xl rounded-md p-6 flex z-50 flex-col top-24 bg-white dark:bg-slate-900 overflow-clip rounded-bl-lg rounded-br-lg border-b-8 border-b-blue-500",
|
|
811
|
+
children: /* @__PURE__ */ jsxs6("div", {
|
|
812
|
+
style: {
|
|
813
|
+
borderColor: borderColor || "#0ea5e9"
|
|
814
|
+
},
|
|
815
|
+
children: [
|
|
816
|
+
/* @__PURE__ */ jsx16("h3", {
|
|
817
|
+
className: "font-semibold font-header text-gray-700 dark:text-gray-300 text-xl",
|
|
818
|
+
children: title
|
|
819
|
+
}),
|
|
820
|
+
/* @__PURE__ */ jsx16("div", {
|
|
821
|
+
className: "mt-2 text-lg",
|
|
822
|
+
children: children
|
|
823
|
+
}),
|
|
824
|
+
setDontShowAgain ? /* @__PURE__ */ jsxs6("div", {
|
|
825
|
+
className: "flex items-center space-x-1",
|
|
826
|
+
children: [
|
|
827
|
+
/* @__PURE__ */ jsx16("input", {
|
|
828
|
+
onChange: function() {
|
|
829
|
+
setDontShowAgain(function(s) {
|
|
830
|
+
return !s;
|
|
831
|
+
});
|
|
832
|
+
},
|
|
833
|
+
id: "show_again_check",
|
|
834
|
+
checked: !!dontShowAgain,
|
|
835
|
+
type: "checkbox",
|
|
836
|
+
className: "form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded h-4 w-4"
|
|
837
|
+
}),
|
|
838
|
+
/* @__PURE__ */ jsx16("label", {
|
|
839
|
+
htmlFor: "show_again_check",
|
|
840
|
+
className: "dark:text-gray-200 text-gray-700",
|
|
841
|
+
children: "Don't show again"
|
|
842
|
+
})
|
|
843
|
+
]
|
|
844
|
+
}) : null,
|
|
845
|
+
/* @__PURE__ */ jsx16("div", {
|
|
846
|
+
className: "mt-4 flex items-center justify-end space-x-4 z-10",
|
|
847
|
+
children: isSingleAction ? /* @__PURE__ */ jsx16(Button_default, {
|
|
848
|
+
type: "button",
|
|
849
|
+
kind: buttonColor,
|
|
850
|
+
onClick: function() {
|
|
851
|
+
onConfirm(true);
|
|
852
|
+
dismiss();
|
|
853
|
+
},
|
|
854
|
+
children: confirmText || "Okay"
|
|
855
|
+
}) : /* @__PURE__ */ jsxs6("div", {
|
|
856
|
+
className: "w-1/3 flex justify-end space-x-4",
|
|
857
|
+
children: [
|
|
858
|
+
/* @__PURE__ */ jsx16("div", {
|
|
859
|
+
className: "w-full flex flex-col",
|
|
860
|
+
children: /* @__PURE__ */ jsx16(Button_default, {
|
|
861
|
+
type: "button",
|
|
862
|
+
kind: "secondary",
|
|
863
|
+
onClick: function() {
|
|
864
|
+
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
865
|
+
dismiss();
|
|
866
|
+
},
|
|
867
|
+
children: cancelText || "Cancel"
|
|
868
|
+
})
|
|
869
|
+
}),
|
|
870
|
+
/* @__PURE__ */ jsx16("div", {
|
|
871
|
+
className: "w-full flex flex-col",
|
|
872
|
+
children: /* @__PURE__ */ jsx16(Button_default, {
|
|
873
|
+
type: "button",
|
|
874
|
+
kind: buttonColor,
|
|
875
|
+
onClick: function() {
|
|
876
|
+
onConfirm(true);
|
|
877
|
+
dismiss();
|
|
878
|
+
},
|
|
879
|
+
children: confirmText || "Confirm"
|
|
880
|
+
})
|
|
881
|
+
})
|
|
882
|
+
]
|
|
883
|
+
})
|
|
884
|
+
})
|
|
885
|
+
]
|
|
886
|
+
})
|
|
887
|
+
})
|
|
888
|
+
})
|
|
889
|
+
});
|
|
419
890
|
};
|
|
420
|
-
var BAWrapper = (props)
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
/* @__PURE__ */ jsx7(BottomAlert, __spreadValues({}, props)),
|
|
424
|
-
document.body
|
|
425
|
-
);
|
|
891
|
+
var BAWrapper = function(props) {
|
|
892
|
+
if (!props.isVisible) return null;
|
|
893
|
+
return ReactDOM2.createPortal(/* @__PURE__ */ jsx16(BottomAlert, _object_spread({}, props)), document.body);
|
|
426
894
|
};
|
|
427
895
|
var BottomAlert_default = BAWrapper;
|
|
428
|
-
|
|
429
896
|
// src/Common/Tippy.tsx
|
|
430
897
|
import { useState as useState2, useRef, useEffect as useEffect2 } from "react";
|
|
431
|
-
import {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
arrow,
|
|
441
|
-
FloatingArrow,
|
|
442
|
-
FloatingPortal
|
|
443
|
-
} from "@floating-ui/react";
|
|
444
|
-
import { Fragment, jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
445
|
-
var Tippy = ({ children, content, placement = "top", className = "", wrapperClassname = "", disabled = false, arrow: useArrow = false, visible }) => {
|
|
446
|
-
const [isOpen, setIsOpen] = useState2(false);
|
|
447
|
-
const arrowRef = useRef(null);
|
|
448
|
-
useEffect2(() => {
|
|
449
|
-
if (visible) {
|
|
450
|
-
setIsOpen(true);
|
|
451
|
-
}
|
|
452
|
-
}, [visible]);
|
|
453
|
-
const {
|
|
454
|
-
x,
|
|
455
|
-
y,
|
|
456
|
-
strategy,
|
|
457
|
-
refs,
|
|
458
|
-
context
|
|
459
|
-
} = useFloating({
|
|
460
|
-
placement,
|
|
461
|
-
open: isOpen,
|
|
462
|
-
onOpenChange: setIsOpen,
|
|
463
|
-
middleware: [
|
|
464
|
-
offset(8),
|
|
465
|
-
flip(),
|
|
466
|
-
shift(),
|
|
467
|
-
arrow({ element: arrowRef })
|
|
468
|
-
]
|
|
469
|
-
});
|
|
470
|
-
const hover = useHover(context, {
|
|
471
|
-
enabled: !disabled
|
|
472
|
-
});
|
|
473
|
-
const dismiss = useDismiss(context);
|
|
474
|
-
const role = useRole(context);
|
|
475
|
-
const { getReferenceProps, getFloatingProps } = useInteractions([
|
|
476
|
-
hover,
|
|
477
|
-
dismiss,
|
|
478
|
-
role
|
|
479
|
-
]);
|
|
480
|
-
return /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
481
|
-
isOpen && /* @__PURE__ */ jsxs4(FloatingPortal, { children: [
|
|
482
|
-
/* @__PURE__ */ jsx8(
|
|
483
|
-
"div",
|
|
484
|
-
__spreadProps(__spreadValues({
|
|
485
|
-
ref: refs.setFloating,
|
|
486
|
-
className: `z-[9999] ${className || tippyClassname}`
|
|
487
|
-
}, getFloatingProps()), {
|
|
488
|
-
style: {
|
|
489
|
-
position: strategy,
|
|
490
|
-
top: y != null ? y : 0,
|
|
491
|
-
left: x != null ? x : 0,
|
|
492
|
-
width: "max-content"
|
|
493
|
-
},
|
|
494
|
-
children: content
|
|
495
|
-
})
|
|
496
|
-
),
|
|
497
|
-
useArrow && /* @__PURE__ */ jsx8(
|
|
498
|
-
FloatingArrow,
|
|
499
|
-
{
|
|
500
|
-
ref: arrowRef,
|
|
501
|
-
context,
|
|
502
|
-
className: "fill-gray-900",
|
|
503
|
-
tipRadius: 2
|
|
898
|
+
import { useFloating, useInteractions, useHover, useRole, useDismiss, offset, flip, shift, arrow, FloatingArrow, FloatingPortal } from "@floating-ui/react";
|
|
899
|
+
import { Fragment, jsx as jsx17, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
900
|
+
var Tippy = function(param) {
|
|
901
|
+
var children = param.children, content = param.content, _param_placement = param.placement, placement = _param_placement === void 0 ? "top" : _param_placement, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className, _param_wrapperClassname = param.wrapperClassname, wrapperClassname = _param_wrapperClassname === void 0 ? "" : _param_wrapperClassname, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, tmp = param.arrow, useArrow = tmp === void 0 ? false : tmp, visible = param.visible;
|
|
902
|
+
var _useState2 = _sliced_to_array(useState2(false), 2), isOpen = _useState2[0], setIsOpen = _useState2[1];
|
|
903
|
+
var arrowRef = useRef(null);
|
|
904
|
+
useEffect2(function() {
|
|
905
|
+
if (visible) {
|
|
906
|
+
setIsOpen(true);
|
|
504
907
|
}
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
908
|
+
}, [
|
|
909
|
+
visible
|
|
910
|
+
]);
|
|
911
|
+
var _useFloating = useFloating({
|
|
912
|
+
placement: placement,
|
|
913
|
+
open: isOpen,
|
|
914
|
+
onOpenChange: setIsOpen,
|
|
915
|
+
middleware: [
|
|
916
|
+
offset(8),
|
|
917
|
+
flip(),
|
|
918
|
+
shift(),
|
|
919
|
+
arrow({
|
|
920
|
+
element: arrowRef
|
|
921
|
+
})
|
|
922
|
+
]
|
|
923
|
+
}), x = _useFloating.x, y = _useFloating.y, strategy = _useFloating.strategy, refs = _useFloating.refs, context = _useFloating.context;
|
|
924
|
+
var hover = useHover(context, {
|
|
925
|
+
enabled: !disabled
|
|
926
|
+
});
|
|
927
|
+
var dismiss = useDismiss(context);
|
|
928
|
+
var role = useRole(context);
|
|
929
|
+
var _useInteractions = useInteractions([
|
|
930
|
+
hover,
|
|
931
|
+
dismiss,
|
|
932
|
+
role
|
|
933
|
+
]), getReferenceProps = _useInteractions.getReferenceProps, getFloatingProps = _useInteractions.getFloatingProps;
|
|
934
|
+
return /* @__PURE__ */ jsxs7(Fragment, {
|
|
935
|
+
children: [
|
|
936
|
+
isOpen && /* @__PURE__ */ jsxs7(FloatingPortal, {
|
|
937
|
+
children: [
|
|
938
|
+
/* @__PURE__ */ jsx17("div", _object_spread_props(_object_spread({
|
|
939
|
+
ref: refs.setFloating,
|
|
940
|
+
className: "z-[9999] ".concat(className || tippyClassname)
|
|
941
|
+
}, getFloatingProps()), {
|
|
942
|
+
style: {
|
|
943
|
+
position: strategy,
|
|
944
|
+
top: y !== null && y !== void 0 ? y : 0,
|
|
945
|
+
left: x !== null && x !== void 0 ? x : 0,
|
|
946
|
+
width: "max-content"
|
|
947
|
+
},
|
|
948
|
+
children: content
|
|
949
|
+
})),
|
|
950
|
+
useArrow && /* @__PURE__ */ jsx17(FloatingArrow, {
|
|
951
|
+
ref: arrowRef,
|
|
952
|
+
context: context,
|
|
953
|
+
className: "fill-gray-900",
|
|
954
|
+
tipRadius: 2
|
|
955
|
+
})
|
|
956
|
+
]
|
|
957
|
+
}),
|
|
958
|
+
/* @__PURE__ */ jsx17("div", _object_spread_props(_object_spread({
|
|
959
|
+
ref: refs.setReference
|
|
960
|
+
}, getReferenceProps()), {
|
|
961
|
+
className: wrapperClassname,
|
|
962
|
+
children: children
|
|
963
|
+
}))
|
|
964
|
+
]
|
|
965
|
+
});
|
|
509
966
|
};
|
|
510
967
|
var Tippy_default = Tippy;
|
|
511
|
-
|
|
512
968
|
// src/Common/IconInfo.tsx
|
|
513
|
-
import { jsx as
|
|
514
|
-
var IconInfo = (
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
969
|
+
import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
970
|
+
var IconInfo = function(param) {
|
|
971
|
+
var content = param.content, icon = param.icon, number = param.number, color = param.color;
|
|
972
|
+
return /* @__PURE__ */ jsx18("div", {
|
|
973
|
+
className: "flex flex-shrink-0 items-center justify-center w-8 h-8 rounded-full bg-slate-400 dark:bg-slate-600 dark:border dark:border-white",
|
|
974
|
+
children: /* @__PURE__ */ jsx18(Tippy_default, {
|
|
975
|
+
className: tippyClassname,
|
|
976
|
+
content: content,
|
|
977
|
+
children: /* @__PURE__ */ jsxs8("div", {
|
|
978
|
+
className: "relative",
|
|
979
|
+
children: [
|
|
980
|
+
icon,
|
|
981
|
+
/* @__PURE__ */ jsx18("p", {
|
|
982
|
+
className: "absolute -bottom-1 ".concat(number > 9 ? number > 99 ? number > 999 ? "w-8 h-8 -right-6 -bottom-3" : "w-6 h-6 -right-5 -bottom-2" : "w-5 h-5 -right-3" : "w-4 -right-3", " flex justify-center items-center text-xs font-sans rounded-full text-white ").concat(color || "bg-secondary"),
|
|
983
|
+
children: number
|
|
984
|
+
})
|
|
985
|
+
]
|
|
986
|
+
})
|
|
987
|
+
})
|
|
988
|
+
});
|
|
526
989
|
};
|
|
527
990
|
var IconInfo_default = IconInfo;
|
|
528
|
-
|
|
529
991
|
// src/Common/Modal.tsx
|
|
530
992
|
import Link from "next/link";
|
|
531
|
-
|
|
532
993
|
// src/Icons/XIcon.tsx
|
|
533
|
-
import { jsx as
|
|
534
|
-
var XIcon = (
|
|
535
|
-
|
|
994
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
995
|
+
var XIcon = function(param) {
|
|
996
|
+
var className = param.className;
|
|
997
|
+
return /* @__PURE__ */ jsx19("svg", {
|
|
998
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
999
|
+
className: className || "h-5 w-5",
|
|
1000
|
+
viewBox: "0 0 20 20",
|
|
1001
|
+
fill: "currentColor",
|
|
1002
|
+
children: /* @__PURE__ */ jsx19("path", {
|
|
1003
|
+
fillRule: "evenodd",
|
|
1004
|
+
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
1005
|
+
clipRule: "evenodd"
|
|
1006
|
+
})
|
|
1007
|
+
});
|
|
536
1008
|
};
|
|
537
1009
|
var XIcon_default = XIcon;
|
|
538
|
-
|
|
539
1010
|
// src/Common/Modal.tsx
|
|
540
|
-
import { Fragment as Fragment2, jsx as
|
|
541
|
-
var Modal = (
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
1011
|
+
import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1012
|
+
var Modal = function(_param) {
|
|
1013
|
+
var visible = _param.visible, children = _param.children, fullscreen = _param.fullscreen, displayDark = _param.displayDark, dismissLink = _param.dismissLink, bgOpacity = _param.bgOpacity, onDismissed = _param.onDismissed, _param_dismissable = _param.dismissable, dismissable = _param_dismissable === void 0 ? true : _param_dismissable, _param_dismissOnBackdropClick = _param.dismissOnBackdropClick, dismissOnBackdropClick = _param_dismissOnBackdropClick === void 0 ? true : _param_dismissOnBackdropClick, style = _param.style, props = _object_without_properties(_param, [
|
|
1014
|
+
"visible",
|
|
1015
|
+
"children",
|
|
1016
|
+
"fullscreen",
|
|
1017
|
+
"displayDark",
|
|
1018
|
+
"dismissLink",
|
|
1019
|
+
"bgOpacity",
|
|
1020
|
+
"onDismissed",
|
|
1021
|
+
"dismissable",
|
|
1022
|
+
"dismissOnBackdropClick",
|
|
1023
|
+
"style"
|
|
1024
|
+
]);
|
|
1025
|
+
if (!visible) return null;
|
|
1026
|
+
return /* @__PURE__ */ jsx20(Overlay_default, _object_spread_props(_object_spread({
|
|
1027
|
+
visible: visible,
|
|
1028
|
+
onClick: dismissOnBackdropClick ? onDismissed : void 0,
|
|
1029
|
+
isDark: displayDark,
|
|
1030
|
+
withContainer: true
|
|
1031
|
+
}, props), {
|
|
1032
|
+
children: /* @__PURE__ */ jsx20("div", {
|
|
1033
|
+
className: "".concat(displayDark && "dark", " bg-slate-900/20 fixed inset-0 flex items-center justify-center"),
|
|
1034
|
+
style: {
|
|
1035
|
+
zIndex: 1e4
|
|
1036
|
+
},
|
|
1037
|
+
children: /* @__PURE__ */ jsxs9("div", {
|
|
1038
|
+
className: [
|
|
1039
|
+
"relative mx-1 w-full md:mx-auto md:w-3/4 lg:w-1/2",
|
|
1040
|
+
fullscreen && "md:w-5/6 lg:w-5/6"
|
|
1041
|
+
].join(" "),
|
|
1042
|
+
children: [
|
|
1043
|
+
/* @__PURE__ */ jsx20(Fragment2, {
|
|
1044
|
+
children: dismissLink ? /* @__PURE__ */ jsx20(Link, {
|
|
1045
|
+
href: dismissLink,
|
|
1046
|
+
scroll: false,
|
|
1047
|
+
children: /* @__PURE__ */ jsx20("div", {
|
|
1048
|
+
onClick: onDismissed,
|
|
1049
|
+
children: /* @__PURE__ */ jsx20(XIcon_default, {
|
|
1050
|
+
className: "absolute h-5 w-5 top-5 sm:top-20 right-4 transition-colors cursor-pointer duration-75 hover:text-blue-500 dark:text-gray-200 dark:hover:text-blue-500"
|
|
1051
|
+
})
|
|
1052
|
+
})
|
|
1053
|
+
}) : dismissable ? /* @__PURE__ */ jsx20("button", {
|
|
1054
|
+
className: "absolute top-5 sm:top-20 right-4 transition-colors cursor-pointer duration-75 hover:text-blue-500 dark:text-gray-200 dark:hover:text-blue-500",
|
|
1055
|
+
type: "button",
|
|
1056
|
+
onClick: onDismissed,
|
|
1057
|
+
children: /* @__PURE__ */ jsx20(XIcon_default, {
|
|
1058
|
+
className: "h-5 w-5"
|
|
1059
|
+
})
|
|
1060
|
+
}) : null
|
|
1061
|
+
}),
|
|
1062
|
+
/* @__PURE__ */ jsx20("div", {
|
|
1063
|
+
className: "my-1 sm:mt-16 bg-white dark:bg-slate-900 shadow-lg border border-gray-100 dark:border-none rounded-xl overflow-x-visible overflow-y-visible no-scrollbar",
|
|
1064
|
+
onClick: function(e) {
|
|
1065
|
+
return e.stopPropagation();
|
|
1066
|
+
},
|
|
1067
|
+
style: _object_spread({
|
|
1068
|
+
maxHeight: "calc(100vh - 6rem)"
|
|
1069
|
+
}, style),
|
|
1070
|
+
children: /* @__PURE__ */ jsx20("div", {
|
|
1071
|
+
className: "p-4 sm:p-10",
|
|
1072
|
+
children: /* @__PURE__ */ jsx20("div", {
|
|
1073
|
+
className: "mt-8 sm:mt-0",
|
|
1074
|
+
children: children
|
|
1075
|
+
})
|
|
1076
|
+
})
|
|
1077
|
+
})
|
|
1078
|
+
]
|
|
1079
|
+
})
|
|
1080
|
+
})
|
|
1081
|
+
}));
|
|
583
1082
|
};
|
|
584
1083
|
var Modal_default = Modal;
|
|
585
|
-
|
|
586
1084
|
// src/Common/NoticeBox.tsx
|
|
587
1085
|
import { useEffect as useEffect3, useMemo as useMemo4, useState as useState3 } from "react";
|
|
588
|
-
import { jsx as
|
|
589
|
-
var NoticeBox = (
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
1086
|
+
import { jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1087
|
+
var NoticeBox = function(param) {
|
|
1088
|
+
var children = param.children, type = param.type, isDismissible = param.isDismissible, isVisible = param.isVisible, onDismiss = param.onDismiss;
|
|
1089
|
+
var _useState3 = _sliced_to_array(useState3(true), 2), visible = _useState3[0], setVisible = _useState3[1];
|
|
1090
|
+
var styles = useMemo4(function() {
|
|
1091
|
+
var base = "relative text-base rounded-md p-2 ";
|
|
1092
|
+
if (!visible) return "hidden";
|
|
1093
|
+
switch(type){
|
|
1094
|
+
case "error":
|
|
1095
|
+
return base.concat("w-full absolute top-50 text-red-500 border-red-400 border-2");
|
|
1096
|
+
case "info":
|
|
1097
|
+
return base.concat("text-green-800 border-green-400 bg-green-100");
|
|
1098
|
+
case "warning":
|
|
1099
|
+
return base.concat("text-orange-500 border border-orange-400 bg-white");
|
|
1100
|
+
default:
|
|
1101
|
+
return base.concat("w-full absolute top-0 text-red-500 border-red-500 bg-white p-3 border-2");
|
|
1102
|
+
}
|
|
1103
|
+
}, [
|
|
1104
|
+
type,
|
|
1105
|
+
visible
|
|
1106
|
+
]);
|
|
1107
|
+
useEffect3(function() {
|
|
1108
|
+
setVisible(isVisible);
|
|
1109
|
+
}, [
|
|
1110
|
+
isVisible
|
|
1111
|
+
]);
|
|
1112
|
+
if (!isVisible) return null;
|
|
1113
|
+
return /* @__PURE__ */ jsx21("div", {
|
|
1114
|
+
style: {
|
|
1115
|
+
zIndex: 100
|
|
1116
|
+
},
|
|
1117
|
+
className: styles,
|
|
1118
|
+
children: /* @__PURE__ */ jsxs10("div", {
|
|
1119
|
+
className: "relative",
|
|
1120
|
+
children: [
|
|
1121
|
+
isDismissible && /* @__PURE__ */ jsx21("button", {
|
|
1122
|
+
type: "button",
|
|
1123
|
+
onClick: function() {
|
|
1124
|
+
setVisible(function(s) {
|
|
1125
|
+
return !s;
|
|
1126
|
+
});
|
|
1127
|
+
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
1128
|
+
},
|
|
1129
|
+
className: "absolute bottom-1 right-1 transition-colors cursor-pointer duration-75 hover:text-blue-500",
|
|
1130
|
+
children: /* @__PURE__ */ jsx21(XIcon_default, {
|
|
1131
|
+
className: "h-5 w-5"
|
|
1132
|
+
})
|
|
1133
|
+
}),
|
|
1134
|
+
children
|
|
1135
|
+
]
|
|
1136
|
+
})
|
|
1137
|
+
});
|
|
633
1138
|
};
|
|
634
1139
|
var NoticeBox_default = NoticeBox;
|
|
635
|
-
|
|
636
1140
|
// src/Icons/StarIcon.tsx
|
|
637
|
-
import { jsx as
|
|
638
|
-
var StarIcon = (
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
1141
|
+
import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1142
|
+
var StarIcon = function(param) {
|
|
1143
|
+
var className = param.className, percentage = param.percentage, color = param.color;
|
|
1144
|
+
return /* @__PURE__ */ jsxs11("svg", {
|
|
1145
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1146
|
+
className: className || "h-5 w-5",
|
|
1147
|
+
viewBox: "0 0 20 20",
|
|
1148
|
+
fill: "currentColor",
|
|
1149
|
+
children: [
|
|
1150
|
+
/* @__PURE__ */ jsx22("defs", {
|
|
1151
|
+
children: /* @__PURE__ */ jsxs11("linearGradient", {
|
|
1152
|
+
id: "grad",
|
|
1153
|
+
children: [
|
|
1154
|
+
/* @__PURE__ */ jsx22("stop", {
|
|
1155
|
+
offset: "".concat((percentage || 0.5) * 100, "%"),
|
|
1156
|
+
"stop-color": color ? color : "#4b5563"
|
|
1157
|
+
}),
|
|
1158
|
+
/* @__PURE__ */ jsx22("stop", {
|
|
1159
|
+
offset: "".concat(100 - (percentage || 0.5) * 100, "%"),
|
|
1160
|
+
"stop-color": "white"
|
|
1161
|
+
})
|
|
1162
|
+
]
|
|
1163
|
+
})
|
|
1164
|
+
}),
|
|
1165
|
+
/* @__PURE__ */ jsx22("path", {
|
|
1166
|
+
fill: "url(#grad)",
|
|
1167
|
+
d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
|
|
1168
|
+
})
|
|
1169
|
+
]
|
|
1170
|
+
});
|
|
646
1171
|
};
|
|
647
1172
|
var StarIcon_default = StarIcon;
|
|
648
|
-
|
|
649
1173
|
// src/Icons/StarIconSolid.tsx
|
|
650
|
-
import { jsx as
|
|
651
|
-
var StartIconSolid = (
|
|
652
|
-
|
|
1174
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1175
|
+
var StartIconSolid = function(param) {
|
|
1176
|
+
var className = param.className;
|
|
1177
|
+
return /* @__PURE__ */ jsx23("svg", {
|
|
1178
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1179
|
+
className: className || "h-5 w-5",
|
|
1180
|
+
viewBox: "0 0 20 20",
|
|
1181
|
+
fill: "currentColor",
|
|
1182
|
+
children: /* @__PURE__ */ jsx23("path", {
|
|
1183
|
+
d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
|
|
1184
|
+
})
|
|
1185
|
+
});
|
|
653
1186
|
};
|
|
654
1187
|
var StarIconSolid_default = StartIconSolid;
|
|
655
|
-
|
|
656
1188
|
// src/Common/RatingStars.tsx
|
|
657
|
-
import { jsx as
|
|
658
|
-
var RatingStars = (
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
1189
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1190
|
+
var RatingStars = function(param) {
|
|
1191
|
+
var avgRating = param.avgRating, large = param.large;
|
|
1192
|
+
var icons = [
|
|
1193
|
+
1,
|
|
1194
|
+
2,
|
|
1195
|
+
3,
|
|
1196
|
+
4,
|
|
1197
|
+
5
|
|
1198
|
+
].map(function(el) {
|
|
1199
|
+
if (avgRating === 0) {
|
|
1200
|
+
return /* @__PURE__ */ jsx24(StarIconSolid_default, {
|
|
1201
|
+
className: "".concat(large ? "h-5 w-5" : "h-3 w-3", " text-gray-200 dark:text-gray-400")
|
|
1202
|
+
}, "rating_star_".concat(el));
|
|
1203
|
+
}
|
|
1204
|
+
if (Number.isInteger(avgRating)) {
|
|
1205
|
+
if (el <= avgRating) {
|
|
1206
|
+
return /* @__PURE__ */ jsx24(StarIconSolid_default, {
|
|
1207
|
+
className: "".concat(large ? "h-5 w-5" : "h-3 w-3", " text-blue-500")
|
|
1208
|
+
}, "rating_star_".concat(el));
|
|
1209
|
+
}
|
|
1210
|
+
return /* @__PURE__ */ jsx24(StarIconSolid_default, {
|
|
1211
|
+
className: "".concat(large ? "h-5 w-5" : "h-3 w-3", " text-gray-200 dark:text-gray-400")
|
|
1212
|
+
}, "rating_star_".concat(el));
|
|
1213
|
+
}
|
|
1214
|
+
var whole = Math.floor(avgRating);
|
|
1215
|
+
if (el <= whole) {
|
|
1216
|
+
return /* @__PURE__ */ jsx24(StarIconSolid_default, {
|
|
1217
|
+
className: "".concat(large ? "h-5 w-5" : "h-3 w-3", " text-blue-500")
|
|
1218
|
+
}, "rating_star_".concat(el));
|
|
1219
|
+
}
|
|
1220
|
+
return /* @__PURE__ */ jsx24(StarIcon_default, {
|
|
1221
|
+
percentage: avgRating - whole,
|
|
1222
|
+
color: "#00b4d8",
|
|
1223
|
+
className: "".concat(large ? "h-5 w-5" : "h-3 w-3")
|
|
1224
|
+
}, "rating_star_".concat(el));
|
|
1225
|
+
});
|
|
1226
|
+
return /* @__PURE__ */ jsx24(Tippy_default, {
|
|
1227
|
+
content: avgRating === 0 ? "No ratings" : "Average Rating " + avgRating,
|
|
1228
|
+
className: "bg-gray-800 opacity-90 text-white rounded-md px-2 py-1 cursor-pointer h-fit",
|
|
1229
|
+
children: /* @__PURE__ */ jsx24("div", {
|
|
1230
|
+
className: "flex items-center space-x-0 justify-start",
|
|
1231
|
+
children: icons
|
|
1232
|
+
})
|
|
1233
|
+
});
|
|
683
1234
|
};
|
|
684
1235
|
var RatingStars_default = RatingStars;
|
|
685
|
-
|
|
686
1236
|
// src/Common/Slider.tsx
|
|
687
1237
|
import { useState as useState4 } from "react";
|
|
688
1238
|
import { useDebouncedCallback } from "use-debounce";
|
|
689
|
-
import { jsx as
|
|
690
|
-
var Slider = (
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
"input",
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
}
|
|
705
|
-
);
|
|
1239
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1240
|
+
var Slider = function(param) {
|
|
1241
|
+
var min = param.min, max = param.max, step = param.step, value = param.value, onChange = param.onChange;
|
|
1242
|
+
var handleChange = function(event) {
|
|
1243
|
+
onChange(parseFloat(event.target.value));
|
|
1244
|
+
};
|
|
1245
|
+
return /* @__PURE__ */ jsx25("input", {
|
|
1246
|
+
type: "range",
|
|
1247
|
+
min: min,
|
|
1248
|
+
max: max,
|
|
1249
|
+
step: step,
|
|
1250
|
+
value: value,
|
|
1251
|
+
onChange: handleChange,
|
|
1252
|
+
className: "w-full h-2 rounded-lg range-input"
|
|
1253
|
+
});
|
|
706
1254
|
};
|
|
707
|
-
var DebouncedSlider = (
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
1255
|
+
var DebouncedSlider = function(param) {
|
|
1256
|
+
var min = param.min, max = param.max, handleUpdate = param.handleUpdate, initialValue = param.initialValue;
|
|
1257
|
+
var _useState4 = _sliced_to_array(useState4(initialValue), 2), value = _useState4[0], setValue = _useState4[1];
|
|
1258
|
+
var debouncedUpdate = useDebouncedCallback(function(v) {
|
|
1259
|
+
handleUpdate(v);
|
|
1260
|
+
}, 120, {
|
|
1261
|
+
trailing: true,
|
|
1262
|
+
leading: false
|
|
1263
|
+
});
|
|
1264
|
+
return /* @__PURE__ */ jsx25(Slider, {
|
|
1265
|
+
min: min,
|
|
1266
|
+
max: max,
|
|
1267
|
+
step: 1,
|
|
1268
|
+
value: value,
|
|
1269
|
+
onChange: function(v) {
|
|
1270
|
+
setValue(v);
|
|
1271
|
+
debouncedUpdate(v);
|
|
1272
|
+
}
|
|
1273
|
+
});
|
|
725
1274
|
};
|
|
726
1275
|
Slider.Debounced = DebouncedSlider;
|
|
727
1276
|
var Slider_default = Slider;
|
|
728
|
-
|
|
729
1277
|
// src/Common/ToggleSwitch.tsx
|
|
730
1278
|
import { useField as useField3 } from "formik";
|
|
731
1279
|
import { motion as motion3 } from "framer-motion";
|
|
732
|
-
import { jsx as
|
|
733
|
-
var Formik = (
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
/* @__PURE__ */
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
1280
|
+
import { jsx as jsx26, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1281
|
+
var Formik = function(param) {
|
|
1282
|
+
var label = param.label, name = param.name;
|
|
1283
|
+
var _useField3 = _sliced_to_array(useField3(name), 3), value = _useField3[0].value, setValue = _useField3[2].setValue;
|
|
1284
|
+
var handleChange = function(e) {
|
|
1285
|
+
setValue(e.target.checked);
|
|
1286
|
+
};
|
|
1287
|
+
return /* @__PURE__ */ jsxs12("label", {
|
|
1288
|
+
className: "flex items-center space-x-2 cursor-pointer",
|
|
1289
|
+
children: [
|
|
1290
|
+
/* @__PURE__ */ jsxs12("div", {
|
|
1291
|
+
className: "relative",
|
|
1292
|
+
children: [
|
|
1293
|
+
/* @__PURE__ */ jsx26("input", {
|
|
1294
|
+
type: "checkbox",
|
|
1295
|
+
className: "opacity-0 absolute",
|
|
1296
|
+
checked: value,
|
|
1297
|
+
onChange: handleChange
|
|
1298
|
+
}),
|
|
1299
|
+
/* @__PURE__ */ jsx26("div", {
|
|
1300
|
+
className: "w-10 h-6 rounded-full p-[4px] transition-colors duration-300 ".concat(value ? "bg-[#00b4d8]" : "bg-[#64748b]"),
|
|
1301
|
+
children: /* @__PURE__ */ jsx26(motion3.div, {
|
|
1302
|
+
className: "w-4 h-4 bg-white rounded-full absolute top-1",
|
|
1303
|
+
initial: false,
|
|
1304
|
+
animate: {
|
|
1305
|
+
x: value ? 16 : 0
|
|
1306
|
+
},
|
|
1307
|
+
transition: {
|
|
1308
|
+
type: "spring",
|
|
1309
|
+
stiffness: 500,
|
|
1310
|
+
damping: 30
|
|
1311
|
+
}
|
|
1312
|
+
})
|
|
1313
|
+
})
|
|
1314
|
+
]
|
|
1315
|
+
}),
|
|
1316
|
+
/* @__PURE__ */ jsx26("span", {
|
|
1317
|
+
className: "text-sm font-medium text-gray-800 dark:text-gray-200",
|
|
1318
|
+
children: label
|
|
1319
|
+
})
|
|
1320
|
+
]
|
|
1321
|
+
});
|
|
763
1322
|
};
|
|
764
|
-
var ToggleSwitch = (
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
/* @__PURE__ */
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
1323
|
+
var ToggleSwitch = function(param) {
|
|
1324
|
+
var label = param.label, onChange = param.onChange, value = param.value;
|
|
1325
|
+
var handleChange = function(e) {
|
|
1326
|
+
onChange(e.target.checked);
|
|
1327
|
+
};
|
|
1328
|
+
return /* @__PURE__ */ jsxs12("label", {
|
|
1329
|
+
className: "flex items-center space-x-2 cursor-pointer",
|
|
1330
|
+
children: [
|
|
1331
|
+
/* @__PURE__ */ jsxs12("div", {
|
|
1332
|
+
className: "relative",
|
|
1333
|
+
children: [
|
|
1334
|
+
/* @__PURE__ */ jsx26("input", {
|
|
1335
|
+
type: "checkbox",
|
|
1336
|
+
className: "opacity-0 absolute",
|
|
1337
|
+
checked: value,
|
|
1338
|
+
onChange: handleChange
|
|
1339
|
+
}),
|
|
1340
|
+
/* @__PURE__ */ jsx26("div", {
|
|
1341
|
+
className: "w-10 h-6 rounded-full p-[4px] transition-colors duration-300 ".concat(value ? "bg-[#00b4d8]" : "bg-[#64748b]"),
|
|
1342
|
+
children: /* @__PURE__ */ jsx26(motion3.div, {
|
|
1343
|
+
className: "w-4 h-4 bg-white rounded-full absolute top-1",
|
|
1344
|
+
initial: false,
|
|
1345
|
+
animate: {
|
|
1346
|
+
x: value ? 16 : 0
|
|
1347
|
+
},
|
|
1348
|
+
transition: {
|
|
1349
|
+
type: "spring",
|
|
1350
|
+
stiffness: 500,
|
|
1351
|
+
damping: 30
|
|
1352
|
+
}
|
|
1353
|
+
})
|
|
1354
|
+
})
|
|
1355
|
+
]
|
|
1356
|
+
}),
|
|
1357
|
+
/* @__PURE__ */ jsx26("span", {
|
|
1358
|
+
className: "text-sm font-medium text-gray-800 dark:text-gray-200",
|
|
1359
|
+
children: label
|
|
1360
|
+
})
|
|
1361
|
+
]
|
|
1362
|
+
});
|
|
793
1363
|
};
|
|
794
1364
|
ToggleSwitch.Formik = Formik;
|
|
795
1365
|
var ToggleSwitch_default = ToggleSwitch;
|
|
796
|
-
|
|
797
1366
|
// src/Common/UserContentSwitcher.tsx
|
|
798
1367
|
import { motion as motion4 } from "framer-motion";
|
|
799
|
-
|
|
800
1368
|
// src/Icons/PlusCircleIcon.tsx
|
|
801
|
-
import { jsx as
|
|
802
|
-
var PlusCircleIcon = (
|
|
803
|
-
|
|
1369
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1370
|
+
var PlusCircleIcon = function(param) {
|
|
1371
|
+
var className = param.className;
|
|
1372
|
+
return /* @__PURE__ */ jsx27("svg", {
|
|
1373
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1374
|
+
className: className || "h-5 w-5",
|
|
1375
|
+
fill: "none",
|
|
1376
|
+
viewBox: "0 0 24 24",
|
|
1377
|
+
stroke: "currentColor",
|
|
1378
|
+
strokeWidth: 2,
|
|
1379
|
+
children: /* @__PURE__ */ jsx27("path", {
|
|
1380
|
+
strokeLinecap: "round",
|
|
1381
|
+
strokeLinejoin: "round",
|
|
1382
|
+
d: "M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1383
|
+
})
|
|
1384
|
+
});
|
|
804
1385
|
};
|
|
805
1386
|
var PlusCircleIcon_default = PlusCircleIcon;
|
|
806
|
-
|
|
807
1387
|
// src/Icons/ArrowCircleRight.tsx
|
|
808
|
-
import { jsx as
|
|
809
|
-
var StartIconSolid2 = (
|
|
810
|
-
|
|
1388
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1389
|
+
var StartIconSolid2 = function(param) {
|
|
1390
|
+
var className = param.className;
|
|
1391
|
+
return /* @__PURE__ */ jsx28("svg", {
|
|
1392
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1393
|
+
className: className || "h-5 w-5",
|
|
1394
|
+
fill: "none",
|
|
1395
|
+
viewBox: "0 0 24 24",
|
|
1396
|
+
stroke: "currentColor",
|
|
1397
|
+
strokeWidth: 2,
|
|
1398
|
+
children: /* @__PURE__ */ jsx28("path", {
|
|
1399
|
+
strokeLinecap: "round",
|
|
1400
|
+
strokeLinejoin: "round",
|
|
1401
|
+
d: "M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1402
|
+
})
|
|
1403
|
+
});
|
|
811
1404
|
};
|
|
812
1405
|
var ArrowCircleRight_default = StartIconSolid2;
|
|
813
|
-
|
|
814
1406
|
// src/Common/UserContentSwitcher.tsx
|
|
815
|
-
import { jsx as
|
|
816
|
-
var UserContentSwitcher = (
|
|
817
|
-
|
|
818
|
-
/* @__PURE__ */
|
|
819
|
-
|
|
820
|
-
{
|
|
821
|
-
className: "absolute w-1/2 h-11 rounded-md bg-white dark:bg-slate-600",
|
|
822
|
-
animate: {
|
|
823
|
-
x: galleryMode === title1.toLowerCase() ? "1%" : "99%"
|
|
824
|
-
},
|
|
825
|
-
transition: {
|
|
826
|
-
type: "spring",
|
|
827
|
-
damping: 20,
|
|
828
|
-
stiffness: 200
|
|
829
|
-
}
|
|
830
|
-
}
|
|
831
|
-
),
|
|
832
|
-
/* @__PURE__ */ jsxs10(
|
|
833
|
-
"button",
|
|
834
|
-
{
|
|
835
|
-
onClick: () => setGalleryMode(title1.toLowerCase()),
|
|
836
|
-
className: "py-2 flex flex-row w-1/2 justify-center items-center gap-1 z-10",
|
|
837
|
-
children: [
|
|
838
|
-
/* @__PURE__ */ jsx20(
|
|
839
|
-
"span",
|
|
840
|
-
{
|
|
841
|
-
className: `truncate ${galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`,
|
|
842
|
-
children: title1.toLocaleUpperCase()
|
|
843
|
-
}
|
|
844
|
-
),
|
|
845
|
-
Icon1 ? /* @__PURE__ */ jsx20(
|
|
846
|
-
Icon1,
|
|
847
|
-
{
|
|
848
|
-
className: `h-5 w-5 ${galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`
|
|
849
|
-
}
|
|
850
|
-
) : /* @__PURE__ */ jsx20(
|
|
851
|
-
PlusCircleIcon_default,
|
|
852
|
-
{
|
|
853
|
-
className: `h-5 w-5 ${galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`
|
|
854
|
-
}
|
|
855
|
-
)
|
|
856
|
-
]
|
|
857
|
-
}
|
|
858
|
-
),
|
|
859
|
-
/* @__PURE__ */ jsxs10(
|
|
860
|
-
"button",
|
|
861
|
-
{
|
|
862
|
-
onClick: () => setGalleryMode(title2.toLowerCase()),
|
|
863
|
-
className: "py-2 flex flex-row w-1/2 justify-center items-center gap-1 z-10",
|
|
1407
|
+
import { jsx as jsx29, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1408
|
+
var UserContentSwitcher = function(param) {
|
|
1409
|
+
var Icon1 = param.icon1, Icon2 = param.icon2, setGalleryMode = param.setGalleryMode, galleryMode = param.galleryMode, title1 = param.title1, title2 = param.title2;
|
|
1410
|
+
return /* @__PURE__ */ jsxs13("div", {
|
|
1411
|
+
className: "relative flex flex-row items-center my-2 bg-slate-100 dark:bg-slate-900 w-full h-14 rounded-lg",
|
|
864
1412
|
children: [
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
1413
|
+
/* @__PURE__ */ jsx29(motion4.div, {
|
|
1414
|
+
className: "absolute w-1/2 h-11 rounded-md bg-white dark:bg-slate-600",
|
|
1415
|
+
animate: {
|
|
1416
|
+
x: galleryMode === title1.toLowerCase() ? "1%" : "99%"
|
|
1417
|
+
},
|
|
1418
|
+
transition: {
|
|
1419
|
+
type: "spring",
|
|
1420
|
+
damping: 20,
|
|
1421
|
+
stiffness: 200
|
|
1422
|
+
}
|
|
1423
|
+
}),
|
|
1424
|
+
/* @__PURE__ */ jsxs13("button", {
|
|
1425
|
+
onClick: function() {
|
|
1426
|
+
return setGalleryMode(title1.toLowerCase());
|
|
1427
|
+
},
|
|
1428
|
+
className: "py-2 flex flex-row w-1/2 justify-center items-center gap-1 z-10",
|
|
1429
|
+
children: [
|
|
1430
|
+
/* @__PURE__ */ jsx29("span", {
|
|
1431
|
+
className: "truncate ".concat(galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"),
|
|
1432
|
+
children: title1.toLocaleUpperCase()
|
|
1433
|
+
}),
|
|
1434
|
+
Icon1 ? /* @__PURE__ */ jsx29(Icon1, {
|
|
1435
|
+
className: "h-5 w-5 ".concat(galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90")
|
|
1436
|
+
}) : /* @__PURE__ */ jsx29(PlusCircleIcon_default, {
|
|
1437
|
+
className: "h-5 w-5 ".concat(galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90")
|
|
1438
|
+
})
|
|
1439
|
+
]
|
|
1440
|
+
}),
|
|
1441
|
+
/* @__PURE__ */ jsxs13("button", {
|
|
1442
|
+
onClick: function() {
|
|
1443
|
+
return setGalleryMode(title2.toLowerCase());
|
|
1444
|
+
},
|
|
1445
|
+
className: "py-2 flex flex-row w-1/2 justify-center items-center gap-1 z-10",
|
|
1446
|
+
children: [
|
|
1447
|
+
/* @__PURE__ */ jsx29("span", {
|
|
1448
|
+
className: "truncate ".concat(galleryMode === title2.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"),
|
|
1449
|
+
children: title2.toLocaleUpperCase()
|
|
1450
|
+
}),
|
|
1451
|
+
Icon2 ? /* @__PURE__ */ jsx29(Icon2, {
|
|
1452
|
+
className: "h-5 w-5 ".concat(galleryMode === title2.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90")
|
|
1453
|
+
}) : /* @__PURE__ */ jsx29(ArrowCircleRight_default, {
|
|
1454
|
+
className: "h-5 w-5 ".concat(galleryMode === title2.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90")
|
|
1455
|
+
})
|
|
1456
|
+
]
|
|
1457
|
+
})
|
|
883
1458
|
]
|
|
884
|
-
|
|
885
|
-
)
|
|
886
|
-
] });
|
|
1459
|
+
});
|
|
887
1460
|
};
|
|
888
1461
|
var UserContentSwitcher_default = UserContentSwitcher;
|
|
889
|
-
|
|
890
1462
|
// src/ProgressBar/ProgressBarSimple.tsx
|
|
891
|
-
import { jsx as
|
|
892
|
-
var ProgressBarSimple = (
|
|
893
|
-
|
|
894
|
-
"div",
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
}
|
|
915
|
-
) });
|
|
1463
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1464
|
+
var ProgressBarSimple = function(param) {
|
|
1465
|
+
var progress = param.progress, color = param.color, _param_height = param.height, height = _param_height === void 0 ? 10 : _param_height, _param_backgroundColor = param.backgroundColor, backgroundColor = _param_backgroundColor === void 0 ? "#ccc" : _param_backgroundColor;
|
|
1466
|
+
return /* @__PURE__ */ jsx30("div", {
|
|
1467
|
+
className: "w-full",
|
|
1468
|
+
children: /* @__PURE__ */ jsx30("div", {
|
|
1469
|
+
className: "w-full overflow-hidden transition-all duration-150 ease-in-out",
|
|
1470
|
+
style: {
|
|
1471
|
+
backgroundColor: backgroundColor,
|
|
1472
|
+
height: "".concat(height, "px"),
|
|
1473
|
+
borderRadius: "".concat(height / 2, "px")
|
|
1474
|
+
},
|
|
1475
|
+
children: /* @__PURE__ */ jsx30("div", {
|
|
1476
|
+
className: "transition-all duration-150 ease-in-out",
|
|
1477
|
+
style: {
|
|
1478
|
+
width: "".concat(progress, "%"),
|
|
1479
|
+
backgroundColor: color,
|
|
1480
|
+
height: "".concat(height, "px"),
|
|
1481
|
+
borderRadius: "".concat(height / 2, "px")
|
|
1482
|
+
}
|
|
1483
|
+
})
|
|
1484
|
+
})
|
|
1485
|
+
});
|
|
916
1486
|
};
|
|
917
1487
|
var ProgressBarSimple_default = ProgressBarSimple;
|
|
918
|
-
|
|
919
1488
|
// src/ProgressBar/ProgressBar.tsx
|
|
920
|
-
import { jsx as
|
|
921
|
-
var ProgressBar = (
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
1489
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1490
|
+
var ProgressBar = function(param) {
|
|
1491
|
+
var progress = param.progress;
|
|
1492
|
+
return /* @__PURE__ */ jsx31("div", {
|
|
1493
|
+
children: /* @__PURE__ */ jsx31("div", {
|
|
1494
|
+
className: "-mt-2 mb-6",
|
|
1495
|
+
children: /* @__PURE__ */ jsx31("div", {
|
|
1496
|
+
className: "bg-gray-100 rounded-full h-2",
|
|
1497
|
+
children: /* @__PURE__ */ jsx31("div", {
|
|
1498
|
+
className: "rounded-full h-2 ".concat(progress === 100 ? "bg-green-400" : "bg-gray-100"),
|
|
1499
|
+
style: {
|
|
1500
|
+
width: "".concat(progress, "%"),
|
|
1501
|
+
minWidth: "100%",
|
|
1502
|
+
position: "absolute"
|
|
1503
|
+
}
|
|
1504
|
+
})
|
|
1505
|
+
})
|
|
1506
|
+
})
|
|
1507
|
+
});
|
|
1508
|
+
};
|
|
1509
|
+
var ProgressStepBar = function(param) {
|
|
1510
|
+
var steps = param.steps, stepIndex = param.stepIndex, onStepClick = param.onStepClick, color = param.color;
|
|
1511
|
+
return /* @__PURE__ */ jsx31("div", {
|
|
1512
|
+
className: "flex w-full items-center space-x-0.5 -mt-1 overflow-hidden",
|
|
1513
|
+
children: steps.map(function(el, i) {
|
|
1514
|
+
return /* @__PURE__ */ jsx31("div", {
|
|
1515
|
+
className: "flex-1 relative",
|
|
1516
|
+
children: /* @__PURE__ */ jsx31(Tippy_default, {
|
|
1517
|
+
content: el.label,
|
|
1518
|
+
className: tippyClassname,
|
|
1519
|
+
children: /* @__PURE__ */ jsx31("div", {
|
|
1520
|
+
className: "mb-4",
|
|
1521
|
+
children: /* @__PURE__ */ jsx31("div", {
|
|
1522
|
+
onClick: function() {
|
|
1523
|
+
return onStepClick === null || onStepClick === void 0 ? void 0 : onStepClick(i);
|
|
1524
|
+
},
|
|
1525
|
+
className: "cursor-pointer bg-gray-100 rounded-full h-2 overflow-hidden",
|
|
1526
|
+
children: /* @__PURE__ */ jsx31("div", {
|
|
1527
|
+
className: "cursor-pointer rounded-full h-2 ".concat(stepIndex >= i ? "bg-green-400" : "bg-gray-100"),
|
|
1528
|
+
style: {
|
|
1529
|
+
width: "".concat(stepIndex >= i ? 100 : 0, "%"),
|
|
1530
|
+
transition: "width 0.3s ease"
|
|
1531
|
+
}
|
|
1532
|
+
})
|
|
1533
|
+
})
|
|
1534
|
+
})
|
|
1535
|
+
})
|
|
1536
|
+
}, "index_progress_".concat(el.label));
|
|
1537
|
+
})
|
|
1538
|
+
});
|
|
959
1539
|
};
|
|
960
1540
|
ProgressBar.Step = ProgressStepBar;
|
|
961
1541
|
var ProgressBar_default = ProgressBar;
|
|
962
|
-
|
|
963
1542
|
// src/ProgressBar/CircleProgress.tsx
|
|
964
|
-
import { jsx as
|
|
965
|
-
var CircleProgress = (
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
/* @__PURE__ */
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1543
|
+
import { jsx as jsx32, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1544
|
+
var CircleProgress = function(param) {
|
|
1545
|
+
var twColor = param.twColor, percentage = param.percentage, radius = param.radius, fill = param.fill, strokeWidth = param.strokeWidth;
|
|
1546
|
+
var r = radius;
|
|
1547
|
+
var cx = "50%";
|
|
1548
|
+
var cy = "50%";
|
|
1549
|
+
var w = Math.round(radius / 16);
|
|
1550
|
+
var strokeWidthCalc = strokeWidth ? strokeWidth : w < 8 ? 8 : w;
|
|
1551
|
+
var size = radius * 2 + strokeWidthCalc;
|
|
1552
|
+
return /* @__PURE__ */ jsx32("div", {
|
|
1553
|
+
style: {
|
|
1554
|
+
height: size,
|
|
1555
|
+
width: size
|
|
1556
|
+
},
|
|
1557
|
+
children: /* @__PURE__ */ jsxs14("svg", {
|
|
1558
|
+
viewBox: "0 0 ".concat(size, " ").concat(size),
|
|
1559
|
+
className: "-rotate-90",
|
|
1560
|
+
children: [
|
|
1561
|
+
/* @__PURE__ */ jsx32("circle", {
|
|
1562
|
+
className: "text-white/50 dark:text-slate-200/50",
|
|
1563
|
+
strokeWidth: strokeWidthCalc - 0.5,
|
|
1564
|
+
stroke: "currentColor",
|
|
1565
|
+
fill: fill || "transparent",
|
|
1566
|
+
r: r,
|
|
1567
|
+
cx: cx,
|
|
1568
|
+
cy: cy
|
|
1569
|
+
}),
|
|
1570
|
+
/* @__PURE__ */ jsx32("circle", {
|
|
1571
|
+
strokeDasharray: 2 * Math.PI * r,
|
|
1572
|
+
strokeDashoffset: 2 * Math.PI * r - percentage / 100 * 2 * Math.PI * r,
|
|
1573
|
+
stroke: twColor || "white/50",
|
|
1574
|
+
strokeWidth: strokeWidthCalc,
|
|
1575
|
+
strokeLinecap: "round",
|
|
1576
|
+
fill: "transparent",
|
|
1577
|
+
r: r,
|
|
1578
|
+
cx: cx,
|
|
1579
|
+
cy: cy
|
|
1580
|
+
})
|
|
1581
|
+
]
|
|
1582
|
+
})
|
|
1583
|
+
});
|
|
1000
1584
|
};
|
|
1001
1585
|
var CircleProgress_default = CircleProgress;
|
|
1002
|
-
|
|
1003
1586
|
// src/ProgressBar/CourseProgress.tsx
|
|
1004
|
-
import { jsx as
|
|
1587
|
+
import { jsx as jsx33, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1005
1588
|
var PRIMARY_COLOR2 = "#00b4d8";
|
|
1006
|
-
var CourseProgress = (
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
/* @__PURE__ */
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1589
|
+
var CourseProgress = function(param) {
|
|
1590
|
+
var twColor = param.twColor, percentage = param.percentage, label = param.label;
|
|
1591
|
+
var cx = "50%";
|
|
1592
|
+
var cy = "50%";
|
|
1593
|
+
var r = 50;
|
|
1594
|
+
var strokeWidth = 10;
|
|
1595
|
+
var fullLength = 2 * Math.PI * r;
|
|
1596
|
+
var length = fullLength * (percentage < 1 ? 1 - percentage : 0.01);
|
|
1597
|
+
var strokeDashoffset = 2 * Math.PI * r - percentage / 100 * 2 * Math.PI * r;
|
|
1598
|
+
return /* @__PURE__ */ jsxs15("div", {
|
|
1599
|
+
className: "flex items-center flex-col justify-center space-y-0 dark:bg-inherit dark:text-gray-300",
|
|
1600
|
+
children: [
|
|
1601
|
+
/* @__PURE__ */ jsxs15("div", {
|
|
1602
|
+
className: "relative flex items-center justify-center -my-2 -mt-1 overflow-hidden rounded-full",
|
|
1603
|
+
children: [
|
|
1604
|
+
/* @__PURE__ */ jsxs15("svg", {
|
|
1605
|
+
className: "-rotate-90",
|
|
1606
|
+
children: [
|
|
1607
|
+
/* @__PURE__ */ jsx33("circle", {
|
|
1608
|
+
className: "text-gray-300",
|
|
1609
|
+
strokeWidth: strokeWidth,
|
|
1610
|
+
stroke: "currentColor",
|
|
1611
|
+
fill: "transparent",
|
|
1612
|
+
r: r,
|
|
1613
|
+
cx: cx,
|
|
1614
|
+
cy: cy
|
|
1615
|
+
}),
|
|
1616
|
+
/* @__PURE__ */ jsx33("circle", {
|
|
1617
|
+
style: {
|
|
1618
|
+
strokeDashoffset: strokeDashoffset
|
|
1619
|
+
},
|
|
1620
|
+
color: twColor || PRIMARY_COLOR2,
|
|
1621
|
+
ref: function(ref) {
|
|
1622
|
+
if (ref) {}
|
|
1623
|
+
},
|
|
1624
|
+
strokeWidth: strokeWidth,
|
|
1625
|
+
strokeLinecap: "round",
|
|
1626
|
+
stroke: "currentColor",
|
|
1627
|
+
fill: "transparent",
|
|
1628
|
+
r: r,
|
|
1629
|
+
cx: cx,
|
|
1630
|
+
cy: cy,
|
|
1631
|
+
strokeDasharray: fullLength,
|
|
1632
|
+
strokeDashoffset: length
|
|
1633
|
+
})
|
|
1634
|
+
]
|
|
1635
|
+
}),
|
|
1636
|
+
/* @__PURE__ */ jsx33("span", {
|
|
1637
|
+
className: "absolute top-[".concat(50 / 2, "] text-xl leading-none font-medium font-header hidden sm:block"),
|
|
1638
|
+
children: percentage.toString() + "%"
|
|
1639
|
+
})
|
|
1640
|
+
]
|
|
1641
|
+
}),
|
|
1642
|
+
/* @__PURE__ */ jsx33("p", {
|
|
1643
|
+
className: "font-medium sm:text-xl font-header text-center w-full",
|
|
1644
|
+
children: label
|
|
1645
|
+
})
|
|
1646
|
+
]
|
|
1647
|
+
});
|
|
1054
1648
|
};
|
|
1055
|
-
var Small = (
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
/* @__PURE__ */
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1649
|
+
var Small = function(param) {
|
|
1650
|
+
var twColor = param.twColor, percentage = param.percentage, label = param.label;
|
|
1651
|
+
var cx = 18;
|
|
1652
|
+
var cy = 18;
|
|
1653
|
+
var r = 14;
|
|
1654
|
+
var strokeWidth = 4;
|
|
1655
|
+
var strokeDashoffset = 2 * Math.PI * r - percentage / 100 * 2 * Math.PI * r;
|
|
1656
|
+
return /* @__PURE__ */ jsxs15("div", {
|
|
1657
|
+
className: "flex items-center space-x-2 rounded-full bg-transparent border-2 border-slate-100 w-full",
|
|
1658
|
+
children: [
|
|
1659
|
+
/* @__PURE__ */ jsx33("div", {
|
|
1660
|
+
className: "flex items-center justify-center overflow-hidden",
|
|
1661
|
+
children: /* @__PURE__ */ jsxs15("svg", {
|
|
1662
|
+
className: "w-10 h-11 transform translate-x-1 translate-y-1",
|
|
1663
|
+
children: [
|
|
1664
|
+
/* @__PURE__ */ jsx33("circle", {
|
|
1665
|
+
className: "text-gray-300",
|
|
1666
|
+
strokeWidth: strokeWidth,
|
|
1667
|
+
stroke: "currentColor",
|
|
1668
|
+
fill: "transparent",
|
|
1669
|
+
r: r,
|
|
1670
|
+
cx: cx,
|
|
1671
|
+
cy: cy
|
|
1672
|
+
}),
|
|
1673
|
+
/* @__PURE__ */ jsx33("circle", {
|
|
1674
|
+
style: {
|
|
1675
|
+
strokeDashoffset: strokeDashoffset
|
|
1676
|
+
},
|
|
1677
|
+
className: twColor || "text-blue-500",
|
|
1678
|
+
ref: function(ref) {
|
|
1679
|
+
if (ref) {}
|
|
1680
|
+
},
|
|
1681
|
+
strokeWidth: strokeWidth,
|
|
1682
|
+
strokeLinecap: "round",
|
|
1683
|
+
stroke: "currentColor",
|
|
1684
|
+
fill: "transparent",
|
|
1685
|
+
r: r,
|
|
1686
|
+
cx: cx,
|
|
1687
|
+
cy: cy
|
|
1688
|
+
})
|
|
1689
|
+
]
|
|
1690
|
+
})
|
|
1691
|
+
}),
|
|
1692
|
+
/* @__PURE__ */ jsxs15("p", {
|
|
1693
|
+
className: "font-medium dark:text-gray-300 text-gray-600 text-sm font-header mt-1",
|
|
1694
|
+
children: [
|
|
1695
|
+
label,
|
|
1696
|
+
" ",
|
|
1697
|
+
percentage.toString() + "%"
|
|
1698
|
+
]
|
|
1699
|
+
})
|
|
1700
|
+
]
|
|
1701
|
+
});
|
|
1100
1702
|
};
|
|
1101
1703
|
CourseProgress.Small = Small;
|
|
1102
1704
|
var CourseProgress_default = CourseProgress;
|
|
1103
|
-
|
|
1104
1705
|
// src/ProgressBar/ScrollProgress.tsx
|
|
1105
1706
|
import { useEffect as useEffect4, useState as useState5 } from "react";
|
|
1106
|
-
import { jsx as
|
|
1707
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1107
1708
|
var PRIMARY_COLOR3 = "#00b4d8";
|
|
1108
|
-
var ScrollProgress = ()
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
style: {
|
|
1127
|
-
height: "4px",
|
|
1128
|
-
borderRadius: 2,
|
|
1129
|
-
width: "100%",
|
|
1130
|
-
// backgroundColor: '#d1dced',
|
|
1131
|
-
position: "fixed",
|
|
1132
|
-
top: "62px",
|
|
1133
|
-
left: "0px",
|
|
1134
|
-
right: "0px"
|
|
1135
|
-
},
|
|
1136
|
-
children: /* @__PURE__ */ jsx25(
|
|
1137
|
-
"div",
|
|
1138
|
-
{
|
|
1139
|
-
style: {
|
|
1140
|
-
height: "100%",
|
|
1141
|
-
backgroundColor: PRIMARY_COLOR3,
|
|
1709
|
+
var ScrollProgress = function() {
|
|
1710
|
+
var _useState5 = _sliced_to_array(useState5(0), 2), scrollPercentage = _useState5[0], setScrollPercentage = _useState5[1];
|
|
1711
|
+
useEffect4(function() {
|
|
1712
|
+
var handleScroll = function() {
|
|
1713
|
+
var windowHeight = window.innerHeight;
|
|
1714
|
+
var documentHeight = document.documentElement.scrollHeight;
|
|
1715
|
+
var scrollY = window.scrollY;
|
|
1716
|
+
var scrollPercent = scrollY / (documentHeight - windowHeight) * 100;
|
|
1717
|
+
setScrollPercentage(scrollPercent);
|
|
1718
|
+
};
|
|
1719
|
+
window.addEventListener("scroll", handleScroll);
|
|
1720
|
+
return function() {
|
|
1721
|
+
window.removeEventListener("scroll", handleScroll);
|
|
1722
|
+
};
|
|
1723
|
+
}, []);
|
|
1724
|
+
return /* @__PURE__ */ jsx34("div", {
|
|
1725
|
+
style: {
|
|
1726
|
+
height: "4px",
|
|
1142
1727
|
borderRadius: 2,
|
|
1143
|
-
width:
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1728
|
+
width: "100%",
|
|
1729
|
+
// backgroundColor: '#d1dced',
|
|
1730
|
+
position: "fixed",
|
|
1731
|
+
top: "62px",
|
|
1732
|
+
left: "0px",
|
|
1733
|
+
right: "0px"
|
|
1734
|
+
},
|
|
1735
|
+
children: /* @__PURE__ */ jsx34("div", {
|
|
1736
|
+
style: {
|
|
1737
|
+
height: "100%",
|
|
1738
|
+
backgroundColor: PRIMARY_COLOR3,
|
|
1739
|
+
borderRadius: 2,
|
|
1740
|
+
width: "".concat(scrollPercentage, "%")
|
|
1741
|
+
}
|
|
1742
|
+
})
|
|
1743
|
+
});
|
|
1149
1744
|
};
|
|
1150
1745
|
var ScrollProgress_default = ScrollProgress;
|
|
1151
|
-
|
|
1152
1746
|
// src/Icons/AnimateLogo.tsx
|
|
1153
1747
|
import { useEffect as useEffect5, useState as useState6 } from "react";
|
|
1154
|
-
import { jsx as
|
|
1155
|
-
var AnimateLogo = ()
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
{
|
|
1212
|
-
style: {
|
|
1213
|
-
transformOrigin: "center"
|
|
1214
|
-
},
|
|
1215
|
-
transform: "translate(300 300) rotate(0)",
|
|
1216
|
-
height: 176,
|
|
1217
|
-
width: 176,
|
|
1218
|
-
children: [
|
|
1219
|
-
/* @__PURE__ */ jsx26(
|
|
1220
|
-
"path",
|
|
1221
|
-
{
|
|
1222
|
-
className: "stroke-black dark:stroke-white text-gray-900 dark:text-gray-50",
|
|
1223
|
-
stroke: "currentColor",
|
|
1224
|
-
id: "motionPath",
|
|
1225
|
-
fill: "none",
|
|
1226
|
-
strokeLinecap: "round",
|
|
1227
|
-
height: 600,
|
|
1228
|
-
width: 600,
|
|
1748
|
+
import { jsx as jsx35, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1749
|
+
var AnimateLogo = function() {
|
|
1750
|
+
var _useState6 = _sliced_to_array(useState6(false), 2), isFirefox = _useState6[0], setIsFirefox = _useState6[1];
|
|
1751
|
+
useEffect5(function() {
|
|
1752
|
+
var userAgent = window.navigator.userAgent;
|
|
1753
|
+
setIsFirefox(userAgent.indexOf("Firefox") > -1);
|
|
1754
|
+
}, []);
|
|
1755
|
+
if (isFirefox) {
|
|
1756
|
+
return /* @__PURE__ */ jsx35("svg", {
|
|
1757
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1758
|
+
className: "animate-pulse",
|
|
1759
|
+
viewBox: "0 0 600 600",
|
|
1760
|
+
children: /* @__PURE__ */ jsx35("g", {
|
|
1761
|
+
children: /* @__PURE__ */ jsxs16("path", {
|
|
1762
|
+
className: "stroke-black dark:stroke-white text-gray-900 dark:text-gray-50",
|
|
1763
|
+
stroke: "currentColor",
|
|
1764
|
+
fill: "none",
|
|
1765
|
+
strokeLinecap: "round",
|
|
1766
|
+
strokeMiterlimit: "10",
|
|
1767
|
+
strokeWidth: "82",
|
|
1768
|
+
strokeDasharray: "1600",
|
|
1769
|
+
d: "M466.49 164.79c17.79 34.76 25.48 75.66 19.08 118.96-11.28 76.36-67.11 139.06-141.89 158.25-127.11 32.61-243.49-61.27-245.86-184.81C95.79 150.86 182.9 60.52 289.23 58.56c33.95-.63 66.08 7.48 94.22 22.29 0 0 15.68 6.34 10.14 23.19 0 0-68.52 219.82-352.61 268.06",
|
|
1770
|
+
children: [
|
|
1771
|
+
/* @__PURE__ */ jsx35("animate", {
|
|
1772
|
+
attributeName: "stroke-dashoffset",
|
|
1773
|
+
to: "0",
|
|
1774
|
+
from: "1600",
|
|
1775
|
+
dur: "4s",
|
|
1776
|
+
fill: "freeze",
|
|
1777
|
+
repeatCount: "indefinite",
|
|
1778
|
+
calcMode: "cubic",
|
|
1779
|
+
keyTimes: "0;0.375;0.5;0.875;1",
|
|
1780
|
+
keySplines: "0 0.26 0 1;0 0.26 0 1;0 0.26 0 1;0 0.26 0 1",
|
|
1781
|
+
values: "1600;0;0;1600;1600"
|
|
1782
|
+
}),
|
|
1783
|
+
/* @__PURE__ */ jsx35("animateTransform", {
|
|
1784
|
+
attributeName: "transform",
|
|
1785
|
+
type: "rotate",
|
|
1786
|
+
from: "0 300 300",
|
|
1787
|
+
to: "360 300 300",
|
|
1788
|
+
dur: "2s",
|
|
1789
|
+
fill: "freeze",
|
|
1790
|
+
repeatCount: "indefinite",
|
|
1791
|
+
calcMode: "cubic",
|
|
1792
|
+
keyTimes: "0;0.75;1",
|
|
1793
|
+
keySplines: "0 0.26 0 1",
|
|
1794
|
+
values: "0 300 300;360 300 300;360 300 300;"
|
|
1795
|
+
})
|
|
1796
|
+
]
|
|
1797
|
+
})
|
|
1798
|
+
})
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
return /* @__PURE__ */ jsx35("svg", {
|
|
1802
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1803
|
+
viewBox: "0 0 600 600",
|
|
1804
|
+
children: /* @__PURE__ */ jsxs16("g", {
|
|
1229
1805
|
style: {
|
|
1230
|
-
|
|
1806
|
+
transformOrigin: "center"
|
|
1231
1807
|
},
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1808
|
+
transform: "translate(300 300) rotate(0)",
|
|
1809
|
+
height: 176,
|
|
1810
|
+
width: 176,
|
|
1811
|
+
children: [
|
|
1812
|
+
/* @__PURE__ */ jsx35("path", {
|
|
1813
|
+
className: "stroke-black dark:stroke-white text-gray-900 dark:text-gray-50",
|
|
1814
|
+
stroke: "currentColor",
|
|
1815
|
+
id: "motionPath",
|
|
1816
|
+
fill: "none",
|
|
1817
|
+
strokeLinecap: "round",
|
|
1818
|
+
height: 600,
|
|
1819
|
+
width: 600,
|
|
1820
|
+
style: {
|
|
1821
|
+
transformOrigin: "center"
|
|
1822
|
+
},
|
|
1823
|
+
strokeMiterlimit: "10",
|
|
1824
|
+
strokeWidth: "82",
|
|
1825
|
+
strokeDasharray: "1600",
|
|
1826
|
+
d: "M466.49 164.79c17.79 34.76 25.48 75.66 19.08 118.96-11.28 76.36-67.11 139.06-141.89 158.25-127.11 32.61-243.49-61.27-245.86-184.81C95.79 150.86 182.9 60.52 289.23 58.56c33.95-.63 66.08 7.48 94.22 22.29 0 0 15.68 6.34 10.14 23.19 0 0-68.52 219.82-352.61 268.06",
|
|
1827
|
+
children: /* @__PURE__ */ jsx35("animate", {
|
|
1828
|
+
attributeName: "stroke-dashoffset",
|
|
1829
|
+
to: "0",
|
|
1830
|
+
from: "1600",
|
|
1831
|
+
dur: "4s",
|
|
1832
|
+
fill: "freeze",
|
|
1833
|
+
repeatCount: "indefinite",
|
|
1834
|
+
calcMode: "cubic",
|
|
1835
|
+
keyTimes: "0;0.375;0.5;0.875;1",
|
|
1836
|
+
keySplines: "0 0.26 0 1;0 0.26 0 1;0 0.26 0 1;0 0.26 0 1",
|
|
1837
|
+
values: "1600;0;0;1600;1600"
|
|
1838
|
+
})
|
|
1839
|
+
}),
|
|
1840
|
+
/* @__PURE__ */ jsx35("animateTransform", {
|
|
1841
|
+
attributeName: "transform",
|
|
1842
|
+
type: "rotate",
|
|
1843
|
+
from: "0",
|
|
1844
|
+
to: "360",
|
|
1845
|
+
dur: "2s",
|
|
1846
|
+
fill: "freeze",
|
|
1847
|
+
repeatCount: "indefinite",
|
|
1848
|
+
calcMode: "cubic",
|
|
1849
|
+
keyTimes: "0;0.75;1",
|
|
1850
|
+
keySplines: "0 0.26 0 1",
|
|
1851
|
+
values: "0;360;360;"
|
|
1852
|
+
})
|
|
1853
|
+
]
|
|
1854
|
+
})
|
|
1855
|
+
});
|
|
1272
1856
|
};
|
|
1273
1857
|
var AnimateLogo_default = AnimateLogo;
|
|
1274
|
-
|
|
1275
1858
|
// src/Spinners/OverlaySpinner.tsx
|
|
1276
1859
|
import { useEffect as useEffect6, useState as useState7 } from "react";
|
|
1277
1860
|
import { createPortal } from "react-dom";
|
|
1278
|
-
import { jsx as
|
|
1279
|
-
var OverlaySpinner = (
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
"
|
|
1288
|
-
|
|
1861
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1862
|
+
var OverlaySpinner = function(param) {
|
|
1863
|
+
var visible = param.visible;
|
|
1864
|
+
var _useState7 = _sliced_to_array(useState7(false), 2), mounted = _useState7[0], setMounted = _useState7[1];
|
|
1865
|
+
useEffect6(function() {
|
|
1866
|
+
return setMounted(true);
|
|
1867
|
+
}, []);
|
|
1868
|
+
if (!mounted) return null;
|
|
1869
|
+
if (!visible) return null;
|
|
1870
|
+
return createPortal(/* @__PURE__ */ jsx36("div", {
|
|
1871
|
+
className: "animate-fade-in",
|
|
1872
|
+
children: /* @__PURE__ */ jsx36("div", {
|
|
1873
|
+
className: "fixed top-0 left-0 w-full h-screen flex items-center justify-center z-50 dark:bg-black/70 bg-white/60",
|
|
1874
|
+
children: /* @__PURE__ */ jsx36("div", {
|
|
1875
|
+
className: "h-44 w-44 overflow-visible",
|
|
1876
|
+
children: /* @__PURE__ */ jsx36(AnimateLogo_default, {})
|
|
1877
|
+
})
|
|
1878
|
+
})
|
|
1879
|
+
}), typeof window !== "undefined" ? document.body : {}, "spinner");
|
|
1289
1880
|
};
|
|
1290
1881
|
var OverlaySpinner_default = OverlaySpinner;
|
|
1291
|
-
export {
|
|
1292
|
-
AnimateLogo_default as AnimateLogo,
|
|
1293
|
-
Backdrop_default as Backdrop,
|
|
1294
|
-
BottomAlert_default as BottomAlert,
|
|
1295
|
-
Breakpoint_default as Breakpoint,
|
|
1296
|
-
Button_default as Button,
|
|
1297
|
-
Checkbox_default as Checkbox,
|
|
1298
|
-
CircleProgress_default as CircleProgress,
|
|
1299
|
-
Container_default as Container,
|
|
1300
|
-
CourseProgress_default as CourseProgress,
|
|
1301
|
-
ErrorText_default as ErrorText,
|
|
1302
|
-
Fade_default as Fade,
|
|
1303
|
-
FunButton_default as FunButton,
|
|
1304
|
-
FunRoundButton_default as FunRoundButton,
|
|
1305
|
-
IconInfo_default as IconInfo,
|
|
1306
|
-
Modal_default as Modal,
|
|
1307
|
-
NoResults_default as NoResults,
|
|
1308
|
-
NoticeBox_default as NoticeBox,
|
|
1309
|
-
Overlay_default as Overlay,
|
|
1310
|
-
OverlaySpinner_default as OverlaySpinner,
|
|
1311
|
-
PRIMARY_COLOR,
|
|
1312
|
-
Pill_default as Pill,
|
|
1313
|
-
ProgressBar_default as ProgressBar,
|
|
1314
|
-
ProgressBarSimple_default as ProgressBarSimple,
|
|
1315
|
-
RadioOption_default as RadioOption,
|
|
1316
|
-
RatingStars_default as RatingStars,
|
|
1317
|
-
ScrollProgress_default as ScrollProgress,
|
|
1318
|
-
Slider_default as Slider,
|
|
1319
|
-
Spinner_default as Spinner,
|
|
1320
|
-
StepsComponent_default as StepsComponent,
|
|
1321
|
-
Tippy_default as Tippy,
|
|
1322
|
-
ToggleSwitch_default as ToggleSwitch,
|
|
1323
|
-
UserContentSwitcher_default as UserContentSwitcher,
|
|
1324
|
-
baseFieldStyle,
|
|
1325
|
-
createExerciseElementStyle,
|
|
1326
|
-
exerciseDeleteButton,
|
|
1327
|
-
exerciseEditButton,
|
|
1328
|
-
headerButtonClass,
|
|
1329
|
-
headerTippyClass,
|
|
1330
|
-
tippyClassname,
|
|
1331
|
-
toolbarExerciseButton,
|
|
1332
|
-
xIconButton
|
|
1333
|
-
};
|
|
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, toolbarExerciseButton, xIconButton };
|