evelearn-theme 2.0.2 → 2.0.4

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