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