evelearn-theme 2.0.10 → 2.0.11

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
@@ -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);
@@ -1194,6 +1195,7 @@ var XIcon = function(param) {
1194
1195
  };
1195
1196
  var XIcon_default = XIcon;
1196
1197
  // src/Common/Modal.tsx
1198
+ var import_clsx = __toESM(require("clsx"));
1197
1199
  var import_jsx_runtime20 = require("react/jsx-runtime");
1198
1200
  var Modal = function(_param) {
1199
1201
  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, [
@@ -1221,10 +1223,7 @@ var Modal = function(_param) {
1221
1223
  zIndex: 1e4
1222
1224
  },
1223
1225
  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(" "),
1226
+ className: (0, import_clsx.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
1227
  children: [
1229
1228
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, {
1230
1229
  children: dismissLink ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_link.default, {
@@ -1233,11 +1232,11 @@ var Modal = function(_param) {
1233
1232
  children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", {
1234
1233
  onClick: onDismissed,
1235
1234
  children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(XIcon_default, {
1236
- 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"
1235
+ 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
1236
  })
1238
1237
  })
1239
1238
  }) : dismissable ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", {
1240
- 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",
1239
+ 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
1240
  type: "button",
1242
1241
  onClick: onDismissed,
1243
1242
  children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(XIcon_default, {
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);
@@ -1006,6 +1007,7 @@ var XIcon = function(param) {
1006
1007
  };
1007
1008
  var XIcon_default = XIcon;
1008
1009
  // src/Common/Modal.tsx
1010
+ import clsx from "clsx";
1009
1011
  import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
1010
1012
  var Modal = function(_param) {
1011
1013
  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, [
@@ -1033,10 +1035,7 @@ var Modal = function(_param) {
1033
1035
  zIndex: 1e4
1034
1036
  },
1035
1037
  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(" "),
1038
+ className: clsx("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
1039
  children: [
1041
1040
  /* @__PURE__ */ jsx20(Fragment2, {
1042
1041
  children: dismissLink ? /* @__PURE__ */ jsx20(Link, {
@@ -1045,11 +1044,11 @@ var Modal = function(_param) {
1045
1044
  children: /* @__PURE__ */ jsx20("div", {
1046
1045
  onClick: onDismissed,
1047
1046
  children: /* @__PURE__ */ jsx20(XIcon_default, {
1048
- 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"
1047
+ 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
1048
  })
1050
1049
  })
1051
1050
  }) : dismissable ? /* @__PURE__ */ jsx20("button", {
1052
- 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",
1051
+ 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
1052
  type: "button",
1054
1053
  onClick: onDismissed,
1055
1054
  children: /* @__PURE__ */ jsx20(XIcon_default, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evelearn-theme",
3
- "version": "2.0.10",
3
+ "version": "2.0.11",
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
  }