evelearn-theme 2.0.31 → 2.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -21,7 +21,7 @@ declare const headerTippyClass = "rounded-lg p-2 bg-slate-950 opacity-95 text-wh
21
21
  declare const headerButtonClass = "w-10 h-10 rounded-full dark:hover:bg-slate-600 hover:bg-slate-200 bg-transparent flex justify-center items-center flex justify-center items-center text-slate-600 dark:text-slate-100 hover:text-primary dark:hover:text-primary transition-colors duration-50";
22
22
 
23
23
  interface SpinnerProps {
24
- size?: 'base' | 'small';
24
+ size?: number | string;
25
25
  white?: boolean | string;
26
26
  visible?: boolean | string;
27
27
  }
package/dist/index.d.ts CHANGED
@@ -21,7 +21,7 @@ declare const headerTippyClass = "rounded-lg p-2 bg-slate-950 opacity-95 text-wh
21
21
  declare const headerButtonClass = "w-10 h-10 rounded-full dark:hover:bg-slate-600 hover:bg-slate-200 bg-transparent flex justify-center items-center flex justify-center items-center text-slate-600 dark:text-slate-100 hover:text-primary dark:hover:text-primary transition-colors duration-50";
22
22
 
23
23
  interface SpinnerProps {
24
- size?: 'base' | 'small';
24
+ size?: number | string;
25
25
  white?: boolean | string;
26
26
  visible?: boolean | string;
27
27
  }
package/dist/index.js CHANGED
@@ -172,39 +172,95 @@ var headerTippyClass = "rounded-lg p-2 bg-slate-950 opacity-95 text-white font-m
172
172
  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";
