catchup-library-web 1.4.11 → 1.4.13
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 +35 -23
- package/dist/index.mjs +35 -23
- package/package.json +1 -1
- package/src/components/activities/material-content/MCMAActivityMaterialContent.tsx +10 -12
- package/src/components/activities/material-content/MCSAActivityMaterialContent.tsx +10 -12
- package/src/components/groups/InputGroup.tsx +2 -2
- package/src/components/loading/BaseLoading.tsx +11 -3
package/dist/index.js
CHANGED
|
@@ -247,37 +247,49 @@ var BaseLoading = ({
|
|
|
247
247
|
}) => {
|
|
248
248
|
let currentHeight;
|
|
249
249
|
let currentWidth;
|
|
250
|
+
let currentMargin;
|
|
250
251
|
if (size === "small") {
|
|
251
|
-
currentHeight =
|
|
252
|
-
currentWidth =
|
|
252
|
+
currentHeight = 16;
|
|
253
|
+
currentWidth = 16;
|
|
254
|
+
currentMargin = 4;
|
|
253
255
|
} else if (size === "medium") {
|
|
254
256
|
currentHeight = 48;
|
|
255
257
|
currentWidth = 48;
|
|
258
|
+
currentMargin = 12;
|
|
256
259
|
} else if (size === "large") {
|
|
257
260
|
currentHeight = 72;
|
|
258
261
|
currentWidth = 72;
|
|
262
|
+
currentMargin = 18;
|
|
259
263
|
} else if (size === "xlarge") {
|
|
260
264
|
currentHeight = 96;
|
|
261
265
|
currentWidth = 96;
|
|
266
|
+
currentMargin = 24;
|
|
262
267
|
} else {
|
|
263
268
|
currentHeight = height;
|
|
264
269
|
currentWidth = width;
|
|
265
270
|
}
|
|
266
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
267
|
-
|
|
268
|
-
{
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
272
|
+
"div",
|
|
273
|
+
{
|
|
274
|
+
className: "flex justify-center items-center",
|
|
275
|
+
style: { marginTop: currentMargin, marginBottom: currentMargin },
|
|
276
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
277
|
+
import_react_loader_spinner.Oval,
|
|
278
|
+
{
|
|
279
|
+
height: currentHeight,
|
|
280
|
+
width: currentWidth,
|
|
281
|
+
wrapperStyle: {},
|
|
282
|
+
wrapperClass: "",
|
|
283
|
+
visible: true,
|
|
284
|
+
ariaLabel: "oval-loading",
|
|
285
|
+
color: primaryColor,
|
|
286
|
+
secondaryColor,
|
|
287
|
+
strokeWidth: 2,
|
|
288
|
+
strokeWidthSecondary: 2
|
|
289
|
+
}
|
|
290
|
+
)
|
|
291
|
+
}
|
|
292
|
+
);
|
|
281
293
|
};
|
|
282
294
|
var BaseLoading_default = BaseLoading;
|
|
283
295
|
|
|
@@ -3723,7 +3735,7 @@ var InputGroup = ({
|
|
|
3723
3735
|
{
|
|
3724
3736
|
ref: textAreaRef,
|
|
3725
3737
|
disabled,
|
|
3726
|
-
className: `w-full h-[44px] ${useMinHeight ? "min-h-[250px]" : ""} resize-none overflow-hidden py-2 px-4 border ${errorText ? "border-catchup-red shadow-error placeholder:text-catchup-red placeholder:opacity-80" : "border-catchup-gray-100"} placeholder-catchup-gray-200 rounded-catchup-large focus:outline-none focus:border-catchup-blue-400 ${disabled ? "bg-catchup-lighter-gray" :
|
|
3738
|
+
className: `w-full h-[44px] ${useMinHeight ? "min-h-[250px]" : ""} resize-none overflow-hidden py-2 px-4 border ${errorText ? "border-catchup-red shadow-error placeholder:text-catchup-red placeholder:opacity-80" : "border-catchup-gray-100"} placeholder-catchup-gray-200 rounded-catchup-large focus:outline-none focus:border-catchup-blue-400 ${disabled ? "bg-catchup-lighter-gray" : ""} focus:shadow-input`,
|
|
3727
3739
|
placeholder: errorText ? errorText : placeholder,
|
|
3728
3740
|
value,
|
|
3729
3741
|
onLoad: (e) => {
|
|
@@ -3743,7 +3755,7 @@ var InputGroup = ({
|
|
|
3743
3755
|
"input",
|
|
3744
3756
|
{
|
|
3745
3757
|
disabled,
|
|
3746
|
-
className: `w-full py-2 px-4 border ${errorText ? "border-catchup-red shadow-error placeholder:text-catchup-red placeholder:opacity-80" : "border-catchup-gray-100"} rounded-catchup-large focus:outline-none placeholder-catchup-gray-200 focus:border-catchup-blue-400 ${disabled ? "bg-catchup-lighter-gray" :
|
|
3758
|
+
className: `w-full py-2 px-4 border ${errorText ? "border-catchup-red shadow-error placeholder:text-catchup-red placeholder:opacity-80" : "border-catchup-gray-100"} rounded-catchup-large focus:outline-none placeholder-catchup-gray-200 focus:border-catchup-blue-400 ${disabled ? "bg-catchup-lighter-gray" : ""} focus:shadow-input`,
|
|
3747
3759
|
type,
|
|
3748
3760
|
defaultValue,
|
|
3749
3761
|
placeholder: errorText ? errorText : placeholder,
|
|
@@ -5386,7 +5398,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
5386
5398
|
onChange(answer, materialKey, materialSubKey);
|
|
5387
5399
|
},
|
|
5388
5400
|
children: [
|
|
5389
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5401
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5390
5402
|
BaseImage_default,
|
|
5391
5403
|
{
|
|
5392
5404
|
src: answerMap[materialKey].includes(materialSubKey) ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -5395,7 +5407,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
5395
5407
|
onClick: () => {
|
|
5396
5408
|
}
|
|
5397
5409
|
}
|
|
5398
|
-
)
|
|
5410
|
+
),
|
|
5399
5411
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5400
5412
|
materialSubKey
|
|
5401
5413
|
).map((inputPart, index3) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
@@ -5536,7 +5548,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
5536
5548
|
onChange(answer, materialKey, materialSubKey);
|
|
5537
5549
|
},
|
|
5538
5550
|
children: [
|
|
5539
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5551
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5540
5552
|
BaseImage_default,
|
|
5541
5553
|
{
|
|
5542
5554
|
src: answerMap[materialKey] === materialSubKey ? "/icons/item-element.webp" : "/icons/not-selected-item-element.webp",
|
|
@@ -5545,7 +5557,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
5545
5557
|
onClick: () => {
|
|
5546
5558
|
}
|
|
5547
5559
|
}
|
|
5548
|
-
)
|
|
5560
|
+
),
|
|
5549
5561
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5550
5562
|
materialSubKey
|
|
5551
5563
|
).map((inputPart, index3) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
package/dist/index.mjs
CHANGED
|
@@ -56,37 +56,49 @@ var BaseLoading = ({
|
|
|
56
56
|
}) => {
|
|
57
57
|
let currentHeight;
|
|
58
58
|
let currentWidth;
|
|
59
|
+
let currentMargin;
|
|
59
60
|
if (size === "small") {
|
|
60
|
-
currentHeight =
|
|
61
|
-
currentWidth =
|
|
61
|
+
currentHeight = 16;
|
|
62
|
+
currentWidth = 16;
|
|
63
|
+
currentMargin = 4;
|
|
62
64
|
} else if (size === "medium") {
|
|
63
65
|
currentHeight = 48;
|
|
64
66
|
currentWidth = 48;
|
|
67
|
+
currentMargin = 12;
|
|
65
68
|
} else if (size === "large") {
|
|
66
69
|
currentHeight = 72;
|
|
67
70
|
currentWidth = 72;
|
|
71
|
+
currentMargin = 18;
|
|
68
72
|
} else if (size === "xlarge") {
|
|
69
73
|
currentHeight = 96;
|
|
70
74
|
currentWidth = 96;
|
|
75
|
+
currentMargin = 24;
|
|
71
76
|
} else {
|
|
72
77
|
currentHeight = height;
|
|
73
78
|
currentWidth = width;
|
|
74
79
|
}
|
|
75
|
-
return /* @__PURE__ */ jsx(
|
|
76
|
-
|
|
77
|
-
{
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
80
|
+
return /* @__PURE__ */ jsx(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
className: "flex justify-center items-center",
|
|
84
|
+
style: { marginTop: currentMargin, marginBottom: currentMargin },
|
|
85
|
+
children: /* @__PURE__ */ jsx(
|
|
86
|
+
Oval,
|
|
87
|
+
{
|
|
88
|
+
height: currentHeight,
|
|
89
|
+
width: currentWidth,
|
|
90
|
+
wrapperStyle: {},
|
|
91
|
+
wrapperClass: "",
|
|
92
|
+
visible: true,
|
|
93
|
+
ariaLabel: "oval-loading",
|
|
94
|
+
color: primaryColor,
|
|
95
|
+
secondaryColor,
|
|
96
|
+
strokeWidth: 2,
|
|
97
|
+
strokeWidthSecondary: 2
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
}
|
|
101
|
+
);
|
|
90
102
|
};
|
|
91
103
|
var BaseLoading_default = BaseLoading;
|
|
92
104
|
|
|
@@ -3532,7 +3544,7 @@ var InputGroup = ({
|
|
|
3532
3544
|
{
|
|
3533
3545
|
ref: textAreaRef,
|
|
3534
3546
|
disabled,
|
|
3535
|
-
className: `w-full h-[44px] ${useMinHeight ? "min-h-[250px]" : ""} resize-none overflow-hidden py-2 px-4 border ${errorText ? "border-catchup-red shadow-error placeholder:text-catchup-red placeholder:opacity-80" : "border-catchup-gray-100"} placeholder-catchup-gray-200 rounded-catchup-large focus:outline-none focus:border-catchup-blue-400 ${disabled ? "bg-catchup-lighter-gray" :
|
|
3547
|
+
className: `w-full h-[44px] ${useMinHeight ? "min-h-[250px]" : ""} resize-none overflow-hidden py-2 px-4 border ${errorText ? "border-catchup-red shadow-error placeholder:text-catchup-red placeholder:opacity-80" : "border-catchup-gray-100"} placeholder-catchup-gray-200 rounded-catchup-large focus:outline-none focus:border-catchup-blue-400 ${disabled ? "bg-catchup-lighter-gray" : ""} focus:shadow-input`,
|
|
3536
3548
|
placeholder: errorText ? errorText : placeholder,
|
|
3537
3549
|
value,
|
|
3538
3550
|
onLoad: (e) => {
|
|
@@ -3552,7 +3564,7 @@ var InputGroup = ({
|
|
|
3552
3564
|
"input",
|
|
3553
3565
|
{
|
|
3554
3566
|
disabled,
|
|
3555
|
-
className: `w-full py-2 px-4 border ${errorText ? "border-catchup-red shadow-error placeholder:text-catchup-red placeholder:opacity-80" : "border-catchup-gray-100"} rounded-catchup-large focus:outline-none placeholder-catchup-gray-200 focus:border-catchup-blue-400 ${disabled ? "bg-catchup-lighter-gray" :
|
|
3567
|
+
className: `w-full py-2 px-4 border ${errorText ? "border-catchup-red shadow-error placeholder:text-catchup-red placeholder:opacity-80" : "border-catchup-gray-100"} rounded-catchup-large focus:outline-none placeholder-catchup-gray-200 focus:border-catchup-blue-400 ${disabled ? "bg-catchup-lighter-gray" : ""} focus:shadow-input`,
|
|
3556
3568
|
type,
|
|
3557
3569
|
defaultValue,
|
|
3558
3570
|
placeholder: errorText ? errorText : placeholder,
|
|
@@ -5195,7 +5207,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
5195
5207
|
onChange(answer, materialKey, materialSubKey);
|
|
5196
5208
|
},
|
|
5197
5209
|
children: [
|
|
5198
|
-
/* @__PURE__ */ jsx28(
|
|
5210
|
+
/* @__PURE__ */ jsx28(
|
|
5199
5211
|
BaseImage_default,
|
|
5200
5212
|
{
|
|
5201
5213
|
src: answerMap[materialKey].includes(materialSubKey) ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -5204,7 +5216,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
5204
5216
|
onClick: () => {
|
|
5205
5217
|
}
|
|
5206
5218
|
}
|
|
5207
|
-
)
|
|
5219
|
+
),
|
|
5208
5220
|
/* @__PURE__ */ jsx28("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx28("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5209
5221
|
materialSubKey
|
|
5210
5222
|
).map((inputPart, index3) => /* @__PURE__ */ jsx28(
|
|
@@ -5345,7 +5357,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
5345
5357
|
onChange(answer, materialKey, materialSubKey);
|
|
5346
5358
|
},
|
|
5347
5359
|
children: [
|
|
5348
|
-
/* @__PURE__ */ jsx30(
|
|
5360
|
+
/* @__PURE__ */ jsx30(
|
|
5349
5361
|
BaseImage_default,
|
|
5350
5362
|
{
|
|
5351
5363
|
src: answerMap[materialKey] === materialSubKey ? "/icons/item-element.webp" : "/icons/not-selected-item-element.webp",
|
|
@@ -5354,7 +5366,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
5354
5366
|
onClick: () => {
|
|
5355
5367
|
}
|
|
5356
5368
|
}
|
|
5357
|
-
)
|
|
5369
|
+
),
|
|
5358
5370
|
/* @__PURE__ */ jsx30("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx30("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5359
5371
|
materialSubKey
|
|
5360
5372
|
).map((inputPart, index3) => /* @__PURE__ */ jsx30(
|
package/package.json
CHANGED
|
@@ -87,18 +87,16 @@ const MCMAActivityMaterialContent = ({
|
|
|
87
87
|
onChange(answer, materialKey, materialSubKey);
|
|
88
88
|
}}
|
|
89
89
|
>
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
/>
|
|
101
|
-
</div>
|
|
90
|
+
<BaseImage
|
|
91
|
+
src={
|
|
92
|
+
answerMap[materialKey].includes(materialSubKey)
|
|
93
|
+
? "/icons/checkbox.webp"
|
|
94
|
+
: "/icons/checkbox-empty.webp"
|
|
95
|
+
}
|
|
96
|
+
alt="checkbox"
|
|
97
|
+
size="small"
|
|
98
|
+
onClick={() => {}}
|
|
99
|
+
/>
|
|
102
100
|
<div className="flex-1">
|
|
103
101
|
{contentMap.type === "TEXT" ? (
|
|
104
102
|
<p className="text-xl whitespace-pre-wrap">
|
|
@@ -86,18 +86,16 @@ const MCSAActivityMaterialContent = ({
|
|
|
86
86
|
onChange(answer, materialKey, materialSubKey);
|
|
87
87
|
}}
|
|
88
88
|
>
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
/>
|
|
100
|
-
</div>
|
|
89
|
+
<BaseImage
|
|
90
|
+
src={
|
|
91
|
+
answerMap[materialKey] === materialSubKey
|
|
92
|
+
? "/icons/item-element.webp"
|
|
93
|
+
: "/icons/not-selected-item-element.webp"
|
|
94
|
+
}
|
|
95
|
+
alt="circle"
|
|
96
|
+
size="small"
|
|
97
|
+
onClick={() => {}}
|
|
98
|
+
/>
|
|
101
99
|
<div className="flex-1">
|
|
102
100
|
{contentMap.type === "TEXT" ? (
|
|
103
101
|
<p className="text-xl whitespace-pre-wrap">
|
|
@@ -247,7 +247,7 @@ const InputGroup = ({
|
|
|
247
247
|
? "border-catchup-red shadow-error placeholder:text-catchup-red placeholder:opacity-80"
|
|
248
248
|
: "border-catchup-gray-100"
|
|
249
249
|
} placeholder-catchup-gray-200 rounded-catchup-large focus:outline-none focus:border-catchup-blue-400 ${
|
|
250
|
-
disabled ? "bg-catchup-lighter-gray" :
|
|
250
|
+
disabled ? "bg-catchup-lighter-gray" : ""
|
|
251
251
|
} focus:shadow-input`}
|
|
252
252
|
placeholder={errorText ? errorText : placeholder}
|
|
253
253
|
value={value}
|
|
@@ -284,7 +284,7 @@ const InputGroup = ({
|
|
|
284
284
|
? "border-catchup-red shadow-error placeholder:text-catchup-red placeholder:opacity-80"
|
|
285
285
|
: "border-catchup-gray-100"
|
|
286
286
|
} rounded-catchup-large focus:outline-none placeholder-catchup-gray-200 focus:border-catchup-blue-400 ${
|
|
287
|
-
disabled ? "bg-catchup-lighter-gray" :
|
|
287
|
+
disabled ? "bg-catchup-lighter-gray" : ""
|
|
288
288
|
} focus:shadow-input`}
|
|
289
289
|
type={type}
|
|
290
290
|
defaultValue={defaultValue}
|
|
@@ -10,19 +10,24 @@ const BaseLoading = ({
|
|
|
10
10
|
}: IBaseLoadingProps) => {
|
|
11
11
|
let currentHeight;
|
|
12
12
|
let currentWidth;
|
|
13
|
+
let currentMargin;
|
|
13
14
|
|
|
14
15
|
if (size === "small") {
|
|
15
|
-
currentHeight =
|
|
16
|
-
currentWidth =
|
|
16
|
+
currentHeight = 16;
|
|
17
|
+
currentWidth = 16;
|
|
18
|
+
currentMargin = 4;
|
|
17
19
|
} else if (size === "medium") {
|
|
18
20
|
currentHeight = 48;
|
|
19
21
|
currentWidth = 48;
|
|
22
|
+
currentMargin = 12;
|
|
20
23
|
} else if (size === "large") {
|
|
21
24
|
currentHeight = 72;
|
|
22
25
|
currentWidth = 72;
|
|
26
|
+
currentMargin = 18;
|
|
23
27
|
} else if (size === "xlarge") {
|
|
24
28
|
currentHeight = 96;
|
|
25
29
|
currentWidth = 96;
|
|
30
|
+
currentMargin = 24;
|
|
26
31
|
} else {
|
|
27
32
|
currentHeight = height;
|
|
28
33
|
currentWidth = width;
|
|
@@ -30,7 +35,10 @@ const BaseLoading = ({
|
|
|
30
35
|
|
|
31
36
|
// px-4 py-2
|
|
32
37
|
return (
|
|
33
|
-
<div
|
|
38
|
+
<div
|
|
39
|
+
className="flex justify-center items-center"
|
|
40
|
+
style={{ marginTop: currentMargin, marginBottom: currentMargin }}
|
|
41
|
+
>
|
|
34
42
|
<Oval
|
|
35
43
|
height={currentHeight}
|
|
36
44
|
width={currentWidth}
|