catchup-library-web 2.5.2 → 2.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1235,12 +1235,13 @@ var import_jsx_runtime17 = require("react/jsx-runtime");
1235
1235
  var BaseModal = ({
1236
1236
  title,
1237
1237
  isOpen,
1238
- size,
1238
+ size = "medium",
1239
1239
  onAfterOpen,
1240
1240
  onRequestClose,
1241
1241
  customSize,
1242
1242
  children
1243
1243
  }) => {
1244
+ const sizeClass = customSize != null ? customSize : size === "small" ? "w-[600px]" : size === "medium" ? "w-[900px]" : "w-[600px] lg:w-[900px] xl:w-[1200px] 2xl:w-[1500px]";
1244
1245
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1245
1246
  import_react_modal.default,
1246
1247
  {
@@ -1251,14 +1252,9 @@ var BaseModal = ({
1251
1252
  content: {
1252
1253
  top: "50%",
1253
1254
  left: "50%",
1254
- right: "auto",
1255
- bottom: "auto",
1256
- marginRight: "-50%",
1257
1255
  transform: "translate(-50%, -50%)",
1258
1256
  padding: 0,
1259
1257
  borderRadius: 20,
1260
- background: "",
1261
- border: "",
1262
1258
  maxHeight: "98%",
1263
1259
  overflow: "visible",
1264
1260
  zIndex: 20
@@ -1269,34 +1265,22 @@ var BaseModal = ({
1269
1265
  }
1270
1266
  },
1271
1267
  contentLabel: "",
1272
- children: customSize ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1273
- "div",
1274
- {
1275
- className: `${customSize} font-quicksand max-h-[calc(98vh-48px)] overflow-auto`,
1276
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FullCard_default, { children })
1277
- }
1278
- ) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1279
- "div",
1280
- {
1281
- className: `font-quicksand ${size === "small" ? "w-[600px]" : size === "medium" ? "w-[900px]" : "w-[600px] lg:w-[900px] xl:w-[1200px] 2xl:w-[1500px]"}`,
1282
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(FullCard_default, { children: [
1283
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-row justify-between", children: [
1284
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BaseTitle_default, { title }),
1285
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1286
- BaseImage_default,
1287
- {
1288
- src: "/icons/cross-red.webp",
1289
- alt: "cross-red",
1290
- size: "medium",
1291
- onClick: onRequestClose
1292
- }
1293
- )
1294
- ] }),
1295
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DividerLine_default, {}),
1296
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "max-h-[calc(98vh-120px)] overflow-auto", children })
1297
- ] })
1298
- }
1299
- )
1268
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: `${sizeClass} font-quicksand max-h-[calc(98vh-48px)]`, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(FullCard_default, { children: [
1269
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-row justify-between", children: [
1270
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BaseTitle_default, { title }),
1271
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1272
+ BaseImage_default,
1273
+ {
1274
+ src: "/icons/cross-red.webp",
1275
+ alt: "cross-red",
1276
+ size: "medium",
1277
+ onClick: onRequestClose
1278
+ }
1279
+ )
1280
+ ] }),
1281
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DividerLine_default, {}),
1282
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "max-h-[calc(98vh-120px)] overflow-auto", children })
1283
+ ] }) })
1300
1284
  }
1301
1285
  );
1302
1286
  };