173
173
  var Spinner = /* @__PURE__ */ __name(function(param) {
174
174
  var _param_visible = param.visible, visible = _param_visible === void 0 ? true : _param_visible, size = param.size, isWhite = param.white;
175
+ var newSize = 32;
176
+ if (typeof size === "string") {
177
+ if (size === "base") {
178
+ size = 32;
179
+ } else if (size === "large") {
180
+ size = 44;
181
+ }
182
+ }
175
183
  if (visible === false) return null;
176
- var color = isWhite ? "stroke-white/90" : "stroke-slate-600/80";
177
- var bgColor = isWhite ? "stroke-white/20" : "stroke-slate-500/20";
178
- var dimensions = size === "small" ? "w-5 h-5" : "w-8 h-8";
179
- var spinnerClasses = "\n absolute\n top-0\n animate-spin\n ".concat(dimensions, "\n ");
180
- return /* @__PURE__ */ jsxRuntime.jsxs("div", {
184
+ return /* @__PURE__ */ jsxRuntime.jsx("div", {
185
+ style: {
186
+ height: newSize + 2,
187
+ width: newSize + 2
188
+ },
181
189
  className: "relative h-8 w-8 flex justify-center items-center",
182
- children: [
183
- /* @__PURE__ */ jsxRuntime.jsx("svg", {
184
- className: "absolute top-0 ".concat(dimensions, " ").concat(bgColor),
185
- viewBox: "0 0 24 24",
186
- fill: "none",
187
- strokeWidth: "2.4",
188
- children: /* @__PURE__ */ jsxRuntime.jsx("circle", {
189
- cx: "12",
190
- cy: "12",
191
- r: "10"
192
- })
193
- }),
194
- /* @__PURE__ */ jsxRuntime.jsx("svg", {
195
- className: spinnerClasses,
196
- viewBox: "0 0 24 24",
197
- fill: "none",
198
- strokeWidth: "2.4",
199
- strokeLinecap: "round",
200
- children: /* @__PURE__ */ jsxRuntime.jsx("path", {
201
- 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 ",
202
- strokeDasharray: "13 18.4",
203
- stroke: "inherit",
204
- className: color
190
+ children: /* @__PURE__ */ jsxRuntime.jsxs("svg", {
191
+ xmlns: "http://www.w3.org/2000/svg",
192
+ viewBox: "0 0 200 200",
193
+ width: newSize,
194
+ height: newSize,
195
+ children: [
196
+ /* @__PURE__ */ jsxRuntime.jsxs("radialGradient", {
197
+ id: "a10",
198
+ cx: "0.66",
199
+ cy: "0.313",
200
+ fx: "0.66",
201
+ fy: "0.313",
202
+ gradientTransform: "scale(1.5)",
203
+ children: [
204
+ /* @__PURE__ */ jsxRuntime.jsx("stop", {
205
+ offset: "0",
206
+ stopColor: isWhite ? "#FFF" : PRIMARY_COLOR
207
+ }),
208
+ /* @__PURE__ */ jsxRuntime.jsx("stop", {
209
+ offset: "0.3",
210
+ stopColor: isWhite ? "#FFF" : PRIMARY_COLOR,
211
+ stopOpacity: "0.9"
212
+ }),
213
+ /* @__PURE__ */ jsxRuntime.jsx("stop", {
214
+ offset: "0.6",
215
+ stopColor: isWhite ? "#FFF" : PRIMARY_COLOR,
216
+ stopOpacity: "0.6"
217
+ }),
218
+ /* @__PURE__ */ jsxRuntime.jsx("stop", {
219
+ offset: "0.8",
220
+ stopColor: isWhite ? "#FFF" : PRIMARY_COLOR,
221
+ stopOpacity: "0.3"
222
+ }),
223
+ /* @__PURE__ */ jsxRuntime.jsx("stop", {
224
+ offset: "1",
225
+ stopColor: isWhite ? "#FFF" : PRIMARY_COLOR,
226
+ stopOpacity: "0"
227
+ })
228
+ ]
229
+ }),
230
+ /* @__PURE__ */ jsxRuntime.jsx("circle", {
231
+ cx: "100",
232
+ cy: "100",
233
+ r: "70",
234
+ fill: "none",
235
+ stroke: "url(#a10)",
236
+ strokeDasharray: "200 1000",
237
+ strokeLinecap: "round",
238
+ strokeWidth: "17",
239
+ transformOrigin: "center",
240
+ children: /* @__PURE__ */ jsxRuntime.jsx("animateTransform", {
241
+ attributeName: "transform",
242
+ calcMode: "spline",
243
+ dur: "1.8",
244
+ keySplines: "0 0 1 1",
245
+ keyTimes: "0;1",
246
+ repeatCount: "indefinite",
247
+ type: "rotate",
248
+ values: "360;0"
249
+ })
250
+ }),
251
+ /* @__PURE__ */ jsxRuntime.jsx("circle", {
252
+ cx: "100",
253
+ cy: "100",
254
+ r: "70",
255
+ fill: "none",
256
+ stroke: "#FFF",
257
+ strokeLinecap: "round",
258
+ strokeWidth: "17",
259
+ opacity: "0.5",
260
+ transformOrigin: "center"
205
261
  })
206
- })
207
- ]
262
+ ]
263
+ })
208
264
  });
209
265
  }, "Spinner");
210
266
  var SpinnerCentered = /* @__PURE__ */ __name(function(props) {
@@ -439,8 +495,30 @@ var Button = /* @__PURE__ */ __name(function(param) {
439
495
  className: "w-full max-h-11",
440
496
  children: loading ? /* @__PURE__ */ jsxRuntime.jsx("div", {
441
497
  className: "flex w-full justify-center items-center",
442
- children: /* @__PURE__ */ jsxRuntime.jsx(Spinner_default, {
443
- white: true
498
+ children: /* @__PURE__ */ jsxRuntime.jsx("svg", {
499
+ xmlns: "http://www.w3.org/2000/svg",
500
+ fill: "none",
501
+ stroke: "currentColor",
502
+ strokeLinecap: "round",
503
+ strokeLinejoin: "round",
504
+ strokeWidth: "2.5",
505
+ className: "size-10",
506
+ viewBox: "0 0 24 24",
507
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", {
508
+ d: "M2 16s9-15 20-4C11 23 2 8 2 8",
509
+ strokeDasharray: "70",
510
+ strokeDashoffset: "70",
511
+ children: /* @__PURE__ */ jsxRuntime.jsx("animate", {
512
+ attributeName: "stroke-dashoffset",
513
+ calcMode: "spline",
514
+ dur: "2",
515
+ keySplines: "0 0 1 1",
516
+ repeatCount: "indefinite",
517
+ from: "70",
518
+ to: "-70",
519
+ fill: "freeze"
520
+ })
521
+ })
444
522
  })
445
523
  }) : children
446
524
  })
@@ -1246,7 +1324,7 @@ var Formik = /* @__PURE__ */ __name(function(param) {
1246
1324
  onChange: handleChange
1247
1325
  }),
1248
1326
  /* @__PURE__ */ jsxRuntime.jsx("div", {
1249
- className: clsx__default.default("w-10 h-6 rounded-full p-[4px] transition-colors duration-300", value ? "bg-[#00b4d8]" : "bg-[#64748b]"),
1327
+ className: clsx__default.default("w-10 h-6 rounded-full p-[4px] transition-colors duration-300", value ? "bg-primary" : "dark:bg-slate-950 bg-stone-400"),
1250
1328
  children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, {
1251
1329
  className: "w-4 h-4 bg-white rounded-full absolute top-1",
1252
1330
  initial: false,
@@ -1287,7 +1365,7 @@ var ToggleSwitch = /* @__PURE__ */ __name(function(param) {
1287
1365
  onChange: handleChange
1288
1366
  }),
1289
1367
  /* @__PURE__ */ jsxRuntime.jsx("div", {
1290
- className: clsx__default.default("w-10 h-6 rounded-full p-[4px] transition-colors duration-300", value ? "bg-[#00b4d8]" : "bg-[#64748b]"),
1368
+ className: clsx__default.default("w-10 h-6 rounded-full p-[4px] transition-colors duration-300", value ? "bg-primary" : "dark:bg-slate-950 bg-stone-400"),
1291
1369
  children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, {
1292
1370
  className: "w-4 h-4 bg-white rounded-full absolute top-1",
1293
1371
  initial: false,
package/dist/index.mjs CHANGED
@@ -164,39 +164,95 @@ var headerTippyClass = "rounded-lg p-2 bg-slate-950 opacity-95 text-white font-m
164
164
  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";
165
165
  var Spinner = /* @__PURE__ */ __name(function(param) {
166
166
  var _param_visible = param.visible, visible = _param_visible === void 0 ? true : _param_visible, size = param.size, isWhite = param.white;
167
+ var newSize = 32;
168
+ if (typeof size === "string") {
169
+ if (size === "base") {
170
+ size = 32;
171
+ } else if (size === "large") {
172
+ size = 44;
173
+ }
174
+ }
167
175
  if (visible === false) return null;
168
- var color = isWhite ? "stroke-white/90" : "stroke-slate-600/80";
169
- var bgColor = isWhite ? "stroke-white/20" : "stroke-slate-500/20";
170
- var dimensions = size === "small" ? "w-5 h-5" : "w-8 h-8";
171
- var spinnerClasses = "\n absolute\n top-0\n animate-spin\n ".concat(dimensions, "\n ");
172
- return /* @__PURE__ */ jsxs("div", {
176
+ return /* @__PURE__ */ jsx("div", {
177
+ style: {
178
+ height: newSize + 2,
179
+ width: newSize + 2
180
+ },
173
181
  className: "relative h-8 w-8 flex justify-center items-center",
174
- children: [
175
- /* @__PURE__ */ jsx("svg", {
176
- className: "absolute top-0 ".concat(dimensions, " ").concat(bgColor),
177
- viewBox: "0 0 24 24",
178
- fill: "none",
179
- strokeWidth: "2.4",
180
- children: /* @__PURE__ */ jsx("circle", {
181
- cx: "12",
182
- cy: "12",
183
- r: "10"
184
- })
185
- }),
186
- /* @__PURE__ */ jsx("svg", {
187
- className: spinnerClasses,
188
- viewBox: "0 0 24 24",
189
- fill: "none",
190
- strokeWidth: "2.4",
191
- strokeLinecap: "round",
192
- children: /* @__PURE__ */ jsx("path", {
193
- 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 ",
194
- strokeDasharray: "13 18.4",
195
- stroke: "inherit",
196
- className: color
182
+ children: /* @__PURE__ */ jsxs("svg", {
183
+ xmlns: "http://www.w3.org/2000/svg",
184
+ viewBox: "0 0 200 200",
185
+ width: newSize,
186
+ height: newSize,
187
+ children: [
188
+ /* @__PURE__ */ jsxs("radialGradient", {
189
+ id: "a10",
190
+ cx: "0.66",
191
+ cy: "0.313",
192
+ fx: "0.66",
193
+ fy: "0.313",
194
+ gradientTransform: "scale(1.5)",
195
+ children: [
196
+ /* @__PURE__ */ jsx("stop", {
197
+ offset: "0",
198
+ stopColor: isWhite ? "#FFF" : PRIMARY_COLOR
199
+ }),
200
+ /* @__PURE__ */ jsx("stop", {
201
+ offset: "0.3",
202
+ stopColor: isWhite ? "#FFF" : PRIMARY_COLOR,
203
+ stopOpacity: "0.9"
204
+ }),
205
+ /* @__PURE__ */ jsx("stop", {
206
+ offset: "0.6",
207
+ stopColor: isWhite ? "#FFF" : PRIMARY_COLOR,
208
+ stopOpacity: "0.6"
209
+ }),
210
+ /* @__PURE__ */ jsx("stop", {
211
+ offset: "0.8",
212
+ stopColor: isWhite ? "#FFF" : PRIMARY_COLOR,
213
+ stopOpacity: "0.3"
214
+ }),
215
+ /* @__PURE__ */ jsx("stop", {
216
+ offset: "1",
217
+ stopColor: isWhite ? "#FFF" : PRIMARY_COLOR,
218
+ stopOpacity: "0"
219
+ })
220
+ ]
221
+ }),
222
+ /* @__PURE__ */ jsx("circle", {
223
+ cx: "100",
224
+ cy: "100",
225
+ r: "70",
226
+ fill: "none",
227
+ stroke: "url(#a10)",
228
+ strokeDasharray: "200 1000",
229
+ strokeLinecap: "round",
230
+ strokeWidth: "17",
231
+ transformOrigin: "center",
232
+ children: /* @__PURE__ */ jsx("animateTransform", {
233
+ attributeName: "transform",
234
+ calcMode: "spline",
235
+ dur: "1.8",
236
+ keySplines: "0 0 1 1",
237
+ keyTimes: "0;1",
238
+ repeatCount: "indefinite",
239
+ type: "rotate",
240
+ values: "360;0"
241
+ })
242
+ }),
243
+ /* @__PURE__ */ jsx("circle", {
244
+ cx: "100",
245
+ cy: "100",
246
+ r: "70",
247
+ fill: "none",
248
+ stroke: "#FFF",
249
+ strokeLinecap: "round",
250
+ strokeWidth: "17",
251
+ opacity: "0.5",
252
+ transformOrigin: "center"
197
253
  })
198
- })
199
- ]
254
+ ]
255
+ })
200
256
  });
201
257
  }, "Spinner");
202
258
  var SpinnerCentered = /* @__PURE__ */ __name(function(props) {
@@ -431,8 +487,30 @@ var Button = /* @__PURE__ */ __name(function(param) {
431
487
  className: "w-full max-h-11",
432
488
  children: loading ? /* @__PURE__ */ jsx("div", {
433
489
  className: "flex w-full justify-center items-center",
434
- children: /* @__PURE__ */ jsx(Spinner_default, {
435
- white: true
490
+ children: /* @__PURE__ */ jsx("svg", {
491
+ xmlns: "http://www.w3.org/2000/svg",
492
+ fill: "none",
493
+ stroke: "currentColor",
494
+ strokeLinecap: "round",
495
+ strokeLinejoin: "round",
496
+ strokeWidth: "2.5",
497
+ className: "size-10",
498
+ viewBox: "0 0 24 24",
499
+ children: /* @__PURE__ */ jsx("path", {
500
+ d: "M2 16s9-15 20-4C11 23 2 8 2 8",
501
+ strokeDasharray: "70",
502
+ strokeDashoffset: "70",
503
+ children: /* @__PURE__ */ jsx("animate", {
504
+ attributeName: "stroke-dashoffset",
505
+ calcMode: "spline",
506
+ dur: "2",
507
+ keySplines: "0 0 1 1",
508
+ repeatCount: "indefinite",
509
+ from: "70",
510
+ to: "-70",
511
+ fill: "freeze"
512
+ })
513
+ })
436
514
  })
437
515
  }) : children
438
516
  })
@@ -1238,7 +1316,7 @@ var Formik = /* @__PURE__ */ __name(function(param) {
1238
1316
  onChange: handleChange
1239
1317
  }),
1240
1318
  /* @__PURE__ */ jsx("div", {
1241
- className: clsx("w-10 h-6 rounded-full p-[4px] transition-colors duration-300", value ? "bg-[#00b4d8]" : "bg-[#64748b]"),
1319
+ className: clsx("w-10 h-6 rounded-full p-[4px] transition-colors duration-300", value ? "bg-primary" : "dark:bg-slate-950 bg-stone-400"),
1242
1320
  children: /* @__PURE__ */ jsx(motion.div, {
1243
1321
  className: "w-4 h-4 bg-white rounded-full absolute top-1",
1244
1322
  initial: false,
@@ -1279,7 +1357,7 @@ var ToggleSwitch = /* @__PURE__ */ __name(function(param) {
1279
1357
  onChange: handleChange
1280
1358
  }),
1281
1359
  /* @__PURE__ */ jsx("div", {
1282
- className: clsx("w-10 h-6 rounded-full p-[4px] transition-colors duration-300", value ? "bg-[#00b4d8]" : "bg-[#64748b]"),
1360
+ className: clsx("w-10 h-6 rounded-full p-[4px] transition-colors duration-300", value ? "bg-primary" : "dark:bg-slate-950 bg-stone-400"),
1283
1361
  children: /* @__PURE__ */ jsx(motion.div, {
1284
1362
  className: "w-4 h-4 bg-white rounded-full absolute top-1",
1285
1363
  initial: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evelearn-theme",
3
- "version": "2.0.31",
3
+ "version": "2.0.32",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",