evelearn-theme 2.0.10 → 2.0.12
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 +52 -24
- package/dist/index.mjs +52 -24
- package/package.json +4 -1
package/dist/index.js
CHANGED
|
@@ -548,6 +548,7 @@ var Overlay = function(param) {
|
|
|
548
548
|
if (!root) {
|
|
549
549
|
root = document.createElement("div");
|
|
550
550
|
root.id = "modal-root";
|
|
551
|
+
root.classList.add(document.documentElement.classList.contains("dark") ? "dark" : "light");
|
|
551
552
|
document.body.appendChild(root);
|
|
552
553
|
}
|
|
553
554
|
setModalRoot(root);
|
|
@@ -576,6 +577,7 @@ var Overlay = function(param) {
|
|
|
576
577
|
};
|
|
577
578
|
var Overlay_default = Overlay;
|
|
578
579
|
// src/Button/Button.tsx
|
|
580
|
+
var import_clsx = __toESM(require("clsx"));
|
|
579
581
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
580
582
|
var Button = function(param) {
|
|
581
583
|
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;
|
|
@@ -618,7 +620,7 @@ var Button = function(param) {
|
|
|
618
620
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", {
|
|
619
621
|
type: type || "button",
|
|
620
622
|
disabled: disabled,
|
|
621
|
-
className: "rounded-lg cursor-pointer focus:outline-none transition duration-100
|
|
623
|
+
className: (0, import_clsx.default)("rounded-lg cursor-pointer focus:outline-none transition duration-100", styled(), sized()),
|
|
622
624
|
onClick: onClick,
|
|
623
625
|
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", {
|
|
624
626
|
className: "w-full max-h-11",
|
|
@@ -763,6 +765,7 @@ var FunButton_default = FunButton;
|
|
|
763
765
|
// src/Button/FunRoundButton.tsx
|
|
764
766
|
var import_react3 = require("react");
|
|
765
767
|
var import_framer_motion2 = require("framer-motion");
|
|
768
|
+
var import_clsx2 = __toESM(require("clsx"));
|
|
766
769
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
767
770
|
var FunRoundButton = function(param) {
|
|
768
771
|
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;
|
|
@@ -809,7 +812,7 @@ var FunRoundButton = function(param) {
|
|
|
809
812
|
disabled
|
|
810
813
|
]), front = _ref.front, bottom = _ref.bottom;
|
|
811
814
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_framer_motion2.motion.button, {
|
|
812
|
-
className:
|
|
815
|
+
className: (0, import_clsx2.default)(className || "border-none p-0 flex justify-center items-center cursor-pointer z-10", disabled ? "opacity-70 cursor-default" : "hover:opacity-95"),
|
|
813
816
|
style: {
|
|
814
817
|
background: front,
|
|
815
818
|
height: size,
|
|
@@ -858,6 +861,7 @@ var FunRoundButton_default = FunRoundButton;
|
|
|
858
861
|
// src/Checkbox/Checkbox.tsx
|
|
859
862
|
var import_react4 = require("react");
|
|
860
863
|
var import_formik = require("formik");
|
|
864
|
+
var import_clsx3 = __toESM(require("clsx"));
|
|
861
865
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
862
866
|
var Checkbox = function(param) {
|
|
863
867
|
var name = param.name, labelText = param.labelText, isLarge = param.isLarge, onChange = param.onChange, isDisabled = param.isDisabled;
|
|
@@ -886,7 +890,7 @@ var Checkbox = function(param) {
|
|
|
886
890
|
name: name,
|
|
887
891
|
type: "checkbox",
|
|
888
892
|
checked: !!value,
|
|
889
|
-
className: "form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded
|
|
893
|
+
className: (0, import_clsx3.default)("form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded", isLarge ? "h-5 w-5" : "h-4 w-4")
|
|
890
894
|
}),
|
|
891
895
|
typeof labelText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", {
|
|
892
896
|
htmlFor: "".concat(name).concat(rand),
|
|
@@ -936,7 +940,7 @@ var MultiChoiceCheckBox = function(param) {
|
|
|
936
940
|
id: name,
|
|
937
941
|
name: name,
|
|
938
942
|
type: "checkbox",
|
|
939
|
-
className: "form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded
|
|
943
|
+
className: (0, import_clsx3.default)("form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded", isLarge ? "h-5 w-5" : "h-4 w-4")
|
|
940
944
|
})
|
|
941
945
|
})
|
|
942
946
|
});
|
|
@@ -944,6 +948,7 @@ var MultiChoiceCheckBox = function(param) {
|
|
|
944
948
|
Checkbox.Multi = MultiChoiceCheckBox;
|
|
945
949
|
var Checkbox_default = Checkbox;
|
|
946
950
|
// src/Checkbox/RadioOption.tsx
|
|
951
|
+
var import_clsx4 = __toESM(require("clsx"));
|
|
947
952
|
var import_formik2 = require("formik");
|
|
948
953
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
949
954
|
var RadioOption = function(param) {
|
|
@@ -962,7 +967,7 @@ var RadioOption = function(param) {
|
|
|
962
967
|
name: name,
|
|
963
968
|
type: "checkbox",
|
|
964
969
|
checked: value === option,
|
|
965
|
-
className: "form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded
|
|
970
|
+
className: (0, import_clsx4.default)("form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded", isLarge ? "h-5 w-5" : "h-4 w-4")
|
|
966
971
|
}),
|
|
967
972
|
typeof labelText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", {
|
|
968
973
|
htmlFor: option,
|
|
@@ -1079,9 +1084,12 @@ var BAWrapper = function(props) {
|
|
|
1079
1084
|
return import_react_dom2.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(BottomAlert, _object_spread({}, props)), document.body);
|
|
1080
1085
|
};
|
|
1081
1086
|
var BottomAlert_default = BAWrapper;
|
|
1087
|
+
// src/Common/IconInfo.tsx
|
|
1088
|
+
var import_clsx6 = __toESM(require("clsx"));
|
|
1082
1089
|
// src/Common/Tippy.tsx
|
|
1083
1090
|
var import_react5 = require("react");
|
|
1084
1091
|
var import_react6 = require("@floating-ui/react");
|
|
1092
|
+
var import_clsx5 = __toESM(require("clsx"));
|
|
1085
1093
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1086
1094
|
var Tippy = function(param) {
|
|
1087
1095
|
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;
|
|
@@ -1123,12 +1131,13 @@ var Tippy = function(param) {
|
|
|
1123
1131
|
children: [
|
|
1124
1132
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", _object_spread_props(_object_spread({
|
|
1125
1133
|
ref: refs.setFloating,
|
|
1126
|
-
className:
|
|
1134
|
+
className: (0, import_clsx5.default)("".concat(className || tippyClassname))
|
|
1127
1135
|
}, getFloatingProps()), {
|
|
1128
1136
|
style: {
|
|
1129
1137
|
position: strategy,
|
|
1130
1138
|
top: y !== null && y !== void 0 ? y : 0,
|
|
1131
1139
|
left: x !== null && x !== void 0 ? x : 0,
|
|
1140
|
+
zIndex: 9999,
|
|
1132
1141
|
width: "max-content"
|
|
1133
1142
|
},
|
|
1134
1143
|
children: content
|
|
@@ -1165,7 +1174,7 @@ var IconInfo = function(param) {
|
|
|
1165
1174
|
children: [
|
|
1166
1175
|
icon,
|
|
1167
1176
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", {
|
|
1168
|
-
className: "absolute -bottom-1
|
|
1177
|
+
className: (0, import_clsx6.default)("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"),
|
|
1169
1178
|
children: number
|
|
1170
1179
|
})
|
|
1171
1180
|
]
|
|
@@ -1194,6 +1203,7 @@ var XIcon = function(param) {
|
|
|
1194
1203
|
};
|
|
1195
1204
|
var XIcon_default = XIcon;
|
|
1196
1205
|
// src/Common/Modal.tsx
|
|
1206
|
+
var import_clsx7 = __toESM(require("clsx"));
|
|
1197
1207
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1198
1208
|
var Modal = function(_param) {
|
|
1199
1209
|
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, [
|
|
@@ -1216,15 +1226,12 @@ var Modal = function(_param) {
|
|
|
1216
1226
|
withContainer: true
|
|
1217
1227
|
}, props), {
|
|
1218
1228
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", {
|
|
1219
|
-
className:
|
|
1229
|
+
className: (0, import_clsx7.default)(displayDark && "dark", "bg-slate-900/20 fixed inset-0 flex items-center justify-center"),
|
|
1220
1230
|
style: {
|
|
1221
1231
|
zIndex: 1e4
|
|
1222
1232
|
},
|
|
1223
1233
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", {
|
|
1224
|
-
className:
|
|
1225
|
-
"relative mx-1 w-full md:mx-auto md:w-3/4 lg:w-1/2",
|
|
1226
|
-
fullscreen && "md:w-5/6 lg:w-5/6"
|
|
1227
|
-
].join(" "),
|
|
1234
|
+
className: (0, import_clsx7.default)("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"),
|
|
1228
1235
|
children: [
|
|
1229
1236
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, {
|
|
1230
1237
|
children: dismissLink ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_link.default, {
|
|
@@ -1233,11 +1240,11 @@ var Modal = function(_param) {
|
|
|
1233
1240
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", {
|
|
1234
1241
|
onClick: onDismissed,
|
|
1235
1242
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(XIcon_default, {
|
|
1236
|
-
className: "absolute h-5 w-5 top-
|
|
1243
|
+
className: "absolute h-5 w-5 top-7 sm:top-20 right-4 transition-colors cursor-pointer duration-75 hover:text-blue-500 dark:text-gray-200 dark:hover:text-blue-500"
|
|
1237
1244
|
})
|
|
1238
1245
|
})
|
|
1239
1246
|
}) : dismissable ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", {
|
|
1240
|
-
className: "absolute top-
|
|
1247
|
+
className: "absolute top-7 sm:top-20 right-4 transition-colors cursor-pointer duration-75 hover:text-blue-500 dark:text-gray-200 dark:hover:text-blue-500",
|
|
1241
1248
|
type: "button",
|
|
1242
1249
|
onClick: onDismissed,
|
|
1243
1250
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(XIcon_default, {
|
|
@@ -1463,6 +1470,7 @@ var Slider_default = Slider;
|
|
|
1463
1470
|
// src/Common/ToggleSwitch.tsx
|
|
1464
1471
|
var import_formik3 = require("formik");
|
|
1465
1472
|
var import_framer_motion3 = require("framer-motion");
|
|
1473
|
+
var import_clsx8 = __toESM(require("clsx"));
|
|
1466
1474
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1467
1475
|
var Formik = function(param) {
|
|
1468
1476
|
var label = param.label, name = param.name;
|
|
@@ -1483,7 +1491,7 @@ var Formik = function(param) {
|
|
|
1483
1491
|
onChange: handleChange
|
|
1484
1492
|
}),
|
|
1485
1493
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", {
|
|
1486
|
-
className: "w-10 h-6 rounded-full p-[4px] transition-colors duration-300
|
|
1494
|
+
className: (0, import_clsx8.default)("w-10 h-6 rounded-full p-[4px] transition-colors duration-300", value ? "bg-[#00b4d8]" : "bg-[#64748b]"),
|
|
1487
1495
|
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_framer_motion3.motion.div, {
|
|
1488
1496
|
className: "w-4 h-4 bg-white rounded-full absolute top-1",
|
|
1489
1497
|
initial: false,
|
|
@@ -1524,7 +1532,7 @@ var ToggleSwitch = function(param) {
|
|
|
1524
1532
|
onChange: handleChange
|
|
1525
1533
|
}),
|
|
1526
1534
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", {
|
|
1527
|
-
className: "w-10 h-6 rounded-full p-[4px] transition-colors duration-300
|
|
1535
|
+
className: (0, import_clsx8.default)("w-10 h-6 rounded-full p-[4px] transition-colors duration-300", value ? "bg-[#00b4d8]" : "bg-[#64748b]"),
|
|
1528
1536
|
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_framer_motion3.motion.div, {
|
|
1529
1537
|
className: "w-4 h-4 bg-white rounded-full absolute top-1",
|
|
1530
1538
|
initial: false,
|
|
@@ -1590,6 +1598,7 @@ var StartIconSolid2 = function(param) {
|
|
|
1590
1598
|
};
|
|
1591
1599
|
var ArrowCircleRight_default = StartIconSolid2;
|
|
1592
1600
|
// src/Common/UserContentSwitcher.tsx
|
|
1601
|
+
var import_clsx9 = __toESM(require("clsx"));
|
|
1593
1602
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1594
1603
|
var UserContentSwitcher = function(param) {
|
|
1595
1604
|
var Icon1 = param.icon1, Icon2 = param.icon2, setGalleryMode = param.setGalleryMode, galleryMode = param.galleryMode, title1 = param.title1, title2 = param.title2;
|
|
@@ -1614,13 +1623,22 @@ var UserContentSwitcher = function(param) {
|
|
|
1614
1623
|
className: "py-2 flex flex-row w-1/2 justify-center items-center gap-1 z-10",
|
|
1615
1624
|
children: [
|
|
1616
1625
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", {
|
|
1617
|
-
className:
|
|
1626
|
+
className: (0, import_clsx9.default)("truncate", {
|
|
1627
|
+
"text-primary dark:text-blue-400": galleryMode === title1.toLowerCase(),
|
|
1628
|
+
"text-slate-500 dark:text-slate-400 opacity-90": galleryMode !== title1.toLowerCase()
|
|
1629
|
+
}),
|
|
1618
1630
|
children: title1.toLocaleUpperCase()
|
|
1619
1631
|
}),
|
|
1620
1632
|
Icon1 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon1, {
|
|
1621
|
-
className: "h-5 w-5
|
|
1633
|
+
className: (0, import_clsx9.default)("h-5 w-5", {
|
|
1634
|
+
"text-primary dark:text-blue-400": galleryMode === title1.toLowerCase(),
|
|
1635
|
+
"text-slate-500 dark:text-slate-400 opacity-90": galleryMode !== title1.toLowerCase()
|
|
1636
|
+
})
|
|
1622
1637
|
}) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PlusCircleIcon_default, {
|
|
1623
|
-
className: "h-5 w-5
|
|
1638
|
+
className: (0, import_clsx9.default)("h-5 w-5", {
|
|
1639
|
+
"text-primary dark:text-blue-400": galleryMode === title1.toLowerCase(),
|
|
1640
|
+
"text-slate-500 dark:text-slate-400 opacity-90": galleryMode !== title1.toLowerCase()
|
|
1641
|
+
})
|
|
1624
1642
|
})
|
|
1625
1643
|
]
|
|
1626
1644
|
}),
|
|
@@ -1631,13 +1649,22 @@ var UserContentSwitcher = function(param) {
|
|
|
1631
1649
|
className: "py-2 flex flex-row w-1/2 justify-center items-center gap-1 z-10",
|
|
1632
1650
|
children: [
|
|
1633
1651
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", {
|
|
1634
|
-
className:
|
|
1652
|
+
className: (0, import_clsx9.default)("truncate", {
|
|
1653
|
+
"text-primary dark:text-blue-400": galleryMode === title2.toLowerCase(),
|
|
1654
|
+
"text-slate-500 dark:text-slate-400 opacity-90": galleryMode !== title2.toLowerCase()
|
|
1655
|
+
}),
|
|
1635
1656
|
children: title2.toLocaleUpperCase()
|
|
1636
1657
|
}),
|
|
1637
1658
|
Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon2, {
|
|
1638
|
-
className: "h-5 w-5
|
|
1659
|
+
className: (0, import_clsx9.default)("h-5 w-5", {
|
|
1660
|
+
"text-primary dark:text-blue-400": galleryMode === title2.toLowerCase(),
|
|
1661
|
+
"text-slate-500 dark:text-slate-400 opacity-90": galleryMode !== title2.toLowerCase()
|
|
1662
|
+
})
|
|
1639
1663
|
}) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ArrowCircleRight_default, {
|
|
1640
|
-
className: "h-5 w-5
|
|
1664
|
+
className: (0, import_clsx9.default)("h-5 w-5", {
|
|
1665
|
+
"text-primary dark:text-blue-400": galleryMode === title2.toLowerCase(),
|
|
1666
|
+
"text-slate-500 dark:text-slate-400 opacity-90": galleryMode !== title2.toLowerCase()
|
|
1667
|
+
})
|
|
1641
1668
|
})
|
|
1642
1669
|
]
|
|
1643
1670
|
})
|
|
@@ -1672,6 +1699,7 @@ var ProgressBarSimple = function(param) {
|
|
|
1672
1699
|
};
|
|
1673
1700
|
var ProgressBarSimple_default = ProgressBarSimple;
|
|
1674
1701
|
// src/ProgressBar/ProgressBar.tsx
|
|
1702
|
+
var import_clsx10 = __toESM(require("clsx"));
|
|
1675
1703
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1676
1704
|
var ProgressBar = function(param) {
|
|
1677
1705
|
var progress = param.progress;
|
|
@@ -1681,7 +1709,7 @@ var ProgressBar = function(param) {
|
|
|
1681
1709
|
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
|
|
1682
1710
|
className: "bg-gray-100 rounded-full h-2",
|
|
1683
1711
|
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
|
|
1684
|
-
className: "rounded-full h-2
|
|
1712
|
+
className: (0, import_clsx10.default)("rounded-full h-2", progress === 100 ? "bg-green-400" : "bg-gray-100"),
|
|
1685
1713
|
style: {
|
|
1686
1714
|
width: "".concat(progress, "%"),
|
|
1687
1715
|
minWidth: "100%",
|
|
@@ -1710,7 +1738,7 @@ var ProgressStepBar = function(param) {
|
|
|
1710
1738
|
},
|
|
1711
1739
|
className: "cursor-pointer bg-gray-100 rounded-full h-2 overflow-hidden",
|
|
1712
1740
|
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
|
|
1713
|
-
className: "cursor-pointer rounded-full h-2
|
|
1741
|
+
className: (0, import_clsx10.default)("cursor-pointer rounded-full h-2", stepIndex >= i ? "bg-green-400" : "bg-gray-100"),
|
|
1714
1742
|
style: {
|
|
1715
1743
|
width: "".concat(stepIndex >= i ? 100 : 0, "%"),
|
|
1716
1744
|
transition: "width 0.3s ease"
|
package/dist/index.mjs
CHANGED
|
@@ -360,6 +360,7 @@ var Overlay = function(param) {
|
|
|
360
360
|
if (!root) {
|
|
361
361
|
root = document.createElement("div");
|
|
362
362
|
root.id = "modal-root";
|
|
363
|
+
root.classList.add(document.documentElement.classList.contains("dark") ? "dark" : "light");
|
|
363
364
|
document.body.appendChild(root);
|
|
364
365
|
}
|
|
365
366
|
setModalRoot(root);
|
|
@@ -388,6 +389,7 @@ var Overlay = function(param) {
|
|
|
388
389
|
};
|
|
389
390
|
var Overlay_default = Overlay;
|
|
390
391
|
// src/Button/Button.tsx
|
|
392
|
+
import clsx from "clsx";
|
|
391
393
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
392
394
|
var Button = function(param) {
|
|
393
395
|
var _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, loading = param.loading, onClick = param.onClick, _param_kind = param.kind, kind = _param_kind === void 0 ? "primary" : _param_kind, _param_size = param.size, size = _param_size === void 0 ? "small" : _param_size, _param_type = param.type, type = _param_type === void 0 ? "button" : _param_type, children = param.children;
|
|
@@ -430,7 +432,7 @@ var Button = function(param) {
|
|
|
430
432
|
return /* @__PURE__ */ jsx11("button", {
|
|
431
433
|
type: type || "button",
|
|
432
434
|
disabled: disabled,
|
|
433
|
-
className: "rounded-lg cursor-pointer focus:outline-none transition duration-100
|
|
435
|
+
className: clsx("rounded-lg cursor-pointer focus:outline-none transition duration-100", styled(), sized()),
|
|
434
436
|
onClick: onClick,
|
|
435
437
|
children: /* @__PURE__ */ jsx11("div", {
|
|
436
438
|
className: "w-full max-h-11",
|
|
@@ -575,6 +577,7 @@ var FunButton_default = FunButton;
|
|
|
575
577
|
// src/Button/FunRoundButton.tsx
|
|
576
578
|
import { useMemo as useMemo2 } from "react";
|
|
577
579
|
import { motion as motion2 } from "framer-motion";
|
|
580
|
+
import clsx2 from "clsx";
|
|
578
581
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
579
582
|
var FunRoundButton = function(param) {
|
|
580
583
|
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;
|
|
@@ -621,7 +624,7 @@ var FunRoundButton = function(param) {
|
|
|
621
624
|
disabled
|
|
622
625
|
]), front = _useMemo2.front, bottom = _useMemo2.bottom;
|
|
623
626
|
return /* @__PURE__ */ jsx13(motion2.button, {
|
|
624
|
-
className:
|
|
627
|
+
className: clsx2(className || "border-none p-0 flex justify-center items-center cursor-pointer z-10", disabled ? "opacity-70 cursor-default" : "hover:opacity-95"),
|
|
625
628
|
style: {
|
|
626
629
|
background: front,
|
|
627
630
|
height: size,
|
|
@@ -670,6 +673,7 @@ var FunRoundButton_default = FunRoundButton;
|
|
|
670
673
|
// src/Checkbox/Checkbox.tsx
|
|
671
674
|
import { useMemo as useMemo3 } from "react";
|
|
672
675
|
import { useField } from "formik";
|
|
676
|
+
import clsx3 from "clsx";
|
|
673
677
|
import { jsx as jsx14, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
674
678
|
var Checkbox = function(param) {
|
|
675
679
|
var name = param.name, labelText = param.labelText, isLarge = param.isLarge, onChange = param.onChange, isDisabled = param.isDisabled;
|
|
@@ -698,7 +702,7 @@ var Checkbox = function(param) {
|
|
|
698
702
|
name: name,
|
|
699
703
|
type: "checkbox",
|
|
700
704
|
checked: !!value,
|
|
701
|
-
className: "form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded
|
|
705
|
+
className: clsx3("form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded", isLarge ? "h-5 w-5" : "h-4 w-4")
|
|
702
706
|
}),
|
|
703
707
|
typeof labelText === "string" ? /* @__PURE__ */ jsx14("label", {
|
|
704
708
|
htmlFor: "".concat(name).concat(rand),
|
|
@@ -748,7 +752,7 @@ var MultiChoiceCheckBox = function(param) {
|
|
|
748
752
|
id: name,
|
|
749
753
|
name: name,
|
|
750
754
|
type: "checkbox",
|
|
751
|
-
className: "form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded
|
|
755
|
+
className: clsx3("form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded", isLarge ? "h-5 w-5" : "h-4 w-4")
|
|
752
756
|
})
|
|
753
757
|
})
|
|
754
758
|
});
|
|
@@ -756,6 +760,7 @@ var MultiChoiceCheckBox = function(param) {
|
|
|
756
760
|
Checkbox.Multi = MultiChoiceCheckBox;
|
|
757
761
|
var Checkbox_default = Checkbox;
|
|
758
762
|
// src/Checkbox/RadioOption.tsx
|
|
763
|
+
import clsx4 from "clsx";
|
|
759
764
|
import { useField as useField2 } from "formik";
|
|
760
765
|
import { jsx as jsx15, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
761
766
|
var RadioOption = function(param) {
|
|
@@ -774,7 +779,7 @@ var RadioOption = function(param) {
|
|
|
774
779
|
name: name,
|
|
775
780
|
type: "checkbox",
|
|
776
781
|
checked: value === option,
|
|
777
|
-
className: "form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded
|
|
782
|
+
className: clsx4("form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded", isLarge ? "h-5 w-5" : "h-4 w-4")
|
|
778
783
|
}),
|
|
779
784
|
typeof labelText === "string" ? /* @__PURE__ */ jsx15("label", {
|
|
780
785
|
htmlFor: option,
|
|
@@ -891,9 +896,12 @@ var BAWrapper = function(props) {
|
|
|
891
896
|
return ReactDOM2.createPortal(/* @__PURE__ */ jsx16(BottomAlert, _object_spread({}, props)), document.body);
|
|
892
897
|
};
|
|
893
898
|
var BottomAlert_default = BAWrapper;
|
|
899
|
+
// src/Common/IconInfo.tsx
|
|
900
|
+
import clsx6 from "clsx";
|
|
894
901
|
// src/Common/Tippy.tsx
|
|
895
902
|
import { useState as useState2, useRef, useEffect as useEffect2 } from "react";
|
|
896
903
|
import { useFloating, useInteractions, useHover, useRole, useDismiss, offset, flip, shift, arrow, FloatingArrow, FloatingPortal } from "@floating-ui/react";
|
|
904
|
+
import clsx5 from "clsx";
|
|
897
905
|
import { Fragment, jsx as jsx17, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
898
906
|
var Tippy = function(param) {
|
|
899
907
|
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;
|
|
@@ -935,12 +943,13 @@ var Tippy = function(param) {
|
|
|
935
943
|
children: [
|
|
936
944
|
/* @__PURE__ */ jsx17("div", _object_spread_props(_object_spread({
|
|
937
945
|
ref: refs.setFloating,
|
|
938
|
-
className: "
|
|
946
|
+
className: clsx5("".concat(className || tippyClassname))
|
|
939
947
|
}, getFloatingProps()), {
|
|
940
948
|
style: {
|
|
941
949
|
position: strategy,
|
|
942
950
|
top: y !== null && y !== void 0 ? y : 0,
|
|
943
951
|
left: x !== null && x !== void 0 ? x : 0,
|
|
952
|
+
zIndex: 9999,
|
|
944
953
|
width: "max-content"
|
|
945
954
|
},
|
|
946
955
|
children: content
|
|
@@ -977,7 +986,7 @@ var IconInfo = function(param) {
|
|
|
977
986
|
children: [
|
|
978
987
|
icon,
|
|
979
988
|
/* @__PURE__ */ jsx18("p", {
|
|
980
|
-
className: "absolute -bottom-1
|
|
989
|
+
className: clsx6("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"),
|
|
981
990
|
children: number
|
|
982
991
|
})
|
|
983
992
|
]
|
|
@@ -1006,6 +1015,7 @@ var XIcon = function(param) {
|
|
|
1006
1015
|
};
|
|
1007
1016
|
var XIcon_default = XIcon;
|
|
1008
1017
|
// src/Common/Modal.tsx
|
|
1018
|
+
import clsx7 from "clsx";
|
|
1009
1019
|
import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1010
1020
|
var Modal = function(_param) {
|
|
1011
1021
|
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, [
|
|
@@ -1028,15 +1038,12 @@ var Modal = function(_param) {
|
|
|
1028
1038
|
withContainer: true
|
|
1029
1039
|
}, props), {
|
|
1030
1040
|
children: /* @__PURE__ */ jsx20("div", {
|
|
1031
|
-
className:
|
|
1041
|
+
className: clsx7(displayDark && "dark", "bg-slate-900/20 fixed inset-0 flex items-center justify-center"),
|
|
1032
1042
|
style: {
|
|
1033
1043
|
zIndex: 1e4
|
|
1034
1044
|
},
|
|
1035
1045
|
children: /* @__PURE__ */ jsxs9("div", {
|
|
1036
|
-
className:
|
|
1037
|
-
"relative mx-1 w-full md:mx-auto md:w-3/4 lg:w-1/2",
|
|
1038
|
-
fullscreen && "md:w-5/6 lg:w-5/6"
|
|
1039
|
-
].join(" "),
|
|
1046
|
+
className: clsx7("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"),
|
|
1040
1047
|
children: [
|
|
1041
1048
|
/* @__PURE__ */ jsx20(Fragment2, {
|
|
1042
1049
|
children: dismissLink ? /* @__PURE__ */ jsx20(Link, {
|
|
@@ -1045,11 +1052,11 @@ var Modal = function(_param) {
|
|
|
1045
1052
|
children: /* @__PURE__ */ jsx20("div", {
|
|
1046
1053
|
onClick: onDismissed,
|
|
1047
1054
|
children: /* @__PURE__ */ jsx20(XIcon_default, {
|
|
1048
|
-
className: "absolute h-5 w-5 top-
|
|
1055
|
+
className: "absolute h-5 w-5 top-7 sm:top-20 right-4 transition-colors cursor-pointer duration-75 hover:text-blue-500 dark:text-gray-200 dark:hover:text-blue-500"
|
|
1049
1056
|
})
|
|
1050
1057
|
})
|
|
1051
1058
|
}) : dismissable ? /* @__PURE__ */ jsx20("button", {
|
|
1052
|
-
className: "absolute top-
|
|
1059
|
+
className: "absolute top-7 sm:top-20 right-4 transition-colors cursor-pointer duration-75 hover:text-blue-500 dark:text-gray-200 dark:hover:text-blue-500",
|
|
1053
1060
|
type: "button",
|
|
1054
1061
|
onClick: onDismissed,
|
|
1055
1062
|
children: /* @__PURE__ */ jsx20(XIcon_default, {
|
|
@@ -1275,6 +1282,7 @@ var Slider_default = Slider;
|
|
|
1275
1282
|
// src/Common/ToggleSwitch.tsx
|
|
1276
1283
|
import { useField as useField3 } from "formik";
|
|
1277
1284
|
import { motion as motion3 } from "framer-motion";
|
|
1285
|
+
import clsx8 from "clsx";
|
|
1278
1286
|
import { jsx as jsx26, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1279
1287
|
var Formik = function(param) {
|
|
1280
1288
|
var label = param.label, name = param.name;
|
|
@@ -1295,7 +1303,7 @@ var Formik = function(param) {
|
|
|
1295
1303
|
onChange: handleChange
|
|
1296
1304
|
}),
|
|
1297
1305
|
/* @__PURE__ */ jsx26("div", {
|
|
1298
|
-
className: "w-10 h-6 rounded-full p-[4px] transition-colors duration-300
|
|
1306
|
+
className: clsx8("w-10 h-6 rounded-full p-[4px] transition-colors duration-300", value ? "bg-[#00b4d8]" : "bg-[#64748b]"),
|
|
1299
1307
|
children: /* @__PURE__ */ jsx26(motion3.div, {
|
|
1300
1308
|
className: "w-4 h-4 bg-white rounded-full absolute top-1",
|
|
1301
1309
|
initial: false,
|
|
@@ -1336,7 +1344,7 @@ var ToggleSwitch = function(param) {
|
|
|
1336
1344
|
onChange: handleChange
|
|
1337
1345
|
}),
|
|
1338
1346
|
/* @__PURE__ */ jsx26("div", {
|
|
1339
|
-
className: "w-10 h-6 rounded-full p-[4px] transition-colors duration-300
|
|
1347
|
+
className: clsx8("w-10 h-6 rounded-full p-[4px] transition-colors duration-300", value ? "bg-[#00b4d8]" : "bg-[#64748b]"),
|
|
1340
1348
|
children: /* @__PURE__ */ jsx26(motion3.div, {
|
|
1341
1349
|
className: "w-4 h-4 bg-white rounded-full absolute top-1",
|
|
1342
1350
|
initial: false,
|
|
@@ -1402,6 +1410,7 @@ var StartIconSolid2 = function(param) {
|
|
|
1402
1410
|
};
|
|
1403
1411
|
var ArrowCircleRight_default = StartIconSolid2;
|
|
1404
1412
|
// src/Common/UserContentSwitcher.tsx
|
|
1413
|
+
import clsx9 from "clsx";
|
|
1405
1414
|
import { jsx as jsx29, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1406
1415
|
var UserContentSwitcher = function(param) {
|
|
1407
1416
|
var Icon1 = param.icon1, Icon2 = param.icon2, setGalleryMode = param.setGalleryMode, galleryMode = param.galleryMode, title1 = param.title1, title2 = param.title2;
|
|
@@ -1426,13 +1435,22 @@ var UserContentSwitcher = function(param) {
|
|
|
1426
1435
|
className: "py-2 flex flex-row w-1/2 justify-center items-center gap-1 z-10",
|
|
1427
1436
|
children: [
|
|
1428
1437
|
/* @__PURE__ */ jsx29("span", {
|
|
1429
|
-
className: "truncate
|
|
1438
|
+
className: clsx9("truncate", {
|
|
1439
|
+
"text-primary dark:text-blue-400": galleryMode === title1.toLowerCase(),
|
|
1440
|
+
"text-slate-500 dark:text-slate-400 opacity-90": galleryMode !== title1.toLowerCase()
|
|
1441
|
+
}),
|
|
1430
1442
|
children: title1.toLocaleUpperCase()
|
|
1431
1443
|
}),
|
|
1432
1444
|
Icon1 ? /* @__PURE__ */ jsx29(Icon1, {
|
|
1433
|
-
className: "h-5 w-5
|
|
1445
|
+
className: clsx9("h-5 w-5", {
|
|
1446
|
+
"text-primary dark:text-blue-400": galleryMode === title1.toLowerCase(),
|
|
1447
|
+
"text-slate-500 dark:text-slate-400 opacity-90": galleryMode !== title1.toLowerCase()
|
|
1448
|
+
})
|
|
1434
1449
|
}) : /* @__PURE__ */ jsx29(PlusCircleIcon_default, {
|
|
1435
|
-
className: "h-5 w-5
|
|
1450
|
+
className: clsx9("h-5 w-5", {
|
|
1451
|
+
"text-primary dark:text-blue-400": galleryMode === title1.toLowerCase(),
|
|
1452
|
+
"text-slate-500 dark:text-slate-400 opacity-90": galleryMode !== title1.toLowerCase()
|
|
1453
|
+
})
|
|
1436
1454
|
})
|
|
1437
1455
|
]
|
|
1438
1456
|
}),
|
|
@@ -1443,13 +1461,22 @@ var UserContentSwitcher = function(param) {
|
|
|
1443
1461
|
className: "py-2 flex flex-row w-1/2 justify-center items-center gap-1 z-10",
|
|
1444
1462
|
children: [
|
|
1445
1463
|
/* @__PURE__ */ jsx29("span", {
|
|
1446
|
-
className: "truncate
|
|
1464
|
+
className: clsx9("truncate", {
|
|
1465
|
+
"text-primary dark:text-blue-400": galleryMode === title2.toLowerCase(),
|
|
1466
|
+
"text-slate-500 dark:text-slate-400 opacity-90": galleryMode !== title2.toLowerCase()
|
|
1467
|
+
}),
|
|
1447
1468
|
children: title2.toLocaleUpperCase()
|
|
1448
1469
|
}),
|
|
1449
1470
|
Icon2 ? /* @__PURE__ */ jsx29(Icon2, {
|
|
1450
|
-
className: "h-5 w-5
|
|
1471
|
+
className: clsx9("h-5 w-5", {
|
|
1472
|
+
"text-primary dark:text-blue-400": galleryMode === title2.toLowerCase(),
|
|
1473
|
+
"text-slate-500 dark:text-slate-400 opacity-90": galleryMode !== title2.toLowerCase()
|
|
1474
|
+
})
|
|
1451
1475
|
}) : /* @__PURE__ */ jsx29(ArrowCircleRight_default, {
|
|
1452
|
-
className: "h-5 w-5
|
|
1476
|
+
className: clsx9("h-5 w-5", {
|
|
1477
|
+
"text-primary dark:text-blue-400": galleryMode === title2.toLowerCase(),
|
|
1478
|
+
"text-slate-500 dark:text-slate-400 opacity-90": galleryMode !== title2.toLowerCase()
|
|
1479
|
+
})
|
|
1453
1480
|
})
|
|
1454
1481
|
]
|
|
1455
1482
|
})
|
|
@@ -1484,6 +1511,7 @@ var ProgressBarSimple = function(param) {
|
|
|
1484
1511
|
};
|
|
1485
1512
|
var ProgressBarSimple_default = ProgressBarSimple;
|
|
1486
1513
|
// src/ProgressBar/ProgressBar.tsx
|
|
1514
|
+
import clsx10 from "clsx";
|
|
1487
1515
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1488
1516
|
var ProgressBar = function(param) {
|
|
1489
1517
|
var progress = param.progress;
|
|
@@ -1493,7 +1521,7 @@ var ProgressBar = function(param) {
|
|
|
1493
1521
|
children: /* @__PURE__ */ jsx31("div", {
|
|
1494
1522
|
className: "bg-gray-100 rounded-full h-2",
|
|
1495
1523
|
children: /* @__PURE__ */ jsx31("div", {
|
|
1496
|
-
className: "rounded-full h-2
|
|
1524
|
+
className: clsx10("rounded-full h-2", progress === 100 ? "bg-green-400" : "bg-gray-100"),
|
|
1497
1525
|
style: {
|
|
1498
1526
|
width: "".concat(progress, "%"),
|
|
1499
1527
|
minWidth: "100%",
|
|
@@ -1522,7 +1550,7 @@ var ProgressStepBar = function(param) {
|
|
|
1522
1550
|
},
|
|
1523
1551
|
className: "cursor-pointer bg-gray-100 rounded-full h-2 overflow-hidden",
|
|
1524
1552
|
children: /* @__PURE__ */ jsx31("div", {
|
|
1525
|
-
className: "cursor-pointer rounded-full h-2
|
|
1553
|
+
className: clsx10("cursor-pointer rounded-full h-2", stepIndex >= i ? "bg-green-400" : "bg-gray-100"),
|
|
1526
1554
|
style: {
|
|
1527
1555
|
width: "".concat(stepIndex >= i ? 100 : 0, "%"),
|
|
1528
1556
|
transition: "width 0.3s ease"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "evelearn-theme",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.12",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -42,5 +42,8 @@
|
|
|
42
42
|
"react-dom": "^19.1.0",
|
|
43
43
|
"tailwindcss": "^4.0.0",
|
|
44
44
|
"use-debounce": "^10.0.4"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"clsx": "^2.1.1"
|
|
45
48
|
}
|
|
46
49
|
}
|