package/dist/index.mjs CHANGED
@@ -1002,12 +1002,13 @@ import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
1002
1002
  var BaseModal = ({
1003
1003
  title,
1004
1004
  isOpen,
1005
- size,
1005
+ size = "medium",
1006
1006
  onAfterOpen,
1007
1007
  onRequestClose,
1008
1008
  customSize,
1009
1009
  children
1010
1010
  }) => {
1011
+ const sizeClass = customSize != null ? customSize : size === "small" ? "w-[600px]" : size === "medium" ? "w-[900px]" : "w-[600px] lg:w-[900px] xl:w-[1200px] 2xl:w-[1500px]";
1011
1012
  return /* @__PURE__ */ jsx17(
1012
1013
  Modal,
1013
1014
  {
@@ -1018,14 +1019,9 @@ var BaseModal = ({
1018
1019
  content: {
1019
1020
  top: "50%",
1020
1021
  left: "50%",
1021
- right: "auto",
1022
- bottom: "auto",
1023
- marginRight: "-50%",
1024
1022
  transform: "translate(-50%, -50%)",
1025
1023
  padding: 0,
1026
1024
  borderRadius: 20,
1027
- background: "",
1028
- border: "",
1029
1025
  maxHeight: "98%",
1030
1026
  overflow: "visible",
1031
1027
  zIndex: 20
@@ -1036,34 +1032,22 @@ var BaseModal = ({
1036
1032
  }
1037
1033
  },
1038
1034
  contentLabel: "",
1039
- children: customSize ? /* @__PURE__ */ jsx17(
1040
- "div",
1041
- {
1042
- className: `${customSize} font-quicksand max-h-[calc(98vh-48px)] overflow-auto`,
1043
- children: /* @__PURE__ */ jsx17(FullCard_default, { children })
1044
- }
1045
- ) : /* @__PURE__ */ jsx17(
1046
- "div",
1047
- {
1048
- className: `font-quicksand ${size === "small" ? "w-[600px]" : size === "medium" ? "w-[900px]" : "w-[600px] lg:w-[900px] xl:w-[1200px] 2xl:w-[1500px]"}`,
1049
- children: /* @__PURE__ */ jsxs11(FullCard_default, { children: [
1050
- /* @__PURE__ */ jsxs11("div", { className: "flex flex-row justify-between", children: [
1051
- /* @__PURE__ */ jsx17(BaseTitle_default, { title }),
1052
- /* @__PURE__ */ jsx17(
1053
- BaseImage_default,
1054
- {
1055
- src: "/icons/cross-red.webp",
1056
- alt: "cross-red",
1057
- size: "medium",
1058
- onClick: onRequestClose
1059
- }
1060
- )
1061
- ] }),
1062
- /* @__PURE__ */ jsx17(DividerLine_default, {}),
1063
- /* @__PURE__ */ jsx17("div", { className: "max-h-[calc(98vh-120px)] overflow-auto", children })
1064
- ] })
1065
- }
1066
- )
1035
+ children: /* @__PURE__ */ jsx17("div", { className: `${sizeClass} font-quicksand max-h-[calc(98vh-48px)]`, children: /* @__PURE__ */ jsxs11(FullCard_default, { children: [
1036
+ /* @__PURE__ */ jsxs11("div", { className: "flex flex-row justify-between", children: [
1037
+ /* @__PURE__ */ jsx17(BaseTitle_default, { title }),
1038
+ /* @__PURE__ */ jsx17(
1039
+ BaseImage_default,
1040
+ {
1041
+ src: "/icons/cross-red.webp",
1042
+ alt: "cross-red",
1043
+ size: "medium",
1044
+ onClick: onRequestClose
1045
+ }
1046
+ )
1047
+ ] }),
1048
+ /* @__PURE__ */ jsx17(DividerLine_default, {}),
1049
+ /* @__PURE__ */ jsx17("div", { className: "max-h-[calc(98vh-120px)] overflow-auto", children })
1050
+ ] }) })
1067
1051
  }
1068
1052
  );
1069
1053
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catchup-library-web",
3
- "version": "2.5.2",
3
+ "version": "2.5.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -8,12 +8,20 @@ import DividerLine from "../dividers/DividerLine";
8
8
  const BaseModal = ({
9
9
  title,
10
10
  isOpen,
11
- size,
11
+ size = "medium",
12
12
  onAfterOpen,
13
13
  onRequestClose,
14
14
  customSize,
15
15
  children,
16
16
  }: IModalProps) => {
17
+ const sizeClass =
18
+ customSize ??
19
+ (size === "small"
20
+ ? "w-[600px]"
21
+ : size === "medium"
22
+ ? "w-[900px]"
23
+ : "w-[600px] lg:w-[900px] xl:w-[1200px] 2xl:w-[1500px]");
24
+
17
25
  return (
18
26
  <Modal
19
27
  isOpen={isOpen}
@@ -23,14 +31,9 @@ const BaseModal = ({
23
31
  content: {
24
32
  top: "50%",
25
33
  left: "50%",
26
- right: "auto",
27
- bottom: "auto",
28
- marginRight: "-50%",
29
34
  transform: "translate(-50%, -50%)",
30
35
  padding: 0,
31
36
  borderRadius: 20,
32
- background: "",
33
- border: "",
34
37
  maxHeight: "98%",
35
38
  overflow: "visible",
36
39
  zIndex: 20,
@@ -42,39 +45,25 @@ const BaseModal = ({
42
45
  }}
43
46
  contentLabel=""
44
47
  >
45
- {customSize ? (
46
- <div
47
- className={`${customSize} font-quicksand max-h-[calc(98vh-48px)] overflow-auto`}
48
- >
49
- <FullCard>{children}</FullCard>
50
- </div>
51
- ) : (
52
- <div
53
- className={`font-quicksand ${
54
- size === "small"
55
- ? "w-[600px]"
56
- : size === "medium"
57
- ? "w-[900px]"
58
- : "w-[600px] lg:w-[900px] xl:w-[1200px] 2xl:w-[1500px]"
59
- }`}
60
- >
61
- <FullCard>
62
- <div className="flex flex-row justify-between">
63
- <BaseTitle title={title} />
64
- <BaseImage
65
- src="/icons/cross-red.webp"
66
- alt="cross-red"
67
- size="medium"
68
- onClick={onRequestClose}
69
- />
70
- </div>
71
- <DividerLine />
72
- <div className="max-h-[calc(98vh-120px)] overflow-auto">
73
- {children}
74
- </div>
75
- </FullCard>
76
- </div>
77
- )}
48
+ <div className={`${sizeClass} font-quicksand max-h-[calc(98vh-48px)]`}>
49
+ <FullCard>
50
+ <div className="flex flex-row justify-between">
51
+ <BaseTitle title={title} />
52
+ <BaseImage
53
+ src="/icons/cross-red.webp"
54
+ alt="cross-red"
55
+ size="medium"
56
+ onClick={onRequestClose}
57
+ />
58
+ </div>
59
+
60
+ <DividerLine />
61
+
62
+ <div className="max-h-[calc(98vh-120px)] overflow-auto">
63
+ {children}
64
+ </div>
65
+ </FullCard>
66
+ </div>
78
67
  </Modal>
79
68
  );
80
69
  };