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.js
CHANGED
|
@@ -1,144 +1,336 @@
|
|
|
1
1
|
"use strict";
|
|
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;
|
|
20
|
+
}
|
|
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 _type_of(obj) {
|
|
124
|
+
"@swc/helpers - typeof";
|
|
125
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
126
|
+
}
|
|
127
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
128
|
+
if (!o) return;
|
|
129
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
130
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
131
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
132
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
133
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
134
|
+
}
|
|
2
135
|
var __create = Object.create;
|
|
3
136
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
137
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
138
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
139
|
var __getProtoOf = Object.getPrototypeOf;
|
|
10
140
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
141
|
+
var __export = function(target, all) {
|
|
142
|
+
for(var name in all)__defProp(target, name, {
|
|
143
|
+
get: all[name],
|
|
144
|
+
enumerable: true
|
|
145
|
+
});
|
|
23
146
|
};
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
147
|
+
var __copyProps = function(to, from, except, desc) {
|
|
148
|
+
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
149
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
150
|
+
try {
|
|
151
|
+
var _loop = function() {
|
|
152
|
+
var key = _step.value;
|
|
153
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
154
|
+
get: function() {
|
|
155
|
+
return from[key];
|
|
156
|
+
},
|
|
157
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
|
161
|
+
} catch (err) {
|
|
162
|
+
_didIteratorError = true;
|
|
163
|
+
_iteratorError = err;
|
|
164
|
+
} finally{
|
|
165
|
+
try {
|
|
166
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
167
|
+
_iterator.return();
|
|
168
|
+
}
|
|
169
|
+
} finally{
|
|
170
|
+
if (_didIteratorError) {
|
|
171
|
+
throw _iteratorError;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
34
175
|
}
|
|
35
|
-
|
|
176
|
+
return to;
|
|
36
177
|
};
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
178
|
+
var __toESM = function(mod, isNodeMode, target) {
|
|
179
|
+
return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
|
|
180
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
181
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
182
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
183
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
184
|
+
value: mod,
|
|
185
|
+
enumerable: true
|
|
186
|
+
}) : target, mod);
|
|
40
187
|
};
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
-
}
|
|
47
|
-
return to;
|
|
188
|
+
var __toCommonJS = function(mod) {
|
|
189
|
+
return __copyProps(__defProp({}, "__esModule", {
|
|
190
|
+
value: true
|
|
191
|
+
}), mod);
|
|
48
192
|
};
|
|
49
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
50
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
55
|
-
mod
|
|
56
|
-
));
|
|
57
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
-
|
|
59
193
|
// src/index.ts
|
|
60
194
|
var index_exports = {};
|
|
61
195
|
__export(index_exports, {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
|
|
196
|
+
AnimateLogo: function() {
|
|
197
|
+
return AnimateLogo_default;
|
|
198
|
+
},
|
|
199
|
+
Backdrop: function() {
|
|
200
|
+
return Backdrop_default;
|
|
201
|
+
},
|
|
202
|
+
BottomAlert: function() {
|
|
203
|
+
return BottomAlert_default;
|
|
204
|
+
},
|
|
205
|
+
Breakpoint: function() {
|
|
206
|
+
return Breakpoint_default;
|
|
207
|
+
},
|
|
208
|
+
Button: function() {
|
|
209
|
+
return Button_default;
|
|
210
|
+
},
|
|
211
|
+
Checkbox: function() {
|
|
212
|
+
return Checkbox_default;
|
|
213
|
+
},
|
|
214
|
+
CircleProgress: function() {
|
|
215
|
+
return CircleProgress_default;
|
|
216
|
+
},
|
|
217
|
+
Container: function() {
|
|
218
|
+
return Container_default;
|
|
219
|
+
},
|
|
220
|
+
CourseProgress: function() {
|
|
221
|
+
return CourseProgress_default;
|
|
222
|
+
},
|
|
223
|
+
ErrorText: function() {
|
|
224
|
+
return ErrorText_default;
|
|
225
|
+
},
|
|
226
|
+
Fade: function() {
|
|
227
|
+
return Fade_default;
|
|
228
|
+
},
|
|
229
|
+
FunButton: function() {
|
|
230
|
+
return FunButton_default;
|
|
231
|
+
},
|
|
232
|
+
FunRoundButton: function() {
|
|
233
|
+
return FunRoundButton_default;
|
|
234
|
+
},
|
|
235
|
+
IconInfo: function() {
|
|
236
|
+
return IconInfo_default;
|
|
237
|
+
},
|
|
238
|
+
Modal: function() {
|
|
239
|
+
return Modal_default;
|
|
240
|
+
},
|
|
241
|
+
NoResults: function() {
|
|
242
|
+
return NoResults_default;
|
|
243
|
+
},
|
|
244
|
+
NoticeBox: function() {
|
|
245
|
+
return NoticeBox_default;
|
|
246
|
+
},
|
|
247
|
+
Overlay: function() {
|
|
248
|
+
return Overlay_default;
|
|
249
|
+
},
|
|
250
|
+
OverlaySpinner: function() {
|
|
251
|
+
return OverlaySpinner_default;
|
|
252
|
+
},
|
|
253
|
+
PRIMARY_COLOR: function() {
|
|
254
|
+
return PRIMARY_COLOR;
|
|
255
|
+
},
|
|
256
|
+
Pill: function() {
|
|
257
|
+
return Pill_default;
|
|
258
|
+
},
|
|
259
|
+
ProgressBar: function() {
|
|
260
|
+
return ProgressBar_default;
|
|
261
|
+
},
|
|
262
|
+
ProgressBarSimple: function() {
|
|
263
|
+
return ProgressBarSimple_default;
|
|
264
|
+
},
|
|
265
|
+
RadioOption: function() {
|
|
266
|
+
return RadioOption_default;
|
|
267
|
+
},
|
|
268
|
+
RatingStars: function() {
|
|
269
|
+
return RatingStars_default;
|
|
270
|
+
},
|
|
271
|
+
ScrollProgress: function() {
|
|
272
|
+
return ScrollProgress_default;
|
|
273
|
+
},
|
|
274
|
+
Slider: function() {
|
|
275
|
+
return Slider_default;
|
|
276
|
+
},
|
|
277
|
+
Spinner: function() {
|
|
278
|
+
return Spinner_default;
|
|
279
|
+
},
|
|
280
|
+
StepsComponent: function() {
|
|
281
|
+
return StepsComponent_default;
|
|
282
|
+
},
|
|
283
|
+
Tippy: function() {
|
|
284
|
+
return Tippy_default;
|
|
285
|
+
},
|
|
286
|
+
ToggleSwitch: function() {
|
|
287
|
+
return ToggleSwitch_default;
|
|
288
|
+
},
|
|
289
|
+
UserContentSwitcher: function() {
|
|
290
|
+
return UserContentSwitcher_default;
|
|
291
|
+
},
|
|
292
|
+
baseFieldStyle: function() {
|
|
293
|
+
return baseFieldStyle;
|
|
294
|
+
},
|
|
295
|
+
createExerciseElementStyle: function() {
|
|
296
|
+
return createExerciseElementStyle;
|
|
297
|
+
},
|
|
298
|
+
exerciseDeleteButton: function() {
|
|
299
|
+
return exerciseDeleteButton;
|
|
300
|
+
},
|
|
301
|
+
exerciseEditButton: function() {
|
|
302
|
+
return exerciseEditButton;
|
|
303
|
+
},
|
|
304
|
+
headerButtonClass: function() {
|
|
305
|
+
return headerButtonClass;
|
|
306
|
+
},
|
|
307
|
+
headerTippyClass: function() {
|
|
308
|
+
return headerTippyClass;
|
|
309
|
+
},
|
|
310
|
+
tippyClassname: function() {
|
|
311
|
+
return tippyClassname;
|
|
312
|
+
},
|
|
313
|
+
toolbarExerciseButton: function() {
|
|
314
|
+
return toolbarExerciseButton;
|
|
315
|
+
},
|
|
316
|
+
xIconButton: function() {
|
|
317
|
+
return xIconButton;
|
|
318
|
+
}
|
|
103
319
|
});
|
|
104
320
|
module.exports = __toCommonJS(index_exports);
|
|
105
|
-
|
|
106
321
|
// src/constants.tsx
|
|
107
322
|
var PRIMARY_COLOR = "#00b4d8";
|
|
108
|
-
|
|
109
|
-
// src/Common/Container.tsx
|
|
110
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
111
|
-
var Container = ({ backgroundImage, style, children, onClick }) => {
|
|
112
|
-
return backgroundImage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
113
|
-
"div",
|
|
114
|
-
{
|
|
115
|
-
style: __spreadValues({
|
|
116
|
-
backgroundImage,
|
|
117
|
-
backgroundSize: "cover"
|
|
118
|
-
}, style),
|
|
119
|
-
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",
|
|
120
|
-
onClick,
|
|
121
|
-
children: children ? children : null
|
|
122
|
-
}
|
|
123
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
124
|
-
"div",
|
|
125
|
-
{
|
|
126
|
-
className: `w-full dark:bg-slate-950 mx-auto overflow-y-auto overflow-x-clip px-0 sm:px-16 relative pt-20`,
|
|
127
|
-
onClick,
|
|
128
|
-
style: style || { minHeight: "100vh" },
|
|
129
|
-
children: children ? children : null
|
|
130
|
-
}
|
|
131
|
-
);
|
|
132
|
-
};
|
|
133
|
-
var Container_default = Container;
|
|
134
|
-
|
|
135
323
|
// src/Common/ErrorText.tsx
|
|
136
|
-
var
|
|
137
|
-
var ErrorText = (
|
|
138
|
-
|
|
324
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
325
|
+
var ErrorText = function(param) {
|
|
326
|
+
var text = param.text, style = param.style, classNames = param.classNames;
|
|
327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
328
|
+
className: classNames ? classNames : "text-red-500 font-semibold text-wrap py-auto",
|
|
329
|
+
style: style,
|
|
330
|
+
children: text
|
|
331
|
+
});
|
|
139
332
|
};
|
|
140
333
|
var ErrorText_default = ErrorText;
|
|
141
|
-
|
|
142
334
|
// src/Common/fieldStyle.ts
|
|
143
335
|
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";
|
|
144
336
|
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";
|
|
@@ -149,1446 +341,1776 @@ var tippyClassname = "p-2 bg-slate-600 dark:bg-slate-900 opacity-90 text-white f
|
|
|
149
341
|
var headerTippyClass = "rounded-lg p-2 bg-slate-950 opacity-95 text-white font-medium";
|
|
150
342
|
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";
|
|
151
343
|
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";
|
|
152
|
-
|
|
153
344
|
// src/Spinners/Spinner.tsx
|
|
154
|
-
var
|
|
155
|
-
var Spinner = (
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
absolute
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
A 10 10 0 0 1 12 22
|
|
193
|
-
A 10 10 0 0 1 2 12
|
|
194
|
-
A 10 10 0 0 1 12 2
|
|
195
|
-
`,
|
|
196
|
-
strokeDasharray: "13 18.4",
|
|
197
|
-
stroke: "inherit",
|
|
198
|
-
className: color
|
|
199
|
-
}
|
|
200
|
-
)
|
|
201
|
-
}
|
|
202
|
-
)
|
|
203
|
-
] });
|
|
345
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
346
|
+
var Spinner = function(param) {
|
|
347
|
+
var _param_visible = param.visible, visible = _param_visible === void 0 ? true : _param_visible, size = param.size, white = param.white, isDark = param.isDark;
|
|
348
|
+
if (visible === false) return null;
|
|
349
|
+
var isWhite = white || isDark;
|
|
350
|
+
var color = isWhite ? "stroke-white/90" : "stroke-slate-600/80";
|
|
351
|
+
var bgColor = isWhite ? "stroke-white/20" : "stroke-slate-500/20";
|
|
352
|
+
var dimensions = size === "small" ? "w-5 h-5" : "w-8 h-8";
|
|
353
|
+
var spinnerClasses = "\n absolute\n top-0\n animate-spin\n ".concat(dimensions, "\n ");
|
|
354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
|
|
355
|
+
className: "relative h-8 w-8 flex justify-center items-center",
|
|
356
|
+
children: [
|
|
357
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", {
|
|
358
|
+
className: "absolute top-0 ".concat(dimensions, " ").concat(bgColor),
|
|
359
|
+
viewBox: "0 0 24 24",
|
|
360
|
+
fill: "none",
|
|
361
|
+
strokeWidth: "2.4",
|
|
362
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", {
|
|
363
|
+
cx: "12",
|
|
364
|
+
cy: "12",
|
|
365
|
+
r: "10"
|
|
366
|
+
})
|
|
367
|
+
}),
|
|
368
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", {
|
|
369
|
+
className: spinnerClasses,
|
|
370
|
+
viewBox: "0 0 24 24",
|
|
371
|
+
fill: "none",
|
|
372
|
+
strokeWidth: "2.4",
|
|
373
|
+
strokeLinecap: "round",
|
|
374
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", {
|
|
375
|
+
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 ",
|
|
376
|
+
strokeDasharray: "13 18.4",
|
|
377
|
+
stroke: "inherit",
|
|
378
|
+
className: color
|
|
379
|
+
})
|
|
380
|
+
})
|
|
381
|
+
]
|
|
382
|
+
});
|
|
204
383
|
};
|
|
205
|
-
var SpinnerCentered = (props)
|
|
206
|
-
|
|
207
|
-
|
|
384
|
+
var SpinnerCentered = function(props) {
|
|
385
|
+
if (props.visible === false) return null;
|
|
386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
387
|
+
className: "w-full flex justify-center items-center",
|
|
388
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Spinner, _object_spread({}, props))
|
|
389
|
+
});
|
|
208
390
|
};
|
|
209
391
|
Spinner.displayName = "Spinner";
|
|
210
392
|
SpinnerCentered.displayName = "Spinner.Centered";
|
|
211
393
|
Spinner.Centered = SpinnerCentered;
|
|
212
394
|
var Spinner_default = Spinner;
|
|
213
|
-
|
|
214
395
|
// src/Common/NoResults.tsx
|
|
215
|
-
var
|
|
396
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
216
397
|
var HEIGHT = 160;
|
|
217
398
|
var WIDTH = HEIGHT * (16 / 9);
|
|
218
|
-
var NoResults = (
|
|
219
|
-
|
|
220
|
-
/* @__PURE__ */ (0,
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
399
|
+
var NoResults = function(param) {
|
|
400
|
+
var loading = param.loading, message = param.message;
|
|
401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", {
|
|
402
|
+
className: "relative w-full flex justify-center items-center",
|
|
403
|
+
children: [
|
|
404
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", {
|
|
405
|
+
className: "flex justify-start w-full space-x-2 py-3 p-4 bg-slate-100 dark:bg-slate-800 rounded-md",
|
|
406
|
+
children: [
|
|
407
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", {
|
|
408
|
+
style: {
|
|
409
|
+
width: "calc(".concat(WIDTH, "px + 1rem)"),
|
|
410
|
+
height: 320
|
|
411
|
+
},
|
|
412
|
+
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"
|
|
413
|
+
}),
|
|
414
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", {
|
|
415
|
+
style: {
|
|
416
|
+
width: "calc(".concat(WIDTH, "px + 1rem)"),
|
|
417
|
+
height: 320
|
|
418
|
+
},
|
|
419
|
+
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"
|
|
420
|
+
})
|
|
421
|
+
]
|
|
422
|
+
}),
|
|
423
|
+
!loading && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", {
|
|
424
|
+
className: "absolute w-full h-full flex justify-center items-center m-auto",
|
|
425
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", {
|
|
426
|
+
className: "p-4 rounded-lg bg-white dark:bg-slate-700 shadow-xl",
|
|
427
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", {
|
|
428
|
+
className: "font-semibold text-lg text-gray-700 dark:text-gray-300",
|
|
429
|
+
children: message || "No results"
|
|
430
|
+
})
|
|
431
|
+
})
|
|
432
|
+
})
|
|
433
|
+
]
|
|
434
|
+
});
|
|
226
435
|
};
|
|
227
436
|
var NoResults_default = NoResults;
|
|
228
|
-
|
|
437
|
+
// src/Common/Container.tsx
|
|
438
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
439
|
+
var Container = function(param) {
|
|
440
|
+
var backgroundImage = param.backgroundImage, style = param.style, children = param.children, onClick = param.onClick;
|
|
441
|
+
return backgroundImage ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", {
|
|
442
|
+
style: _object_spread({
|
|
443
|
+
backgroundImage: backgroundImage,
|
|
444
|
+
backgroundSize: "cover"
|
|
445
|
+
}, style),
|
|
446
|
+
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",
|
|
447
|
+
onClick: onClick,
|
|
448
|
+
children: children ? children : null
|
|
449
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", {
|
|
450
|
+
className: "w-full dark:bg-slate-950 mx-auto overflow-y-auto overflow-x-clip px-0 sm:px-16 relative pt-20",
|
|
451
|
+
onClick: onClick,
|
|
452
|
+
style: style || {
|
|
453
|
+
minHeight: "100vh"
|
|
454
|
+
},
|
|
455
|
+
children: children ? children : null
|
|
456
|
+
});
|
|
457
|
+
};
|
|
458
|
+
var Container_default = Container;
|
|
229
459
|
// src/Common/Pill.tsx
|
|
230
460
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
231
|
-
var Pill = (
|
|
232
|
-
|
|
461
|
+
var Pill = function(param) {
|
|
462
|
+
var text = param.text;
|
|
463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", {
|
|
464
|
+
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",
|
|
465
|
+
children: text
|
|
466
|
+
});
|
|
233
467
|
};
|
|
234
468
|
var Pill_default = Pill;
|
|
235
|
-
|
|
236
469
|
// src/Common/StepsComponent.tsx
|
|
237
470
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
238
|
-
var StepsComponent = (
|
|
239
|
-
|
|
240
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
471
|
+
var StepsComponent = function(param) {
|
|
472
|
+
var steps = param.steps, activeStep = param.activeStep, onStepPress = param.onStepPress;
|
|
473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
|
|
474
|
+
className: "flex justify-between items-center w-full p-1 mb-2",
|
|
475
|
+
children: steps.map(function(step, index) {
|
|
476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
|
|
477
|
+
className: "flex justify-center items-center space-x-2 w-full",
|
|
478
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
|
|
479
|
+
className: "flex flex-col items-center",
|
|
480
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", {
|
|
481
|
+
type: "button",
|
|
482
|
+
onClick: function() {
|
|
483
|
+
return onStepPress(index);
|
|
484
|
+
},
|
|
485
|
+
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"),
|
|
486
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", {
|
|
487
|
+
className: "font-medium truncate",
|
|
488
|
+
children: [
|
|
489
|
+
index + 1,
|
|
490
|
+
". ",
|
|
491
|
+
step.label
|
|
492
|
+
]
|
|
493
|
+
})
|
|
494
|
+
})
|
|
495
|
+
})
|
|
496
|
+
}, "step_".concat(index, "_").concat(step.label));
|
|
497
|
+
})
|
|
498
|
+
});
|
|
255
499
|
};
|
|
256
500
|
var StepsComponent_default = StepsComponent;
|
|
257
|
-
|
|
258
501
|
// src/Fade/Fade.tsx
|
|
259
502
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
260
|
-
var Fade = (
|
|
261
|
-
|
|
503
|
+
var Fade = function(param) {
|
|
504
|
+
var children = param.children, inProp = param.inProp;
|
|
505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", {
|
|
506
|
+
className: "animate-fade-in",
|
|
507
|
+
children: children
|
|
508
|
+
});
|
|
262
509
|
};
|
|
263
510
|
var Fade_default = Fade;
|
|
264
|
-
|
|
265
511
|
// src/Backdrop/Backdrop.tsx
|
|
266
512
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
267
|
-
var Backdrop = (
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
"div",
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
);
|
|
513
|
+
var Backdrop = function(param) {
|
|
514
|
+
var visible = param.visible, onClick = param.onClick, opacity = param.opacity;
|
|
515
|
+
if (!visible) return null;
|
|
516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", {
|
|
517
|
+
style: {
|
|
518
|
+
opacity: opacity ? opacity : 90,
|
|
519
|
+
zIndex: 21
|
|
520
|
+
},
|
|
521
|
+
className: "fixed top-0 left-0 w-full h-screen bg-gray-100 dark:bg-slate-900",
|
|
522
|
+
onClick: onClick
|
|
523
|
+
});
|
|
280
524
|
};
|
|
281
525
|
var Backdrop_default = Backdrop;
|
|
282
|
-
|
|
283
526
|
// src/Breakpoint/Breakpoint.tsx
|
|
284
527
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
285
|
-
var Breakpoint = (
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
528
|
+
var Breakpoint = function(param) {
|
|
529
|
+
var children = param.children, fromSize = param.fromSize, toSize = param.toSize;
|
|
530
|
+
var className = "";
|
|
531
|
+
if (fromSize && toSize) {
|
|
532
|
+
className = "hidden ".concat(fromSize, ":block ").concat(toSize, ":hidden");
|
|
533
|
+
} else if (fromSize) {
|
|
534
|
+
className = "hidden ".concat(fromSize, ":block");
|
|
535
|
+
} else if (toSize) {
|
|
536
|
+
className = "block ".concat(toSize, ":hidden");
|
|
537
|
+
}
|
|
538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", {
|
|
539
|
+
className: className,
|
|
540
|
+
children: children
|
|
541
|
+
});
|
|
295
542
|
};
|
|
296
543
|
var Breakpoint_default = Breakpoint;
|
|
297
|
-
|
|
298
544
|
// src/Backdrop/Overlay.tsx
|
|
299
545
|
var import_react = require("react");
|
|
300
546
|
var import_react_dom = __toESM(require("react-dom"));
|
|
301
547
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
302
|
-
var Overlay = (
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
548
|
+
var Overlay = function(param) {
|
|
549
|
+
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;
|
|
550
|
+
var _ref = _sliced_to_array((0, import_react.useState)(null), 2), modalRoot = _ref[0], setModalRoot = _ref[1];
|
|
551
|
+
(0, import_react.useEffect)(function() {
|
|
552
|
+
var root = document.getElementById("modal-root");
|
|
553
|
+
if (!root) {
|
|
554
|
+
root = document.createElement("div");
|
|
555
|
+
root.id = "modal-root";
|
|
556
|
+
document.body.appendChild(root);
|
|
557
|
+
}
|
|
558
|
+
setModalRoot(root);
|
|
559
|
+
return function() {
|
|
560
|
+
var root2 = document.getElementById("modal-root");
|
|
561
|
+
if (root2) {
|
|
562
|
+
document.body.removeChild(root2);
|
|
563
|
+
}
|
|
564
|
+
};
|
|
565
|
+
}, [
|
|
566
|
+
visible
|
|
567
|
+
]);
|
|
568
|
+
if (!visible || !modalRoot) return null;
|
|
569
|
+
return import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", {
|
|
570
|
+
className: "animate-fade-in",
|
|
571
|
+
children: withContainer ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", {
|
|
572
|
+
onClick: onDismissed || onClick,
|
|
573
|
+
className: "top-0 left-0 fixed w-full h-screen flex items-center justify-center",
|
|
574
|
+
style: {
|
|
575
|
+
background: isDark ? "rgba(0, 0, 0, ".concat(opacity || "0.7", ")") : "rgba(255, 255, 255, ".concat(opacity || "0.6", ")"),
|
|
576
|
+
zIndex: zIndex || 9999
|
|
577
|
+
},
|
|
578
|
+
children: children
|
|
579
|
+
}) : children
|
|
580
|
+
}), modalRoot);
|
|
335
581
|
};
|
|
336
582
|
var Overlay_default = Overlay;
|
|
337
|
-
|
|
338
583
|
// src/Button/Button.tsx
|
|
339
584
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
340
|
-
var Button = (
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
585
|
+
var Button = function(param) {
|
|
586
|
+
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;
|
|
587
|
+
var styled = function() {
|
|
588
|
+
switch(kind){
|
|
589
|
+
case "primary":
|
|
590
|
+
return "bg-primary font-header text-white font-medium transition-all duration-75 ".concat(disabled ? "bg-white/50" : "hover:bg-black/10");
|
|
591
|
+
case "indigo":
|
|
592
|
+
return "bg-indigo-500 font-header text-white font-medium transition-all duration-75 ".concat(disabled ? "bg-white/50" : "hover:bg-black/10");
|
|
593
|
+
case "green":
|
|
594
|
+
return "bg-green-500 font-header text-white font-medium transition-all duration-75 ".concat(disabled ? "bg-white/50" : "hover:bg-black/10");
|
|
595
|
+
case "teal":
|
|
596
|
+
return "bg-teal-500 font-header text-white font-medium transition-all duration-75 ".concat(disabled ? "bg-white/50" : "hover:bg-black/10");
|
|
597
|
+
case "secondary":
|
|
598
|
+
return "bg-secondary text-white font-header font-medium hover:bg-black/10 transition-all duration-75";
|
|
599
|
+
case "base":
|
|
600
|
+
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";
|
|
601
|
+
case "gray":
|
|
602
|
+
return "bg-slate-400 dark:bg-slate-700 font-header text-white border-1 font-medium hover:bg-black/10 transition-opacity duration-75";
|
|
603
|
+
case "alert":
|
|
604
|
+
return "bg-amber-500 font-header text-white transition-all hover:bg-black/10 duration-75";
|
|
605
|
+
case "warning":
|
|
606
|
+
return "bg-red-500 font-header text-white font-medium hover:bg-black/10 transition-opacity duration-100";
|
|
607
|
+
default:
|
|
608
|
+
break;
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
var sized = function() {
|
|
612
|
+
switch(size){
|
|
613
|
+
case "small":
|
|
614
|
+
return "p-1";
|
|
615
|
+
case "fixed":
|
|
616
|
+
return "box-border w-32 h-11";
|
|
617
|
+
case "large":
|
|
618
|
+
return "px-2 h-11";
|
|
619
|
+
default:
|
|
620
|
+
return "px-2 py-1";
|
|
621
|
+
}
|
|
622
|
+
};
|
|
623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", {
|
|
624
|
+
type: type || "button",
|
|
625
|
+
disabled: disabled,
|
|
626
|
+
className: "rounded-lg focus:outline-none transition duration-100 ".concat(styled(), " ").concat(sized()),
|
|
627
|
+
onClick: onClick,
|
|
628
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", {
|
|
629
|
+
className: "w-full max-h-11",
|
|
630
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", {
|
|
631
|
+
className: "flex w-full justify-center items-center",
|
|
632
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Spinner_default, {
|
|
633
|
+
white: true
|
|
634
|
+
})
|
|
635
|
+
}) : children
|
|
636
|
+
})
|
|
637
|
+
});
|
|
378
638
|
};
|
|
379
639
|
var Button_default = Button;
|
|
380
|
-
|
|
381
640
|
// src/Button/FunButton.tsx
|
|
382
641
|
var import_react2 = require("react");
|
|
383
642
|
var import_framer_motion = require("framer-motion");
|
|
384
643
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
385
|
-
var FunButton = ({
|
|
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
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}, [size]);
|
|
430
|
-
const computedClassName = (0, import_react2.useMemo)(() => {
|
|
431
|
-
const cName = className + " rounded-lg border-none p-0 cursor-pointer opacity-90 hover:bg-black/30 transition-opacity";
|
|
432
|
-
return cName + (disabled ? " opacity-70 cursor-default" : "");
|
|
433
|
-
}, [className, disabled]);
|
|
434
|
-
const computedClassStyle = (0, import_react2.useMemo)(() => {
|
|
435
|
-
const cName = classStyle;
|
|
436
|
-
return cName + (disabled ? " opacity-70 cursor-default hover:bg-black/70" : "");
|
|
437
|
-
}, [classStyle, disabled]);
|
|
438
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
439
|
-
import_framer_motion.motion.button,
|
|
440
|
-
{
|
|
441
|
-
className: `${computedClassName}`,
|
|
442
|
-
style: { background: front, outlineOffset: "4px" },
|
|
443
|
-
type,
|
|
444
|
-
onMouseDown: onClick,
|
|
445
|
-
whileTap: { y: disabled ? 0 : 2 },
|
|
446
|
-
transition: { duration: 0.1, ease: "easeInOut" },
|
|
447
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
448
|
-
import_framer_motion.motion.span,
|
|
449
|
-
{
|
|
450
|
-
className: computedClassStyle,
|
|
451
|
-
style: {
|
|
452
|
-
background: bottom,
|
|
453
|
-
opacity: 1
|
|
454
|
-
},
|
|
455
|
-
initial: { y: active ? 0 : -6 },
|
|
456
|
-
animate: { y: active ? 0 : -6 },
|
|
457
|
-
whileTap: { y: disabled ? -6 : 0 },
|
|
458
|
-
transition: { duration: 0.1, ease: "easeInOut" },
|
|
459
|
-
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: size === "small" ? "min-h-6" : "min-h-10", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Spinner_default.Centered, { visible: true, size: size === "small" ? "small" : "base", white: true }) }) : children
|
|
644
|
+
var FunButton = function(param) {
|
|
645
|
+
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;
|
|
646
|
+
var _ref = (0, import_react2.useMemo)(function() {
|
|
647
|
+
switch(color){
|
|
648
|
+
case "primary":
|
|
649
|
+
return {
|
|
650
|
+
bottom: "#00b4d8",
|
|
651
|
+
front: "#0284c7"
|
|
652
|
+
};
|
|
653
|
+
case "red":
|
|
654
|
+
return {
|
|
655
|
+
bottom: "#f00f0f",
|
|
656
|
+
front: "#b91c1c"
|
|
657
|
+
};
|
|
658
|
+
case "green":
|
|
659
|
+
return {
|
|
660
|
+
bottom: "#22c55e",
|
|
661
|
+
front: "#16a34a"
|
|
662
|
+
};
|
|
663
|
+
case "purple":
|
|
664
|
+
return {
|
|
665
|
+
bottom: "#6366f1",
|
|
666
|
+
front: "#4f46e5"
|
|
667
|
+
};
|
|
668
|
+
case "teal":
|
|
669
|
+
return {
|
|
670
|
+
bottom: "#14b8a6",
|
|
671
|
+
front: "#0d9488"
|
|
672
|
+
};
|
|
673
|
+
case "cyan":
|
|
674
|
+
return {
|
|
675
|
+
bottom: "#06b6d4",
|
|
676
|
+
front: "#0891b2"
|
|
677
|
+
};
|
|
678
|
+
case "yellow":
|
|
679
|
+
return {
|
|
680
|
+
bottom: "#eab308",
|
|
681
|
+
front: "#ca8a04"
|
|
682
|
+
};
|
|
683
|
+
default:
|
|
684
|
+
return {
|
|
685
|
+
bottom: "#00b4d8",
|
|
686
|
+
front: "#0369a1"
|
|
687
|
+
};
|
|
460
688
|
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
689
|
+
}, [
|
|
690
|
+
color
|
|
691
|
+
]), front = _ref.front, bottom = _ref.bottom;
|
|
692
|
+
var classStyle = (0, import_react2.useMemo)(function() {
|
|
693
|
+
switch(size){
|
|
694
|
+
case "base":
|
|
695
|
+
return "relative block px-8 py-3 rounded-lg text-lg text-white font-medium font-header hover:bg-slate-900/20";
|
|
696
|
+
case "big":
|
|
697
|
+
return "relative block px-12 py-4 rounded-lg text-lg text-white font-medium font-header hover:bg-slate-900/20";
|
|
698
|
+
case "small":
|
|
699
|
+
return "relative block px-6 py-1 rounded-lg text-lg text-white font-medium font-header hover:bg-slate-900/20";
|
|
700
|
+
case "square":
|
|
701
|
+
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";
|
|
702
|
+
default:
|
|
703
|
+
return "relative block px-8 py-3 rounded-lg text-lg text-white font-medium font-header hover:bg-slate-900/20";
|
|
704
|
+
}
|
|
705
|
+
}, [
|
|
706
|
+
size
|
|
707
|
+
]);
|
|
708
|
+
var computedClassName = (0, import_react2.useMemo)(function() {
|
|
709
|
+
var cName = className + " rounded-lg border-none p-0 cursor-pointer opacity-90 hover:bg-black/30 transition-opacity";
|
|
710
|
+
return cName + (disabled ? " opacity-70 cursor-default" : "");
|
|
711
|
+
}, [
|
|
712
|
+
className,
|
|
713
|
+
disabled
|
|
714
|
+
]);
|
|
715
|
+
var computedClassStyle = (0, import_react2.useMemo)(function() {
|
|
716
|
+
var cName = classStyle;
|
|
717
|
+
return cName + (disabled ? " opacity-70 cursor-default hover:bg-black/70" : "");
|
|
718
|
+
}, [
|
|
719
|
+
classStyle,
|
|
720
|
+
disabled
|
|
721
|
+
]);
|
|
722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_framer_motion.motion.button, {
|
|
723
|
+
className: "".concat(computedClassName),
|
|
724
|
+
style: {
|
|
725
|
+
background: front,
|
|
726
|
+
outlineOffset: "4px"
|
|
727
|
+
},
|
|
728
|
+
type: type,
|
|
729
|
+
onMouseDown: onClick,
|
|
730
|
+
whileTap: {
|
|
731
|
+
y: disabled ? 0 : 2
|
|
732
|
+
},
|
|
733
|
+
transition: {
|
|
734
|
+
duration: 0.1,
|
|
735
|
+
ease: "easeInOut"
|
|
736
|
+
},
|
|
737
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_framer_motion.motion.span, {
|
|
738
|
+
className: computedClassStyle,
|
|
739
|
+
style: {
|
|
740
|
+
background: bottom,
|
|
741
|
+
opacity: 1
|
|
742
|
+
},
|
|
743
|
+
initial: {
|
|
744
|
+
y: active ? 0 : -6
|
|
745
|
+
},
|
|
746
|
+
animate: {
|
|
747
|
+
y: active ? 0 : -6
|
|
748
|
+
},
|
|
749
|
+
whileTap: {
|
|
750
|
+
y: disabled ? -6 : 0
|
|
751
|
+
},
|
|
752
|
+
transition: {
|
|
753
|
+
duration: 0.1,
|
|
754
|
+
ease: "easeInOut"
|
|
755
|
+
},
|
|
756
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", {
|
|
757
|
+
className: size === "small" ? "min-h-6" : "min-h-10",
|
|
758
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Spinner_default.Centered, {
|
|
759
|
+
visible: true,
|
|
760
|
+
size: size === "small" ? "small" : "base",
|
|
761
|
+
white: true
|
|
762
|
+
})
|
|
763
|
+
}) : children
|
|
764
|
+
})
|
|
765
|
+
});
|
|
464
766
|
};
|
|
465
767
|
var FunButton_default = FunButton;
|
|
466
|
-
|
|
467
768
|
// src/Button/FunRoundButton.tsx
|
|
468
769
|
var import_react3 = require("react");
|
|
469
770
|
var import_framer_motion2 = require("framer-motion");
|
|
470
771
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
471
|
-
var FunRoundButton = (
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
772
|
+
var FunRoundButton = function(param) {
|
|
773
|
+
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;
|
|
774
|
+
var _ref = (0, import_react3.useMemo)(function() {
|
|
775
|
+
switch(color){
|
|
776
|
+
case "primary":
|
|
777
|
+
return {
|
|
778
|
+
bottom: "#00b4d8",
|
|
779
|
+
front: "#0284c7"
|
|
780
|
+
};
|
|
781
|
+
case "red":
|
|
782
|
+
return {
|
|
783
|
+
bottom: disabled ? "hsl(340deg 100% 42%)" : "hsl(345deg 100% 47%)",
|
|
784
|
+
front: disabled ? "hsl(340deg 100% 52%)" : "hsl(340deg 100% 32%)"
|
|
785
|
+
};
|
|
786
|
+
case "green":
|
|
787
|
+
return {
|
|
788
|
+
bottom: disabled ? "#86efac" : "#22c55e",
|
|
789
|
+
front: disabled ? "#4ade80" : "#16a34a"
|
|
790
|
+
};
|
|
791
|
+
case "purple":
|
|
792
|
+
return {
|
|
793
|
+
bottom: disabled ? "#a5b4fc" : "#6366f1",
|
|
794
|
+
front: disabled ? "#818cf8" : "#4f46e5"
|
|
795
|
+
};
|
|
796
|
+
case "teal":
|
|
797
|
+
return {
|
|
798
|
+
bottom: disabled ? "#5eead4" : "#14b8a6",
|
|
799
|
+
front: disabled ? "#2dd4bf" : "#0d9488"
|
|
800
|
+
};
|
|
801
|
+
case "yellow":
|
|
802
|
+
return {
|
|
803
|
+
bottom: disabled ? "#fde047" : "#eab308",
|
|
804
|
+
front: disabled ? "#facc15" : "#ca8a04"
|
|
805
|
+
};
|
|
806
|
+
default:
|
|
807
|
+
return {
|
|
808
|
+
bottom: disabled ? "#d1d5db" : "#00b4d8",
|
|
809
|
+
front: disabled ? "#38bdf8" : "#0369a1"
|
|
810
|
+
};
|
|
811
|
+
}
|
|
812
|
+
}, [
|
|
813
|
+
color,
|
|
814
|
+
disabled
|
|
815
|
+
]), front = _ref.front, bottom = _ref.bottom;
|
|
816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_framer_motion2.motion.button, {
|
|
817
|
+
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"),
|
|
818
|
+
style: {
|
|
819
|
+
background: front,
|
|
512
820
|
height: size,
|
|
513
821
|
width: size + 2,
|
|
514
|
-
borderRadius: (size + 2) / 2
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
822
|
+
borderRadius: (size + 2) / 2,
|
|
823
|
+
outlineOffset: 0
|
|
824
|
+
},
|
|
825
|
+
type: type,
|
|
826
|
+
disabled: disabled,
|
|
827
|
+
onClick: onClick,
|
|
828
|
+
whileHover: {
|
|
829
|
+
opacity: 0.95
|
|
830
|
+
},
|
|
831
|
+
whileTap: {
|
|
832
|
+
y: disabled ? 0 : 2
|
|
833
|
+
},
|
|
834
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_framer_motion2.motion.span, {
|
|
835
|
+
className: "flex justify-center items-center z-10",
|
|
836
|
+
style: {
|
|
837
|
+
background: bottom,
|
|
838
|
+
height: size,
|
|
839
|
+
width: size + 2,
|
|
840
|
+
borderRadius: (size + 2) / 2
|
|
841
|
+
},
|
|
842
|
+
initial: {
|
|
843
|
+
y: active ? 0 : -6
|
|
844
|
+
},
|
|
845
|
+
animate: {
|
|
846
|
+
y: active ? 0 : -6
|
|
847
|
+
},
|
|
848
|
+
transition: {
|
|
849
|
+
duration: 0.1,
|
|
850
|
+
ease: "easeInOut"
|
|
851
|
+
},
|
|
852
|
+
whileHover: {
|
|
853
|
+
opacity: 0.95
|
|
854
|
+
},
|
|
855
|
+
whileTap: {
|
|
856
|
+
y: disabled ? active ? 0 : -6 : 0
|
|
857
|
+
},
|
|
858
|
+
children: children
|
|
859
|
+
})
|
|
860
|
+
});
|
|
526
861
|
};
|
|
527
862
|
var FunRoundButton_default = FunRoundButton;
|
|
528
|
-
|
|
529
863
|
// src/Checkbox/Checkbox.tsx
|
|
530
864
|
var import_react4 = require("react");
|
|
531
865
|
var import_formik = require("formik");
|
|
532
866
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
533
|
-
var Checkbox = (
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", {
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
867
|
+
var Checkbox = function(param) {
|
|
868
|
+
var name = param.name, labelText = param.labelText, isLarge = param.isLarge, onChange = param.onChange, isDisabled = param.isDisabled;
|
|
869
|
+
var _ref = _sliced_to_array((0, import_formik.useField)(name), 3), value = _ref[0].value, error = _ref[1].error, _ref_ = _ref[2], setValue = _ref_.setValue, setTouched = _ref_.setTouched;
|
|
870
|
+
var onCheck = function(e) {
|
|
871
|
+
setTouched(true);
|
|
872
|
+
setValue(!value, true);
|
|
873
|
+
};
|
|
874
|
+
var rand = (0, import_react4.useMemo)(function() {
|
|
875
|
+
return Math.random();
|
|
876
|
+
}, []);
|
|
877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", {
|
|
878
|
+
className: "relative flex flex-col justify-center items-center",
|
|
879
|
+
children: [
|
|
880
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", {
|
|
881
|
+
className: "flex items-center",
|
|
882
|
+
children: [
|
|
883
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", {
|
|
884
|
+
disabled: !!isDisabled,
|
|
885
|
+
onChange: function(e) {
|
|
886
|
+
onCheck(e);
|
|
887
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(Boolean(e.target.value));
|
|
888
|
+
},
|
|
889
|
+
value: value ? "true" : "false",
|
|
890
|
+
id: "".concat(name).concat(rand),
|
|
891
|
+
name: name,
|
|
892
|
+
type: "checkbox",
|
|
893
|
+
checked: !!value,
|
|
894
|
+
className: "form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded ".concat(isLarge ? "h-5 w-5" : "h-4 w-4")
|
|
895
|
+
}),
|
|
896
|
+
typeof labelText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", {
|
|
897
|
+
htmlFor: "".concat(name).concat(rand),
|
|
898
|
+
className: "ml-2 block text-sm text-gray-800 dark:text-gray-200",
|
|
899
|
+
children: labelText
|
|
900
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", {
|
|
901
|
+
htmlFor: "".concat(name).concat(rand),
|
|
902
|
+
children: labelText
|
|
903
|
+
})
|
|
904
|
+
]
|
|
905
|
+
}),
|
|
906
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ErrorText_default, {
|
|
907
|
+
classNames: "absolute w-64 left-6 top-4 text-xs text-red-500",
|
|
908
|
+
text: error
|
|
909
|
+
})
|
|
910
|
+
]
|
|
911
|
+
});
|
|
564
912
|
};
|
|
565
|
-
var MultiChoiceCheckBox = (
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
913
|
+
var MultiChoiceCheckBox = function(param) {
|
|
914
|
+
var name = param.name, hasMultipleAnswers = param.hasMultipleAnswers, index = param.index, isLarge = param.isLarge, allOptionsName = param.allOptionsName;
|
|
915
|
+
var _ref = _sliced_to_array((0, import_formik.useField)(name), 3), value = _ref[0].value, ref = _object_destructuring_empty(_ref[1]), _ref_ = _ref[2], setValue = _ref_.setValue, setTouched = _ref_.setTouched;
|
|
916
|
+
var _ref1 = _sliced_to_array((0, import_formik.useField)(allOptionsName), 3), _ref_1 = _ref1[0], optionsValue = _ref_1.value, _ref_2 = _ref1[2], setOptionsValue = _ref_2.setValue;
|
|
917
|
+
var onCheck = function(e) {
|
|
918
|
+
setTouched(true);
|
|
919
|
+
if (hasMultipleAnswers) {
|
|
920
|
+
setValue(!value);
|
|
921
|
+
return;
|
|
922
|
+
}
|
|
923
|
+
setOptionsValue(optionsValue === null || optionsValue === void 0 ? void 0 : optionsValue.map(function(el, idx) {
|
|
924
|
+
return {
|
|
925
|
+
option: el.option,
|
|
926
|
+
id: el.id,
|
|
927
|
+
isCorrectAnswer: index === idx ? !el.isCorrectAnswer : false
|
|
928
|
+
};
|
|
929
|
+
}));
|
|
930
|
+
};
|
|
931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", {
|
|
932
|
+
className: "flex flex-col justify-center items-center",
|
|
933
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", {
|
|
934
|
+
className: "flex items-center",
|
|
935
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", {
|
|
936
|
+
onChange: function(e) {
|
|
937
|
+
return onCheck(e);
|
|
938
|
+
},
|
|
939
|
+
value: index,
|
|
940
|
+
checked: !!value,
|
|
941
|
+
id: name,
|
|
942
|
+
name: name,
|
|
943
|
+
type: "checkbox",
|
|
944
|
+
className: "form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded ".concat(isLarge ? "h-5 w-5" : "h-4 w-4")
|
|
945
|
+
})
|
|
946
|
+
})
|
|
947
|
+
});
|
|
588
948
|
};
|
|
589
949
|
Checkbox.Multi = MultiChoiceCheckBox;
|
|
590
950
|
var Checkbox_default = Checkbox;
|
|
591
|
-
|
|
592
951
|
// src/Checkbox/RadioOption.tsx
|
|
593
952
|
var import_formik2 = require("formik");
|
|
594
953
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
595
|
-
var RadioOption = (
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
954
|
+
var RadioOption = function(param) {
|
|
955
|
+
var name = param.name, isLarge = param.isLarge, labelText = param.labelText, option = param.option, onSelect = param.onSelect;
|
|
956
|
+
var _ref = _sliced_to_array((0, import_formik2.useField)(name), 3), value = _ref[0].value, ref = _object_destructuring_empty(_ref[1]), setValue = _ref[2].setValue;
|
|
957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", {
|
|
958
|
+
className: "flex items-center",
|
|
959
|
+
children: [
|
|
960
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", {
|
|
961
|
+
onChange: function() {
|
|
962
|
+
setValue(option);
|
|
963
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect();
|
|
964
|
+
},
|
|
965
|
+
value: option,
|
|
966
|
+
id: option,
|
|
967
|
+
name: name,
|
|
968
|
+
type: "checkbox",
|
|
969
|
+
checked: value === option,
|
|
970
|
+
className: "form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded ".concat(isLarge ? "h-5 w-5" : "h-4 w-4")
|
|
971
|
+
}),
|
|
972
|
+
typeof labelText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", {
|
|
973
|
+
htmlFor: option,
|
|
974
|
+
className: "ml-2 block text-sm text-gray-900",
|
|
975
|
+
children: labelText
|
|
976
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", {
|
|
977
|
+
htmlFor: option,
|
|
978
|
+
children: labelText
|
|
979
|
+
})
|
|
980
|
+
]
|
|
981
|
+
});
|
|
615
982
|
};
|
|
616
983
|
var RadioOption_default = RadioOption;
|
|
617
|
-
|
|
618
984
|
// src/Common/BottomAlert.tsx
|
|
619
985
|
var import_react_dom2 = __toESM(require("react-dom"));
|
|
620
986
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
621
|
-
var BottomAlert = (
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
"div",
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
987
|
+
var BottomAlert = function(param) {
|
|
988
|
+
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;
|
|
989
|
+
var dismiss = function() {
|
|
990
|
+
onDismissed === null || onDismissed === void 0 ? void 0 : onDismissed();
|
|
991
|
+
};
|
|
992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", {
|
|
993
|
+
className: "top-0 left-0 fixed w-full h-screen flex justify-center",
|
|
994
|
+
style: {
|
|
995
|
+
background: isDark ? "rgba(0, 0, 0, 0.1)" : "rgba(255, 255, 255, 0.1)",
|
|
996
|
+
zIndex: 9999
|
|
997
|
+
},
|
|
998
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", {
|
|
999
|
+
className: "absolute top-0 w-full h-screen flex justify-center bg-gray-200/90 dark:bg-slate-800/50",
|
|
1000
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", {
|
|
1001
|
+
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",
|
|
1002
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", {
|
|
1003
|
+
style: {
|
|
1004
|
+
borderColor: borderColor || "#0ea5e9"
|
|
1005
|
+
},
|
|
1006
|
+
children: [
|
|
1007
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h3", {
|
|
1008
|
+
className: "font-semibold font-header text-gray-700 dark:text-gray-300 text-xl",
|
|
1009
|
+
children: title
|
|
1010
|
+
}),
|
|
1011
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", {
|
|
1012
|
+
className: "mt-2 text-lg",
|
|
1013
|
+
children: children
|
|
1014
|
+
}),
|
|
1015
|
+
setDontShowAgain ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", {
|
|
1016
|
+
className: "flex items-center space-x-1",
|
|
1017
|
+
children: [
|
|
1018
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("input", {
|
|
1019
|
+
onChange: function() {
|
|
1020
|
+
setDontShowAgain(function(s) {
|
|
1021
|
+
return !s;
|
|
1022
|
+
});
|
|
1023
|
+
},
|
|
1024
|
+
id: "show_again_check",
|
|
1025
|
+
checked: !!dontShowAgain,
|
|
1026
|
+
type: "checkbox",
|
|
1027
|
+
className: "form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded h-4 w-4"
|
|
1028
|
+
}),
|
|
1029
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", {
|
|
1030
|
+
htmlFor: "show_again_check",
|
|
1031
|
+
className: "dark:text-gray-200 text-gray-700",
|
|
1032
|
+
children: "Don't show again"
|
|
1033
|
+
})
|
|
1034
|
+
]
|
|
1035
|
+
}) : null,
|
|
1036
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", {
|
|
1037
|
+
className: "mt-4 flex items-center justify-end space-x-4 z-10",
|
|
1038
|
+
children: isSingleAction ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button_default, {
|
|
1039
|
+
type: "button",
|
|
1040
|
+
kind: buttonColor,
|
|
1041
|
+
onClick: function() {
|
|
1042
|
+
onConfirm(true);
|
|
1043
|
+
dismiss();
|
|
1044
|
+
},
|
|
1045
|
+
children: confirmText || "Okay"
|
|
1046
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", {
|
|
1047
|
+
className: "w-1/3 flex justify-end space-x-4",
|
|
1048
|
+
children: [
|
|
1049
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", {
|
|
1050
|
+
className: "w-full flex flex-col",
|
|
1051
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button_default, {
|
|
1052
|
+
type: "button",
|
|
1053
|
+
kind: "secondary",
|
|
1054
|
+
onClick: function() {
|
|
1055
|
+
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
1056
|
+
dismiss();
|
|
1057
|
+
},
|
|
1058
|
+
children: cancelText || "Cancel"
|
|
1059
|
+
})
|
|
1060
|
+
}),
|
|
1061
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", {
|
|
1062
|
+
className: "w-full flex flex-col",
|
|
1063
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button_default, {
|
|
1064
|
+
type: "button",
|
|
1065
|
+
kind: buttonColor,
|
|
1066
|
+
onClick: function() {
|
|
1067
|
+
onConfirm(true);
|
|
1068
|
+
dismiss();
|
|
1069
|
+
},
|
|
1070
|
+
children: confirmText || "Confirm"
|
|
1071
|
+
})
|
|
1072
|
+
})
|
|
1073
|
+
]
|
|
1074
|
+
})
|
|
1075
|
+
})
|
|
1076
|
+
]
|
|
1077
|
+
})
|
|
1078
|
+
})
|
|
1079
|
+
})
|
|
1080
|
+
});
|
|
691
1081
|
};
|
|
692
|
-
var BAWrapper = (props)
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(BottomAlert, __spreadValues({}, props)),
|
|
696
|
-
document.body
|
|
697
|
-
);
|
|
1082
|
+
var BAWrapper = function(props) {
|
|
1083
|
+
if (!props.isVisible) return null;
|
|
1084
|
+
return import_react_dom2.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(BottomAlert, _object_spread({}, props)), document.body);
|
|
698
1085
|
};
|
|
699
1086
|
var BottomAlert_default = BAWrapper;
|
|
700
|
-
|
|
701
1087
|
// src/Common/Tippy.tsx
|
|
702
1088
|
var import_react5 = require("react");
|
|
703
1089
|
var import_react6 = require("@floating-ui/react");
|
|
704
1090
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
705
|
-
var Tippy = (
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
}, [visible]);
|
|
713
|
-
const {
|
|
714
|
-
x,
|
|
715
|
-
y,
|
|
716
|
-
strategy,
|
|
717
|
-
refs,
|
|
718
|
-
context
|
|
719
|
-
} = (0, import_react6.useFloating)({
|
|
720
|
-
placement,
|
|
721
|
-
open: isOpen,
|
|
722
|
-
onOpenChange: setIsOpen,
|
|
723
|
-
middleware: [
|
|
724
|
-
(0, import_react6.offset)(8),
|
|
725
|
-
(0, import_react6.flip)(),
|
|
726
|
-
(0, import_react6.shift)(),
|
|
727
|
-
(0, import_react6.arrow)({ element: arrowRef })
|
|
728
|
-
]
|
|
729
|
-
});
|
|
730
|
-
const hover = (0, import_react6.useHover)(context, {
|
|
731
|
-
enabled: !disabled
|
|
732
|
-
});
|
|
733
|
-
const dismiss = (0, import_react6.useDismiss)(context);
|
|
734
|
-
const role = (0, import_react6.useRole)(context);
|
|
735
|
-
const { getReferenceProps, getFloatingProps } = (0, import_react6.useInteractions)([
|
|
736
|
-
hover,
|
|
737
|
-
dismiss,
|
|
738
|
-
role
|
|
739
|
-
]);
|
|
740
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
741
|
-
isOpen && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react6.FloatingPortal, { children: [
|
|
742
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
743
|
-
"div",
|
|
744
|
-
__spreadProps(__spreadValues({
|
|
745
|
-
ref: refs.setFloating,
|
|
746
|
-
className: `z-[9999] ${className || tippyClassname}`
|
|
747
|
-
}, getFloatingProps()), {
|
|
748
|
-
style: {
|
|
749
|
-
position: strategy,
|
|
750
|
-
top: y != null ? y : 0,
|
|
751
|
-
left: x != null ? x : 0,
|
|
752
|
-
width: "max-content"
|
|
753
|
-
},
|
|
754
|
-
children: content
|
|
755
|
-
})
|
|
756
|
-
),
|
|
757
|
-
useArrow && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
758
|
-
import_react6.FloatingArrow,
|
|
759
|
-
{
|
|
760
|
-
ref: arrowRef,
|
|
761
|
-
context,
|
|
762
|
-
className: "fill-gray-900",
|
|
763
|
-
tipRadius: 2
|
|
1091
|
+
var Tippy = function(param) {
|
|
1092
|
+
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;
|
|
1093
|
+
var _ref = _sliced_to_array((0, import_react5.useState)(false), 2), isOpen = _ref[0], setIsOpen = _ref[1];
|
|
1094
|
+
var arrowRef = (0, import_react5.useRef)(null);
|
|
1095
|
+
(0, import_react5.useEffect)(function() {
|
|
1096
|
+
if (visible) {
|
|
1097
|
+
setIsOpen(true);
|
|
764
1098
|
}
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
1099
|
+
}, [
|
|
1100
|
+
visible
|
|
1101
|
+
]);
|
|
1102
|
+
var _ref1 = (0, import_react6.useFloating)({
|
|
1103
|
+
placement: placement,
|
|
1104
|
+
open: isOpen,
|
|
1105
|
+
onOpenChange: setIsOpen,
|
|
1106
|
+
middleware: [
|
|
1107
|
+
(0, import_react6.offset)(8),
|
|
1108
|
+
(0, import_react6.flip)(),
|
|
1109
|
+
(0, import_react6.shift)(),
|
|
1110
|
+
(0, import_react6.arrow)({
|
|
1111
|
+
element: arrowRef
|
|
1112
|
+
})
|
|
1113
|
+
]
|
|
1114
|
+
}), x = _ref1.x, y = _ref1.y, strategy = _ref1.strategy, refs = _ref1.refs, context = _ref1.context;
|
|
1115
|
+
var hover = (0, import_react6.useHover)(context, {
|
|
1116
|
+
enabled: !disabled
|
|
1117
|
+
});
|
|
1118
|
+
var dismiss = (0, import_react6.useDismiss)(context);
|
|
1119
|
+
var role = (0, import_react6.useRole)(context);
|
|
1120
|
+
var _ref2 = (0, import_react6.useInteractions)([
|
|
1121
|
+
hover,
|
|
1122
|
+
dismiss,
|
|
1123
|
+
role
|
|
1124
|
+
]), getReferenceProps = _ref2.getReferenceProps, getFloatingProps = _ref2.getFloatingProps;
|
|
1125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, {
|
|
1126
|
+
children: [
|
|
1127
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react6.FloatingPortal, {
|
|
1128
|
+
children: [
|
|
1129
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", _object_spread_props(_object_spread({
|
|
1130
|
+
ref: refs.setFloating,
|
|
1131
|
+
className: "z-[9999] ".concat(className || tippyClassname)
|
|
1132
|
+
}, getFloatingProps()), {
|
|
1133
|
+
style: {
|
|
1134
|
+
position: strategy,
|
|
1135
|
+
top: y !== null && y !== void 0 ? y : 0,
|
|
1136
|
+
left: x !== null && x !== void 0 ? x : 0,
|
|
1137
|
+
width: "max-content"
|
|
1138
|
+
},
|
|
1139
|
+
children: content
|
|
1140
|
+
})),
|
|
1141
|
+
useArrow && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react6.FloatingArrow, {
|
|
1142
|
+
ref: arrowRef,
|
|
1143
|
+
context: context,
|
|
1144
|
+
className: "fill-gray-900",
|
|
1145
|
+
tipRadius: 2
|
|
1146
|
+
})
|
|
1147
|
+
]
|
|
1148
|
+
}),
|
|
1149
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", _object_spread_props(_object_spread({
|
|
1150
|
+
ref: refs.setReference
|
|
1151
|
+
}, getReferenceProps()), {
|
|
1152
|
+
className: wrapperClassname,
|
|
1153
|
+
children: children
|
|
1154
|
+
}))
|
|
1155
|
+
]
|
|
1156
|
+
});
|
|
769
1157
|
};
|
|
770
1158
|
var Tippy_default = Tippy;
|
|
771
|
-
|
|
772
1159
|
// src/Common/IconInfo.tsx
|
|
773
1160
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
774
|
-
var IconInfo = (
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
1161
|
+
var IconInfo = function(param) {
|
|
1162
|
+
var content = param.content, icon = param.icon, number = param.number, color = param.color;
|
|
1163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", {
|
|
1164
|
+
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",
|
|
1165
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Tippy_default, {
|
|
1166
|
+
className: tippyClassname,
|
|
1167
|
+
content: content,
|
|
1168
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", {
|
|
1169
|
+
className: "relative",
|
|
1170
|
+
children: [
|
|
1171
|
+
icon,
|
|
1172
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", {
|
|
1173
|
+
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"),
|
|
1174
|
+
children: number
|
|
1175
|
+
})
|
|
1176
|
+
]
|
|
1177
|
+
})
|
|
1178
|
+
})
|
|
1179
|
+
});
|
|
786
1180
|
};
|
|
787
1181
|
var IconInfo_default = IconInfo;
|
|
788
|
-
|
|
789
1182
|
// src/Common/Modal.tsx
|
|
790
1183
|
var import_link = __toESM(require("next/link"));
|
|
791
|
-
|
|
792
1184
|
// src/Icons/XIcon.tsx
|
|
793
1185
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
794
|
-
var XIcon = (
|
|
795
|
-
|
|
1186
|
+
var XIcon = function(param) {
|
|
1187
|
+
var className = param.className;
|
|
1188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("svg", {
|
|
1189
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1190
|
+
className: className || "h-5 w-5",
|
|
1191
|
+
viewBox: "0 0 20 20",
|
|
1192
|
+
fill: "currentColor",
|
|
1193
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", {
|
|
1194
|
+
fillRule: "evenodd",
|
|
1195
|
+
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",
|
|
1196
|
+
clipRule: "evenodd"
|
|
1197
|
+
})
|
|
1198
|
+
});
|
|
796
1199
|
};
|
|
797
1200
|
var XIcon_default = XIcon;
|
|
798
|
-
|
|
799
1201
|
// src/Common/Modal.tsx
|
|
800
1202
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
801
|
-
var Modal = (
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
1203
|
+
var Modal = function(_param) {
|
|
1204
|
+
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, [
|
|
1205
|
+
"visible",
|
|
1206
|
+
"children",
|
|
1207
|
+
"fullscreen",
|
|
1208
|
+
"displayDark",
|
|
1209
|
+
"dismissLink",
|
|
1210
|
+
"bgOpacity",
|
|
1211
|
+
"onDismissed",
|
|
1212
|
+
"dismissable",
|
|
1213
|
+
"dismissOnBackdropClick",
|
|
1214
|
+
"style"
|
|
1215
|
+
]);
|
|
1216
|
+
if (!visible) return null;
|
|
1217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Overlay_default, _object_spread_props(_object_spread({
|
|
1218
|
+
visible: visible,
|
|
1219
|
+
onClick: dismissOnBackdropClick ? onDismissed : void 0,
|
|
1220
|
+
isDark: displayDark,
|
|
1221
|
+
withContainer: true
|
|
1222
|
+
}, props), {
|
|
1223
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", {
|
|
1224
|
+
className: "".concat(displayDark && "dark", " bg-slate-900/20 fixed inset-0 flex items-center justify-center"),
|
|
1225
|
+
style: {
|
|
1226
|
+
zIndex: 1e4
|
|
1227
|
+
},
|
|
1228
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", {
|
|
1229
|
+
className: [
|
|
1230
|
+
"relative mx-1 w-full md:mx-auto md:w-3/4 lg:w-1/2",
|
|
1231
|
+
fullscreen && "md:w-5/6 lg:w-5/6"
|
|
1232
|
+
].join(" "),
|
|
1233
|
+
children: [
|
|
1234
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, {
|
|
1235
|
+
children: dismissLink ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_link.default, {
|
|
1236
|
+
href: dismissLink,
|
|
1237
|
+
scroll: false,
|
|
1238
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", {
|
|
1239
|
+
onClick: onDismissed,
|
|
1240
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(XIcon_default, {
|
|
1241
|
+
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"
|
|
1242
|
+
})
|
|
1243
|
+
})
|
|
1244
|
+
}) : dismissable ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", {
|
|
1245
|
+
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",
|
|
1246
|
+
type: "button",
|
|
1247
|
+
onClick: onDismissed,
|
|
1248
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(XIcon_default, {
|
|
1249
|
+
className: "h-5 w-5"
|
|
1250
|
+
})
|
|
1251
|
+
}) : null
|
|
1252
|
+
}),
|
|
1253
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", {
|
|
1254
|
+
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",
|
|
1255
|
+
onClick: function(e) {
|
|
1256
|
+
return e.stopPropagation();
|
|
1257
|
+
},
|
|
1258
|
+
style: _object_spread({
|
|
1259
|
+
maxHeight: "calc(100vh - 6rem)"
|
|
1260
|
+
}, style),
|
|
1261
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", {
|
|
1262
|
+
className: "p-4 sm:p-10",
|
|
1263
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", {
|
|
1264
|
+
className: "mt-8 sm:mt-0",
|
|
1265
|
+
children: children
|
|
1266
|
+
})
|
|
1267
|
+
})
|
|
1268
|
+
})
|
|
1269
|
+
]
|
|
1270
|
+
})
|
|
1271
|
+
})
|
|
1272
|
+
}));
|
|
843
1273
|
};
|
|
844
1274
|
var Modal_default = Modal;
|
|
845
|
-
|
|
846
1275
|
// src/Common/NoticeBox.tsx
|
|
847
1276
|
var import_react7 = require("react");
|
|
848
1277
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
849
|
-
var NoticeBox = (
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
1278
|
+
var NoticeBox = function(param) {
|
|
1279
|
+
var children = param.children, type = param.type, isDismissible = param.isDismissible, isVisible = param.isVisible, onDismiss = param.onDismiss;
|
|
1280
|
+
var _ref = _sliced_to_array((0, import_react7.useState)(true), 2), visible = _ref[0], setVisible = _ref[1];
|
|
1281
|
+
var styles = (0, import_react7.useMemo)(function() {
|
|
1282
|
+
var base = "relative text-base rounded-md p-2 ";
|
|
1283
|
+
if (!visible) return "hidden";
|
|
1284
|
+
switch(type){
|
|
1285
|
+
case "error":
|
|
1286
|
+
return base.concat("w-full absolute top-50 text-red-500 border-red-400 border-2");
|
|
1287
|
+
case "info":
|
|
1288
|
+
return base.concat("text-green-800 border-green-400 bg-green-100");
|
|
1289
|
+
case "warning":
|
|
1290
|
+
return base.concat("text-orange-500 border border-orange-400 bg-white");
|
|
1291
|
+
default:
|
|
1292
|
+
return base.concat("w-full absolute top-0 text-red-500 border-red-500 bg-white p-3 border-2");
|
|
1293
|
+
}
|
|
1294
|
+
}, [
|
|
1295
|
+
type,
|
|
1296
|
+
visible
|
|
1297
|
+
]);
|
|
1298
|
+
(0, import_react7.useEffect)(function() {
|
|
1299
|
+
setVisible(isVisible);
|
|
1300
|
+
}, [
|
|
1301
|
+
isVisible
|
|
1302
|
+
]);
|
|
1303
|
+
if (!isVisible) return null;
|
|
1304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", {
|
|
1305
|
+
style: {
|
|
1306
|
+
zIndex: 100
|
|
1307
|
+
},
|
|
1308
|
+
className: styles,
|
|
1309
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", {
|
|
1310
|
+
className: "relative",
|
|
1311
|
+
children: [
|
|
1312
|
+
isDismissible && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", {
|
|
1313
|
+
type: "button",
|
|
1314
|
+
onClick: function() {
|
|
1315
|
+
setVisible(function(s) {
|
|
1316
|
+
return !s;
|
|
1317
|
+
});
|
|
1318
|
+
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
1319
|
+
},
|
|
1320
|
+
className: "absolute bottom-1 right-1 transition-colors cursor-pointer duration-75 hover:text-blue-500",
|
|
1321
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(XIcon_default, {
|
|
1322
|
+
className: "h-5 w-5"
|
|
1323
|
+
})
|
|
1324
|
+
}),
|
|
1325
|
+
children
|
|
1326
|
+
]
|
|
1327
|
+
})
|
|
1328
|
+
});
|
|
893
1329
|
};
|
|
894
1330
|
var NoticeBox_default = NoticeBox;
|
|
895
|
-
|
|
896
1331
|
// src/Icons/StarIcon.tsx
|
|
897
1332
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
898
|
-
var StarIcon = (
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
1333
|
+
var StarIcon = function(param) {
|
|
1334
|
+
var className = param.className, percentage = param.percentage, color = param.color;
|
|
1335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("svg", {
|
|
1336
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1337
|
+
className: className || "h-5 w-5",
|
|
1338
|
+
viewBox: "0 0 20 20",
|
|
1339
|
+
fill: "currentColor",
|
|
1340
|
+
children: [
|
|
1341
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("defs", {
|
|
1342
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("linearGradient", {
|
|
1343
|
+
id: "grad",
|
|
1344
|
+
children: [
|
|
1345
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("stop", {
|
|
1346
|
+
offset: "".concat((percentage || 0.5) * 100, "%"),
|
|
1347
|
+
"stop-color": color ? color : "#4b5563"
|
|
1348
|
+
}),
|
|
1349
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("stop", {
|
|
1350
|
+
offset: "".concat(100 - (percentage || 0.5) * 100, "%"),
|
|
1351
|
+
"stop-color": "white"
|
|
1352
|
+
})
|
|
1353
|
+
]
|
|
1354
|
+
})
|
|
1355
|
+
}),
|
|
1356
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", {
|
|
1357
|
+
fill: "url(#grad)",
|
|
1358
|
+
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"
|
|
1359
|
+
})
|
|
1360
|
+
]
|
|
1361
|
+
});
|
|
906
1362
|
};
|
|
907
1363
|
var StarIcon_default = StarIcon;
|
|
908
|
-
|
|
909
1364
|
// src/Icons/StarIconSolid.tsx
|
|
910
1365
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
911
|
-
var StartIconSolid = (
|
|
912
|
-
|
|
1366
|
+
var StartIconSolid = function(param) {
|
|
1367
|
+
var className = param.className;
|
|
1368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("svg", {
|
|
1369
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1370
|
+
className: className || "h-5 w-5",
|
|
1371
|
+
viewBox: "0 0 20 20",
|
|
1372
|
+
fill: "currentColor",
|
|
1373
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", {
|
|
1374
|
+
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"
|
|
1375
|
+
})
|
|
1376
|
+
});
|
|
913
1377
|
};
|
|
914
1378
|
var StarIconSolid_default = StartIconSolid;
|
|
915
|
-
|
|
916
1379
|
// src/Common/RatingStars.tsx
|
|
917
1380
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
918
|
-
var RatingStars = (
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
1381
|
+
var RatingStars = function(param) {
|
|
1382
|
+
var avgRating = param.avgRating, large = param.large;
|
|
1383
|
+
var icons = [
|
|
1384
|
+
1,
|
|
1385
|
+
2,
|
|
1386
|
+
3,
|
|
1387
|
+
4,
|
|
1388
|
+
5
|
|
1389
|
+
].map(function(el) {
|
|
1390
|
+
if (avgRating === 0) {
|
|
1391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StarIconSolid_default, {
|
|
1392
|
+
className: "".concat(large ? "h-5 w-5" : "h-3 w-3", " text-gray-200 dark:text-gray-400")
|
|
1393
|
+
}, "rating_star_".concat(el));
|
|
1394
|
+
}
|
|
1395
|
+
if (Number.isInteger(avgRating)) {
|
|
1396
|
+
if (el <= avgRating) {
|
|
1397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StarIconSolid_default, {
|
|
1398
|
+
className: "".concat(large ? "h-5 w-5" : "h-3 w-3", " text-blue-500")
|
|
1399
|
+
}, "rating_star_".concat(el));
|
|
1400
|
+
}
|
|
1401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StarIconSolid_default, {
|
|
1402
|
+
className: "".concat(large ? "h-5 w-5" : "h-3 w-3", " text-gray-200 dark:text-gray-400")
|
|
1403
|
+
}, "rating_star_".concat(el));
|
|
1404
|
+
}
|
|
1405
|
+
var whole = Math.floor(avgRating);
|
|
1406
|
+
if (el <= whole) {
|
|
1407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StarIconSolid_default, {
|
|
1408
|
+
className: "".concat(large ? "h-5 w-5" : "h-3 w-3", " text-blue-500")
|
|
1409
|
+
}, "rating_star_".concat(el));
|
|
1410
|
+
}
|
|
1411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StarIcon_default, {
|
|
1412
|
+
percentage: avgRating - whole,
|
|
1413
|
+
color: "#00b4d8",
|
|
1414
|
+
className: "".concat(large ? "h-5 w-5" : "h-3 w-3")
|
|
1415
|
+
}, "rating_star_".concat(el));
|
|
1416
|
+
});
|
|
1417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Tippy_default, {
|
|
1418
|
+
content: avgRating === 0 ? "No ratings" : "Average Rating " + avgRating,
|
|
1419
|
+
className: "bg-gray-800 opacity-90 text-white rounded-md px-2 py-1 cursor-pointer h-fit",
|
|
1420
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", {
|
|
1421
|
+
className: "flex items-center space-x-0 justify-start",
|
|
1422
|
+
children: icons
|
|
1423
|
+
})
|
|
1424
|
+
});
|
|
943
1425
|
};
|
|
944
1426
|
var RatingStars_default = RatingStars;
|
|
945
|
-
|
|
946
1427
|
// src/Common/Slider.tsx
|
|
947
1428
|
var import_react8 = require("react");
|
|
948
1429
|
var import_use_debounce = require("use-debounce");
|
|
949
1430
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
950
|
-
var Slider = (
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
"input",
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
}
|
|
965
|
-
);
|
|
1431
|
+
var Slider = function(param) {
|
|
1432
|
+
var min = param.min, max = param.max, step = param.step, value = param.value, onChange = param.onChange;
|
|
1433
|
+
var handleChange = function(event) {
|
|
1434
|
+
onChange(parseFloat(event.target.value));
|
|
1435
|
+
};
|
|
1436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", {
|
|
1437
|
+
type: "range",
|
|
1438
|
+
min: min,
|
|
1439
|
+
max: max,
|
|
1440
|
+
step: step,
|
|
1441
|
+
value: value,
|
|
1442
|
+
onChange: handleChange,
|
|
1443
|
+
className: "w-full h-2 rounded-lg range-input"
|
|
1444
|
+
});
|
|
966
1445
|
};
|
|
967
|
-
var DebouncedSlider = (
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
1446
|
+
var DebouncedSlider = function(param) {
|
|
1447
|
+
var min = param.min, max = param.max, handleUpdate = param.handleUpdate, initialValue = param.initialValue;
|
|
1448
|
+
var _ref = _sliced_to_array((0, import_react8.useState)(initialValue), 2), value = _ref[0], setValue = _ref[1];
|
|
1449
|
+
var debouncedUpdate = (0, import_use_debounce.useDebouncedCallback)(function(v) {
|
|
1450
|
+
handleUpdate(v);
|
|
1451
|
+
}, 120, {
|
|
1452
|
+
trailing: true,
|
|
1453
|
+
leading: false
|
|
1454
|
+
});
|
|
1455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Slider, {
|
|
1456
|
+
min: min,
|
|
1457
|
+
max: max,
|
|
1458
|
+
step: 1,
|
|
1459
|
+
value: value,
|
|
1460
|
+
onChange: function(v) {
|
|
1461
|
+
setValue(v);
|
|
1462
|
+
debouncedUpdate(v);
|
|
1463
|
+
}
|
|
1464
|
+
});
|
|
985
1465
|
};
|
|
986
1466
|
Slider.Debounced = DebouncedSlider;
|
|
987
1467
|
var Slider_default = Slider;
|
|
988
|
-
|
|
989
1468
|
// src/Common/ToggleSwitch.tsx
|
|
990
1469
|
var import_formik3 = require("formik");
|
|
991
1470
|
var import_framer_motion3 = require("framer-motion");
|
|
992
1471
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
993
|
-
var Formik = (
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1472
|
+
var Formik = function(param) {
|
|
1473
|
+
var label = param.label, name = param.name;
|
|
1474
|
+
var _ref = _sliced_to_array((0, import_formik3.useField)(name), 3), value = _ref[0].value, setValue = _ref[2].setValue;
|
|
1475
|
+
var handleChange = function(e) {
|
|
1476
|
+
setValue(e.target.checked);
|
|
1477
|
+
};
|
|
1478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", {
|
|
1479
|
+
className: "flex items-center space-x-2 cursor-pointer",
|
|
1480
|
+
children: [
|
|
1481
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", {
|
|
1482
|
+
className: "relative",
|
|
1483
|
+
children: [
|
|
1484
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", {
|
|
1485
|
+
type: "checkbox",
|
|
1486
|
+
className: "opacity-0 absolute",
|
|
1487
|
+
checked: value,
|
|
1488
|
+
onChange: handleChange
|
|
1489
|
+
}),
|
|
1490
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", {
|
|
1491
|
+
className: "w-10 h-6 rounded-full p-[4px] transition-colors duration-300 ".concat(value ? "bg-[#00b4d8]" : "bg-[#64748b]"),
|
|
1492
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_framer_motion3.motion.div, {
|
|
1493
|
+
className: "w-4 h-4 bg-white rounded-full absolute top-1",
|
|
1494
|
+
initial: false,
|
|
1495
|
+
animate: {
|
|
1496
|
+
x: value ? 16 : 0
|
|
1497
|
+
},
|
|
1498
|
+
transition: {
|
|
1499
|
+
type: "spring",
|
|
1500
|
+
stiffness: 500,
|
|
1501
|
+
damping: 30
|
|
1502
|
+
}
|
|
1503
|
+
})
|
|
1504
|
+
})
|
|
1505
|
+
]
|
|
1506
|
+
}),
|
|
1507
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", {
|
|
1508
|
+
className: "text-sm font-medium text-gray-800 dark:text-gray-200",
|
|
1509
|
+
children: label
|
|
1510
|
+
})
|
|
1511
|
+
]
|
|
1512
|
+
});
|
|
1023
1513
|
};
|
|
1024
|
-
var ToggleSwitch = (
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1514
|
+
var ToggleSwitch = function(param) {
|
|
1515
|
+
var label = param.label, onChange = param.onChange, value = param.value;
|
|
1516
|
+
var handleChange = function(e) {
|
|
1517
|
+
onChange(e.target.checked);
|
|
1518
|
+
};
|
|
1519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", {
|
|
1520
|
+
className: "flex items-center space-x-2 cursor-pointer",
|
|
1521
|
+
children: [
|
|
1522
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", {
|
|
1523
|
+
className: "relative",
|
|
1524
|
+
children: [
|
|
1525
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", {
|
|
1526
|
+
type: "checkbox",
|
|
1527
|
+
className: "opacity-0 absolute",
|
|
1528
|
+
checked: value,
|
|
1529
|
+
onChange: handleChange
|
|
1530
|
+
}),
|
|
1531
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", {
|
|
1532
|
+
className: "w-10 h-6 rounded-full p-[4px] transition-colors duration-300 ".concat(value ? "bg-[#00b4d8]" : "bg-[#64748b]"),
|
|
1533
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_framer_motion3.motion.div, {
|
|
1534
|
+
className: "w-4 h-4 bg-white rounded-full absolute top-1",
|
|
1535
|
+
initial: false,
|
|
1536
|
+
animate: {
|
|
1537
|
+
x: value ? 16 : 0
|
|
1538
|
+
},
|
|
1539
|
+
transition: {
|
|
1540
|
+
type: "spring",
|
|
1541
|
+
stiffness: 500,
|
|
1542
|
+
damping: 30
|
|
1543
|
+
}
|
|
1544
|
+
})
|
|
1545
|
+
})
|
|
1546
|
+
]
|
|
1547
|
+
}),
|
|
1548
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", {
|
|
1549
|
+
className: "text-sm font-medium text-gray-800 dark:text-gray-200",
|
|
1550
|
+
children: label
|
|
1551
|
+
})
|
|
1552
|
+
]
|
|
1553
|
+
});
|
|
1053
1554
|
};
|
|
1054
1555
|
ToggleSwitch.Formik = Formik;
|
|
1055
1556
|
var ToggleSwitch_default = ToggleSwitch;
|
|
1056
|
-
|
|
1057
1557
|
// src/Common/UserContentSwitcher.tsx
|
|
1058
1558
|
var import_framer_motion4 = require("framer-motion");
|
|
1059
|
-
|
|
1060
1559
|
// src/Icons/PlusCircleIcon.tsx
|
|
1061
1560
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1062
|
-
var PlusCircleIcon = (
|
|
1063
|
-
|
|
1561
|
+
var PlusCircleIcon = function(param) {
|
|
1562
|
+
var className = param.className;
|
|
1563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("svg", {
|
|
1564
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1565
|
+
className: className || "h-5 w-5",
|
|
1566
|
+
fill: "none",
|
|
1567
|
+
viewBox: "0 0 24 24",
|
|
1568
|
+
stroke: "currentColor",
|
|
1569
|
+
strokeWidth: 2,
|
|
1570
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("path", {
|
|
1571
|
+
strokeLinecap: "round",
|
|
1572
|
+
strokeLinejoin: "round",
|
|
1573
|
+
d: "M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1574
|
+
})
|
|
1575
|
+
});
|
|
1064
1576
|
};
|
|
1065
1577
|
var PlusCircleIcon_default = PlusCircleIcon;
|
|
1066
|
-
|
|
1067
1578
|
// src/Icons/ArrowCircleRight.tsx
|
|
1068
1579
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1069
|
-
var StartIconSolid2 = (
|
|
1070
|
-
|
|
1580
|
+
var StartIconSolid2 = function(param) {
|
|
1581
|
+
var className = param.className;
|
|
1582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("svg", {
|
|
1583
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1584
|
+
className: className || "h-5 w-5",
|
|
1585
|
+
fill: "none",
|
|
1586
|
+
viewBox: "0 0 24 24",
|
|
1587
|
+
stroke: "currentColor",
|
|
1588
|
+
strokeWidth: 2,
|
|
1589
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("path", {
|
|
1590
|
+
strokeLinecap: "round",
|
|
1591
|
+
strokeLinejoin: "round",
|
|
1592
|
+
d: "M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1593
|
+
})
|
|
1594
|
+
});
|
|
1071
1595
|
};
|
|
1072
1596
|
var ArrowCircleRight_default = StartIconSolid2;
|
|
1073
|
-
|
|
1074
1597
|
// src/Common/UserContentSwitcher.tsx
|
|
1075
1598
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1076
|
-
var UserContentSwitcher = (
|
|
1077
|
-
|
|
1078
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.
|
|
1079
|
-
|
|
1080
|
-
{
|
|
1081
|
-
className: "absolute w-1/2 h-11 rounded-md bg-white dark:bg-slate-600",
|
|
1082
|
-
animate: {
|
|
1083
|
-
x: galleryMode === title1.toLowerCase() ? "1%" : "99%"
|
|
1084
|
-
},
|
|
1085
|
-
transition: {
|
|
1086
|
-
type: "spring",
|
|
1087
|
-
damping: 20,
|
|
1088
|
-
stiffness: 200
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
),
|
|
1092
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1093
|
-
"button",
|
|
1094
|
-
{
|
|
1095
|
-
onClick: () => setGalleryMode(title1.toLowerCase()),
|
|
1096
|
-
className: "py-2 flex flex-row w-1/2 justify-center items-center gap-1 z-10",
|
|
1097
|
-
children: [
|
|
1098
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1099
|
-
"span",
|
|
1100
|
-
{
|
|
1101
|
-
className: `truncate ${galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`,
|
|
1102
|
-
children: title1.toLocaleUpperCase()
|
|
1103
|
-
}
|
|
1104
|
-
),
|
|
1105
|
-
Icon1 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1106
|
-
Icon1,
|
|
1107
|
-
{
|
|
1108
|
-
className: `h-5 w-5 ${galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`
|
|
1109
|
-
}
|
|
1110
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1111
|
-
PlusCircleIcon_default,
|
|
1112
|
-
{
|
|
1113
|
-
className: `h-5 w-5 ${galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`
|
|
1114
|
-
}
|
|
1115
|
-
)
|
|
1116
|
-
]
|
|
1117
|
-
}
|
|
1118
|
-
),
|
|
1119
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1120
|
-
"button",
|
|
1121
|
-
{
|
|
1122
|
-
onClick: () => setGalleryMode(title2.toLowerCase()),
|
|
1123
|
-
className: "py-2 flex flex-row w-1/2 justify-center items-center gap-1 z-10",
|
|
1599
|
+
var UserContentSwitcher = function(param) {
|
|
1600
|
+
var Icon1 = param.icon1, Icon2 = param.icon2, setGalleryMode = param.setGalleryMode, galleryMode = param.galleryMode, title1 = param.title1, title2 = param.title2;
|
|
1601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", {
|
|
1602
|
+
className: "relative flex flex-row items-center my-2 bg-slate-100 dark:bg-slate-900 w-full h-14 rounded-lg",
|
|
1124
1603
|
children: [
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1604
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_framer_motion4.motion.div, {
|
|
1605
|
+
className: "absolute w-1/2 h-11 rounded-md bg-white dark:bg-slate-600",
|
|
1606
|
+
animate: {
|
|
1607
|
+
x: galleryMode === title1.toLowerCase() ? "1%" : "99%"
|
|
1608
|
+
},
|
|
1609
|
+
transition: {
|
|
1610
|
+
type: "spring",
|
|
1611
|
+
damping: 20,
|
|
1612
|
+
stiffness: 200
|
|
1613
|
+
}
|
|
1614
|
+
}),
|
|
1615
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("button", {
|
|
1616
|
+
onClick: function() {
|
|
1617
|
+
return setGalleryMode(title1.toLowerCase());
|
|
1618
|
+
},
|
|
1619
|
+
className: "py-2 flex flex-row w-1/2 justify-center items-center gap-1 z-10",
|
|
1620
|
+
children: [
|
|
1621
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", {
|
|
1622
|
+
className: "truncate ".concat(galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"),
|
|
1623
|
+
children: title1.toLocaleUpperCase()
|
|
1624
|
+
}),
|
|
1625
|
+
Icon1 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon1, {
|
|
1626
|
+
className: "h-5 w-5 ".concat(galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90")
|
|
1627
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PlusCircleIcon_default, {
|
|
1628
|
+
className: "h-5 w-5 ".concat(galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90")
|
|
1629
|
+
})
|
|
1630
|
+
]
|
|
1631
|
+
}),
|
|
1632
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("button", {
|
|
1633
|
+
onClick: function() {
|
|
1634
|
+
return setGalleryMode(title2.toLowerCase());
|
|
1635
|
+
},
|
|
1636
|
+
className: "py-2 flex flex-row w-1/2 justify-center items-center gap-1 z-10",
|
|
1637
|
+
children: [
|
|
1638
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", {
|
|
1639
|
+
className: "truncate ".concat(galleryMode === title2.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"),
|
|
1640
|
+
children: title2.toLocaleUpperCase()
|
|
1641
|
+
}),
|
|
1642
|
+
Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon2, {
|
|
1643
|
+
className: "h-5 w-5 ".concat(galleryMode === title2.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90")
|
|
1644
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ArrowCircleRight_default, {
|
|
1645
|
+
className: "h-5 w-5 ".concat(galleryMode === title2.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90")
|
|
1646
|
+
})
|
|
1647
|
+
]
|
|
1648
|
+
})
|
|
1143
1649
|
]
|
|
1144
|
-
|
|
1145
|
-
)
|
|
1146
|
-
] });
|
|
1650
|
+
});
|
|
1147
1651
|
};
|
|
1148
1652
|
var UserContentSwitcher_default = UserContentSwitcher;
|
|
1149
|
-
|
|
1150
1653
|
// src/ProgressBar/ProgressBarSimple.tsx
|
|
1151
1654
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1152
|
-
var ProgressBarSimple = (
|
|
1153
|
-
|
|
1154
|
-
"div",
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
}
|
|
1175
|
-
) });
|
|
1655
|
+
var ProgressBarSimple = function(param) {
|
|
1656
|
+
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;
|
|
1657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", {
|
|
1658
|
+
className: "w-full",
|
|
1659
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", {
|
|
1660
|
+
className: "w-full overflow-hidden transition-all duration-150 ease-in-out",
|
|
1661
|
+
style: {
|
|
1662
|
+
backgroundColor: backgroundColor,
|
|
1663
|
+
height: "".concat(height, "px"),
|
|
1664
|
+
borderRadius: "".concat(height / 2, "px")
|
|
1665
|
+
},
|
|
1666
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", {
|
|
1667
|
+
className: "transition-all duration-150 ease-in-out",
|
|
1668
|
+
style: {
|
|
1669
|
+
width: "".concat(progress, "%"),
|
|
1670
|
+
backgroundColor: color,
|
|
1671
|
+
height: "".concat(height, "px"),
|
|
1672
|
+
borderRadius: "".concat(height / 2, "px")
|
|
1673
|
+
}
|
|
1674
|
+
})
|
|
1675
|
+
})
|
|
1676
|
+
});
|
|
1176
1677
|
};
|
|
1177
1678
|
var ProgressBarSimple_default = ProgressBarSimple;
|
|
1178
|
-
|
|
1179
1679
|
// src/ProgressBar/ProgressBar.tsx
|
|
1180
1680
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1181
|
-
var ProgressBar = (
|
|
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
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1681
|
+
var ProgressBar = function(param) {
|
|
1682
|
+
var progress = param.progress;
|
|
1683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
|
|
1684
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
|
|
1685
|
+
className: "-mt-2 mb-6",
|
|
1686
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
|
|
1687
|
+
className: "bg-gray-100 rounded-full h-2",
|
|
1688
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
|
|
1689
|
+
className: "rounded-full h-2 ".concat(progress === 100 ? "bg-green-400" : "bg-gray-100"),
|
|
1690
|
+
style: {
|
|
1691
|
+
width: "".concat(progress, "%"),
|
|
1692
|
+
minWidth: "100%",
|
|
1693
|
+
position: "absolute"
|
|
1694
|
+
}
|
|
1695
|
+
})
|
|
1696
|
+
})
|
|
1697
|
+
})
|
|
1698
|
+
});
|
|
1699
|
+
};
|
|
1700
|
+
var ProgressStepBar = function(param) {
|
|
1701
|
+
var steps = param.steps, stepIndex = param.stepIndex, onStepClick = param.onStepClick, color = param.color;
|
|
1702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
|
|
1703
|
+
className: "flex w-full items-center space-x-0.5 -mt-1 overflow-hidden",
|
|
1704
|
+
children: steps.map(function(el, i) {
|
|
1705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
|
|
1706
|
+
className: "flex-1 relative",
|
|
1707
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Tippy_default, {
|
|
1708
|
+
content: el.label,
|
|
1709
|
+
className: tippyClassname,
|
|
1710
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
|
|
1711
|
+
className: "mb-4",
|
|
1712
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
|
|
1713
|
+
onClick: function() {
|
|
1714
|
+
return onStepClick === null || onStepClick === void 0 ? void 0 : onStepClick(i);
|
|
1715
|
+
},
|
|
1716
|
+
className: "cursor-pointer bg-gray-100 rounded-full h-2 overflow-hidden",
|
|
1717
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
|
|
1718
|
+
className: "cursor-pointer rounded-full h-2 ".concat(stepIndex >= i ? "bg-green-400" : "bg-gray-100"),
|
|
1719
|
+
style: {
|
|
1720
|
+
width: "".concat(stepIndex >= i ? 100 : 0, "%"),
|
|
1721
|
+
transition: "width 0.3s ease"
|
|
1722
|
+
}
|
|
1723
|
+
})
|
|
1724
|
+
})
|
|
1725
|
+
})
|
|
1726
|
+
})
|
|
1727
|
+
}, "index_progress_".concat(el.label));
|
|
1728
|
+
})
|
|
1729
|
+
});
|
|
1219
1730
|
};
|
|
1220
1731
|
ProgressBar.Step = ProgressStepBar;
|
|
1221
1732
|
var ProgressBar_default = ProgressBar;
|
|
1222
|
-
|
|
1223
1733
|
// src/ProgressBar/CircleProgress.tsx
|
|
1224
1734
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1225
|
-
var CircleProgress = (
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
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
|
-
|
|
1735
|
+
var CircleProgress = function(param) {
|
|
1736
|
+
var twColor = param.twColor, percentage = param.percentage, radius = param.radius, fill = param.fill, strokeWidth = param.strokeWidth;
|
|
1737
|
+
var r = radius;
|
|
1738
|
+
var cx = "50%";
|
|
1739
|
+
var cy = "50%";
|
|
1740
|
+
var w = Math.round(radius / 16);
|
|
1741
|
+
var strokeWidthCalc = strokeWidth ? strokeWidth : w < 8 ? 8 : w;
|
|
1742
|
+
var size = radius * 2 + strokeWidthCalc;
|
|
1743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", {
|
|
1744
|
+
style: {
|
|
1745
|
+
height: size,
|
|
1746
|
+
width: size
|
|
1747
|
+
},
|
|
1748
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("svg", {
|
|
1749
|
+
viewBox: "0 0 ".concat(size, " ").concat(size),
|
|
1750
|
+
className: "-rotate-90",
|
|
1751
|
+
children: [
|
|
1752
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("circle", {
|
|
1753
|
+
className: "text-white/50 dark:text-slate-200/50",
|
|
1754
|
+
strokeWidth: strokeWidthCalc - 0.5,
|
|
1755
|
+
stroke: "currentColor",
|
|
1756
|
+
fill: fill || "transparent",
|
|
1757
|
+
r: r,
|
|
1758
|
+
cx: cx,
|
|
1759
|
+
cy: cy
|
|
1760
|
+
}),
|
|
1761
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("circle", {
|
|
1762
|
+
strokeDasharray: 2 * Math.PI * r,
|
|
1763
|
+
strokeDashoffset: 2 * Math.PI * r - percentage / 100 * 2 * Math.PI * r,
|
|
1764
|
+
stroke: twColor || "white/50",
|
|
1765
|
+
strokeWidth: strokeWidthCalc,
|
|
1766
|
+
strokeLinecap: "round",
|
|
1767
|
+
fill: "transparent",
|
|
1768
|
+
r: r,
|
|
1769
|
+
cx: cx,
|
|
1770
|
+
cy: cy
|
|
1771
|
+
})
|
|
1772
|
+
]
|
|
1773
|
+
})
|
|
1774
|
+
});
|
|
1260
1775
|
};
|
|
1261
1776
|
var CircleProgress_default = CircleProgress;
|
|
1262
|
-
|
|
1263
1777
|
// src/ProgressBar/CourseProgress.tsx
|
|
1264
1778
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1265
1779
|
var PRIMARY_COLOR2 = "#00b4d8";
|
|
1266
|
-
var CourseProgress = (
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", {
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1780
|
+
var CourseProgress = function(param) {
|
|
1781
|
+
var twColor = param.twColor, percentage = param.percentage, label = param.label;
|
|
1782
|
+
var cx = "50%";
|
|
1783
|
+
var cy = "50%";
|
|
1784
|
+
var r = 50;
|
|
1785
|
+
var strokeWidth = 10;
|
|
1786
|
+
var fullLength = 2 * Math.PI * r;
|
|
1787
|
+
var length = fullLength * (percentage < 1 ? 1 - percentage : 0.01);
|
|
1788
|
+
var strokeDashoffset = 2 * Math.PI * r - percentage / 100 * 2 * Math.PI * r;
|
|
1789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", {
|
|
1790
|
+
className: "flex items-center flex-col justify-center space-y-0 dark:bg-inherit dark:text-gray-300",
|
|
1791
|
+
children: [
|
|
1792
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", {
|
|
1793
|
+
className: "relative flex items-center justify-center -my-2 -mt-1 overflow-hidden rounded-full",
|
|
1794
|
+
children: [
|
|
1795
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", {
|
|
1796
|
+
className: "-rotate-90",
|
|
1797
|
+
children: [
|
|
1798
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("circle", {
|
|
1799
|
+
className: "text-gray-300",
|
|
1800
|
+
strokeWidth: strokeWidth,
|
|
1801
|
+
stroke: "currentColor",
|
|
1802
|
+
fill: "transparent",
|
|
1803
|
+
r: r,
|
|
1804
|
+
cx: cx,
|
|
1805
|
+
cy: cy
|
|
1806
|
+
}),
|
|
1807
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("circle", {
|
|
1808
|
+
style: {
|
|
1809
|
+
strokeDashoffset: strokeDashoffset
|
|
1810
|
+
},
|
|
1811
|
+
color: twColor || PRIMARY_COLOR2,
|
|
1812
|
+
ref: function(ref) {
|
|
1813
|
+
if (ref) {}
|
|
1814
|
+
},
|
|
1815
|
+
strokeWidth: strokeWidth,
|
|
1816
|
+
strokeLinecap: "round",
|
|
1817
|
+
stroke: "currentColor",
|
|
1818
|
+
fill: "transparent",
|
|
1819
|
+
r: r,
|
|
1820
|
+
cx: cx,
|
|
1821
|
+
cy: cy,
|
|
1822
|
+
strokeDasharray: fullLength,
|
|
1823
|
+
strokeDashoffset: length
|
|
1824
|
+
})
|
|
1825
|
+
]
|
|
1826
|
+
}),
|
|
1827
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", {
|
|
1828
|
+
className: "absolute top-[".concat(50 / 2, "] text-xl leading-none font-medium font-header hidden sm:block"),
|
|
1829
|
+
children: percentage.toString() + "%"
|
|
1830
|
+
})
|
|
1831
|
+
]
|
|
1832
|
+
}),
|
|
1833
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", {
|
|
1834
|
+
className: "font-medium sm:text-xl font-header text-center w-full",
|
|
1835
|
+
children: label
|
|
1836
|
+
})
|
|
1837
|
+
]
|
|
1838
|
+
});
|
|
1314
1839
|
};
|
|
1315
|
-
var Small = (
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1840
|
+
var Small = function(param) {
|
|
1841
|
+
var twColor = param.twColor, percentage = param.percentage, label = param.label;
|
|
1842
|
+
var cx = 18;
|
|
1843
|
+
var cy = 18;
|
|
1844
|
+
var r = 14;
|
|
1845
|
+
var strokeWidth = 4;
|
|
1846
|
+
var strokeDashoffset = 2 * Math.PI * r - percentage / 100 * 2 * Math.PI * r;
|
|
1847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", {
|
|
1848
|
+
className: "flex items-center space-x-2 rounded-full bg-transparent border-2 border-slate-100 w-full",
|
|
1849
|
+
children: [
|
|
1850
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", {
|
|
1851
|
+
className: "flex items-center justify-center overflow-hidden",
|
|
1852
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", {
|
|
1853
|
+
className: "w-10 h-11 transform translate-x-1 translate-y-1",
|
|
1854
|
+
children: [
|
|
1855
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("circle", {
|
|
1856
|
+
className: "text-gray-300",
|
|
1857
|
+
strokeWidth: strokeWidth,
|
|
1858
|
+
stroke: "currentColor",
|
|
1859
|
+
fill: "transparent",
|
|
1860
|
+
r: r,
|
|
1861
|
+
cx: cx,
|
|
1862
|
+
cy: cy
|
|
1863
|
+
}),
|
|
1864
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("circle", {
|
|
1865
|
+
style: {
|
|
1866
|
+
strokeDashoffset: strokeDashoffset
|
|
1867
|
+
},
|
|
1868
|
+
className: twColor || "text-blue-500",
|
|
1869
|
+
ref: function(ref) {
|
|
1870
|
+
if (ref) {}
|
|
1871
|
+
},
|
|
1872
|
+
strokeWidth: strokeWidth,
|
|
1873
|
+
strokeLinecap: "round",
|
|
1874
|
+
stroke: "currentColor",
|
|
1875
|
+
fill: "transparent",
|
|
1876
|
+
r: r,
|
|
1877
|
+
cx: cx,
|
|
1878
|
+
cy: cy
|
|
1879
|
+
})
|
|
1880
|
+
]
|
|
1881
|
+
})
|
|
1882
|
+
}),
|
|
1883
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("p", {
|
|
1884
|
+
className: "font-medium dark:text-gray-300 text-gray-600 text-sm font-header mt-1",
|
|
1885
|
+
children: [
|
|
1886
|
+
label,
|
|
1887
|
+
" ",
|
|
1888
|
+
percentage.toString() + "%"
|
|
1889
|
+
]
|
|
1890
|
+
})
|
|
1891
|
+
]
|
|
1892
|
+
});
|
|
1360
1893
|
};
|
|
1361
1894
|
CourseProgress.Small = Small;
|
|
1362
1895
|
var CourseProgress_default = CourseProgress;
|
|
1363
|
-
|
|
1364
1896
|
// src/ProgressBar/ScrollProgress.tsx
|
|
1365
1897
|
var import_react9 = require("react");
|
|
1366
1898
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1367
1899
|
var PRIMARY_COLOR3 = "#00b4d8";
|
|
1368
|
-
var ScrollProgress = ()
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
style: {
|
|
1387
|
-
height: "4px",
|
|
1388
|
-
borderRadius: 2,
|
|
1389
|
-
width: "100%",
|
|
1390
|
-
// backgroundColor: '#d1dced',
|
|
1391
|
-
position: "fixed",
|
|
1392
|
-
top: "62px",
|
|
1393
|
-
left: "0px",
|
|
1394
|
-
right: "0px"
|
|
1395
|
-
},
|
|
1396
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1397
|
-
"div",
|
|
1398
|
-
{
|
|
1399
|
-
style: {
|
|
1400
|
-
height: "100%",
|
|
1401
|
-
backgroundColor: PRIMARY_COLOR3,
|
|
1900
|
+
var ScrollProgress = function() {
|
|
1901
|
+
var _ref = _sliced_to_array((0, import_react9.useState)(0), 2), scrollPercentage = _ref[0], setScrollPercentage = _ref[1];
|
|
1902
|
+
(0, import_react9.useEffect)(function() {
|
|
1903
|
+
var handleScroll = function() {
|
|
1904
|
+
var windowHeight = window.innerHeight;
|
|
1905
|
+
var documentHeight = document.documentElement.scrollHeight;
|
|
1906
|
+
var scrollY = window.scrollY;
|
|
1907
|
+
var scrollPercent = scrollY / (documentHeight - windowHeight) * 100;
|
|
1908
|
+
setScrollPercentage(scrollPercent);
|
|
1909
|
+
};
|
|
1910
|
+
window.addEventListener("scroll", handleScroll);
|
|
1911
|
+
return function() {
|
|
1912
|
+
window.removeEventListener("scroll", handleScroll);
|
|
1913
|
+
};
|
|
1914
|
+
}, []);
|
|
1915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", {
|
|
1916
|
+
style: {
|
|
1917
|
+
height: "4px",
|
|
1402
1918
|
borderRadius: 2,
|
|
1403
|
-
width:
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1919
|
+
width: "100%",
|
|
1920
|
+
// backgroundColor: '#d1dced',
|
|
1921
|
+
position: "fixed",
|
|
1922
|
+
top: "62px",
|
|
1923
|
+
left: "0px",
|
|
1924
|
+
right: "0px"
|
|
1925
|
+
},
|
|
1926
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", {
|
|
1927
|
+
style: {
|
|
1928
|
+
height: "100%",
|
|
1929
|
+
backgroundColor: PRIMARY_COLOR3,
|
|
1930
|
+
borderRadius: 2,
|
|
1931
|
+
width: "".concat(scrollPercentage, "%")
|
|
1932
|
+
}
|
|
1933
|
+
})
|
|
1934
|
+
});
|
|
1409
1935
|
};
|
|
1410
1936
|
var ScrollProgress_default = ScrollProgress;
|
|
1411
|
-
|
|
1412
1937
|
// src/Icons/AnimateLogo.tsx
|
|
1413
1938
|
var import_react10 = require("react");
|
|
1414
1939
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1415
|
-
var AnimateLogo = ()
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
{
|
|
1472
|
-
style: {
|
|
1473
|
-
transformOrigin: "center"
|
|
1474
|
-
},
|
|
1475
|
-
transform: "translate(300 300) rotate(0)",
|
|
1476
|
-
height: 176,
|
|
1477
|
-
width: 176,
|
|
1478
|
-
children: [
|
|
1479
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1480
|
-
"path",
|
|
1481
|
-
{
|
|
1482
|
-
className: "stroke-black dark:stroke-white text-gray-900 dark:text-gray-50",
|
|
1483
|
-
stroke: "currentColor",
|
|
1484
|
-
id: "motionPath",
|
|
1485
|
-
fill: "none",
|
|
1486
|
-
strokeLinecap: "round",
|
|
1487
|
-
height: 600,
|
|
1488
|
-
width: 600,
|
|
1940
|
+
var AnimateLogo = function() {
|
|
1941
|
+
var _ref = _sliced_to_array((0, import_react10.useState)(false), 2), isFirefox = _ref[0], setIsFirefox = _ref[1];
|
|
1942
|
+
(0, import_react10.useEffect)(function() {
|
|
1943
|
+
var userAgent = window.navigator.userAgent;
|
|
1944
|
+
setIsFirefox(userAgent.indexOf("Firefox") > -1);
|
|
1945
|
+
}, []);
|
|
1946
|
+
if (isFirefox) {
|
|
1947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("svg", {
|
|
1948
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1949
|
+
className: "animate-pulse",
|
|
1950
|
+
viewBox: "0 0 600 600",
|
|
1951
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("g", {
|
|
1952
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("path", {
|
|
1953
|
+
className: "stroke-black dark:stroke-white text-gray-900 dark:text-gray-50",
|
|
1954
|
+
stroke: "currentColor",
|
|
1955
|
+
fill: "none",
|
|
1956
|
+
strokeLinecap: "round",
|
|
1957
|
+
strokeMiterlimit: "10",
|
|
1958
|
+
strokeWidth: "82",
|
|
1959
|
+
strokeDasharray: "1600",
|
|
1960
|
+
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",
|
|
1961
|
+
children: [
|
|
1962
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("animate", {
|
|
1963
|
+
attributeName: "stroke-dashoffset",
|
|
1964
|
+
to: "0",
|
|
1965
|
+
from: "1600",
|
|
1966
|
+
dur: "4s",
|
|
1967
|
+
fill: "freeze",
|
|
1968
|
+
repeatCount: "indefinite",
|
|
1969
|
+
calcMode: "cubic",
|
|
1970
|
+
keyTimes: "0;0.375;0.5;0.875;1",
|
|
1971
|
+
keySplines: "0 0.26 0 1;0 0.26 0 1;0 0.26 0 1;0 0.26 0 1",
|
|
1972
|
+
values: "1600;0;0;1600;1600"
|
|
1973
|
+
}),
|
|
1974
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("animateTransform", {
|
|
1975
|
+
attributeName: "transform",
|
|
1976
|
+
type: "rotate",
|
|
1977
|
+
from: "0 300 300",
|
|
1978
|
+
to: "360 300 300",
|
|
1979
|
+
dur: "2s",
|
|
1980
|
+
fill: "freeze",
|
|
1981
|
+
repeatCount: "indefinite",
|
|
1982
|
+
calcMode: "cubic",
|
|
1983
|
+
keyTimes: "0;0.75;1",
|
|
1984
|
+
keySplines: "0 0.26 0 1",
|
|
1985
|
+
values: "0 300 300;360 300 300;360 300 300;"
|
|
1986
|
+
})
|
|
1987
|
+
]
|
|
1988
|
+
})
|
|
1989
|
+
})
|
|
1990
|
+
});
|
|
1991
|
+
}
|
|
1992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("svg", {
|
|
1993
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1994
|
+
viewBox: "0 0 600 600",
|
|
1995
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("g", {
|
|
1489
1996
|
style: {
|
|
1490
|
-
|
|
1997
|
+
transformOrigin: "center"
|
|
1491
1998
|
},
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1999
|
+
transform: "translate(300 300) rotate(0)",
|
|
2000
|
+
height: 176,
|
|
2001
|
+
width: 176,
|
|
2002
|
+
children: [
|
|
2003
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", {
|
|
2004
|
+
className: "stroke-black dark:stroke-white text-gray-900 dark:text-gray-50",
|
|
2005
|
+
stroke: "currentColor",
|
|
2006
|
+
id: "motionPath",
|
|
2007
|
+
fill: "none",
|
|
2008
|
+
strokeLinecap: "round",
|
|
2009
|
+
height: 600,
|
|
2010
|
+
width: 600,
|
|
2011
|
+
style: {
|
|
2012
|
+
transformOrigin: "center"
|
|
2013
|
+
},
|
|
2014
|
+
strokeMiterlimit: "10",
|
|
2015
|
+
strokeWidth: "82",
|
|
2016
|
+
strokeDasharray: "1600",
|
|
2017
|
+
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",
|
|
2018
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("animate", {
|
|
2019
|
+
attributeName: "stroke-dashoffset",
|
|
2020
|
+
to: "0",
|
|
2021
|
+
from: "1600",
|
|
2022
|
+
dur: "4s",
|
|
2023
|
+
fill: "freeze",
|
|
2024
|
+
repeatCount: "indefinite",
|
|
2025
|
+
calcMode: "cubic",
|
|
2026
|
+
keyTimes: "0;0.375;0.5;0.875;1",
|
|
2027
|
+
keySplines: "0 0.26 0 1;0 0.26 0 1;0 0.26 0 1;0 0.26 0 1",
|
|
2028
|
+
values: "1600;0;0;1600;1600"
|
|
2029
|
+
})
|
|
2030
|
+
}),
|
|
2031
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("animateTransform", {
|
|
2032
|
+
attributeName: "transform",
|
|
2033
|
+
type: "rotate",
|
|
2034
|
+
from: "0",
|
|
2035
|
+
to: "360",
|
|
2036
|
+
dur: "2s",
|
|
2037
|
+
fill: "freeze",
|
|
2038
|
+
repeatCount: "indefinite",
|
|
2039
|
+
calcMode: "cubic",
|
|
2040
|
+
keyTimes: "0;0.75;1",
|
|
2041
|
+
keySplines: "0 0.26 0 1",
|
|
2042
|
+
values: "0;360;360;"
|
|
2043
|
+
})
|
|
2044
|
+
]
|
|
2045
|
+
})
|
|
2046
|
+
});
|
|
1532
2047
|
};
|
|
1533
2048
|
var AnimateLogo_default = AnimateLogo;
|
|
1534
|
-
|
|
1535
2049
|
// src/Spinners/OverlaySpinner.tsx
|
|
1536
2050
|
var import_react11 = require("react");
|
|
1537
2051
|
var import_react_dom3 = require("react-dom");
|
|
1538
2052
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1539
|
-
var OverlaySpinner = (
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
"
|
|
1548
|
-
|
|
2053
|
+
var OverlaySpinner = function(param) {
|
|
2054
|
+
var visible = param.visible;
|
|
2055
|
+
var _ref = _sliced_to_array((0, import_react11.useState)(false), 2), mounted = _ref[0], setMounted = _ref[1];
|
|
2056
|
+
(0, import_react11.useEffect)(function() {
|
|
2057
|
+
return setMounted(true);
|
|
2058
|
+
}, []);
|
|
2059
|
+
if (!mounted) return null;
|
|
2060
|
+
if (!visible) return null;
|
|
2061
|
+
return (0, import_react_dom3.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", {
|
|
2062
|
+
className: "animate-fade-in",
|
|
2063
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", {
|
|
2064
|
+
className: "fixed top-0 left-0 w-full h-screen flex items-center justify-center z-50 dark:bg-black/70 bg-white/60",
|
|
2065
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", {
|
|
2066
|
+
className: "h-44 w-44 overflow-visible",
|
|
2067
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(AnimateLogo_default, {})
|
|
2068
|
+
})
|
|
2069
|
+
})
|
|
2070
|
+
}), typeof window !== "undefined" ? document.body : {}, "spinner");
|
|
1549
2071
|
};
|
|
1550
2072
|
var OverlaySpinner_default = OverlaySpinner;
|
|
1551
2073
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1552
2074
|
0 && (module.exports = {
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
2075
|
+
AnimateLogo: AnimateLogo,
|
|
2076
|
+
Backdrop: Backdrop,
|
|
2077
|
+
BottomAlert: BottomAlert,
|
|
2078
|
+
Breakpoint: Breakpoint,
|
|
2079
|
+
Button: Button,
|
|
2080
|
+
Checkbox: Checkbox,
|
|
2081
|
+
CircleProgress: CircleProgress,
|
|
2082
|
+
Container: Container,
|
|
2083
|
+
CourseProgress: CourseProgress,
|
|
2084
|
+
ErrorText: ErrorText,
|
|
2085
|
+
Fade: Fade,
|
|
2086
|
+
FunButton: FunButton,
|
|
2087
|
+
FunRoundButton: FunRoundButton,
|
|
2088
|
+
IconInfo: IconInfo,
|
|
2089
|
+
Modal: Modal,
|
|
2090
|
+
NoResults: NoResults,
|
|
2091
|
+
NoticeBox: NoticeBox,
|
|
2092
|
+
Overlay: Overlay,
|
|
2093
|
+
OverlaySpinner: OverlaySpinner,
|
|
2094
|
+
PRIMARY_COLOR: PRIMARY_COLOR,
|
|
2095
|
+
Pill: Pill,
|
|
2096
|
+
ProgressBar: ProgressBar,
|
|
2097
|
+
ProgressBarSimple: ProgressBarSimple,
|
|
2098
|
+
RadioOption: RadioOption,
|
|
2099
|
+
RatingStars: RatingStars,
|
|
2100
|
+
ScrollProgress: ScrollProgress,
|
|
2101
|
+
Slider: Slider,
|
|
2102
|
+
Spinner: Spinner,
|
|
2103
|
+
StepsComponent: StepsComponent,
|
|
2104
|
+
Tippy: Tippy,
|
|
2105
|
+
ToggleSwitch: ToggleSwitch,
|
|
2106
|
+
UserContentSwitcher: UserContentSwitcher,
|
|
2107
|
+
baseFieldStyle: baseFieldStyle,
|
|
2108
|
+
createExerciseElementStyle: createExerciseElementStyle,
|
|
2109
|
+
exerciseDeleteButton: exerciseDeleteButton,
|
|
2110
|
+
exerciseEditButton: exerciseEditButton,
|
|
2111
|
+
headerButtonClass: headerButtonClass,
|
|
2112
|
+
headerTippyClass: headerTippyClass,
|
|
2113
|
+
tippyClassname: tippyClassname,
|
|
2114
|
+
toolbarExerciseButton: toolbarExerciseButton,
|
|
2115
|
+
xIconButton: xIconButton
|
|
1594
2116
|
});
|