@tipp/ui 2.1.29 → 3.0.0
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/app/index.cjs +5 -2
- package/dist/app/index.cjs.map +1 -1
- package/dist/app/index.js +53 -53
- package/dist/app/platform/coach-question-list.js +26 -26
- package/dist/app/platform/contents-card.js +26 -26
- package/dist/app/platform/curriculum-card.js +2 -2
- package/dist/app/platform/edit-coaching-time.cjs +5 -2
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +41 -41
- package/dist/app/platform/edit-service-type.cjs +5 -2
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +40 -40
- package/dist/app/platform/goal-manage-card-edit.cjs +5 -2
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +41 -41
- package/dist/app/platform/goal-manage-card-read.js +26 -26
- package/dist/app/platform/on-offline-radio-card.cjs +5 -2
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +40 -40
- package/dist/app/platform/report-card.js +26 -26
- package/dist/app/platform/reservation-card.cjs +5 -2
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +41 -41
- package/dist/app/platform/session-card.cjs +5 -2
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +42 -42
- package/dist/app/platform/session-review-simple-read.js +26 -26
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +28 -28
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +26 -26
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +26 -26
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +25 -25
- package/dist/app/platform/userInfos/session-user-info-detail.js +25 -25
- package/dist/app/platform/userInfos/utils.js +25 -25
- package/dist/atoms/index.js +61 -61
- package/dist/chunk-26D5QIDQ.js +174 -0
- package/dist/chunk-26D5QIDQ.js.map +1 -0
- package/dist/chunk-2GLHYOET.js +144 -0
- package/dist/chunk-2GLHYOET.js.map +1 -0
- package/dist/chunk-2TXMPG5S.js +145 -0
- package/dist/chunk-2TXMPG5S.js.map +1 -0
- package/dist/chunk-3QM2WUAX.js +281 -0
- package/dist/chunk-3QM2WUAX.js.map +1 -0
- package/dist/chunk-5DJ2LHPL.js +144 -0
- package/dist/chunk-5DJ2LHPL.js.map +1 -0
- package/dist/chunk-5K4VOWNF.js +84 -0
- package/dist/chunk-5K4VOWNF.js.map +1 -0
- package/dist/chunk-6327I3ZH.js +196 -0
- package/dist/chunk-6327I3ZH.js.map +1 -0
- package/dist/chunk-6D5RCEOQ.js +281 -0
- package/dist/chunk-6D5RCEOQ.js.map +1 -0
- package/dist/chunk-6KZBQD4O.js +231 -0
- package/dist/chunk-6KZBQD4O.js.map +1 -0
- package/dist/chunk-6Q6OHG2C.js +74 -0
- package/dist/chunk-6Q6OHG2C.js.map +1 -0
- package/dist/chunk-7S2RDGXN.js +101 -0
- package/dist/chunk-7S2RDGXN.js.map +1 -0
- package/dist/chunk-7SAWHUJA.js +89 -0
- package/dist/chunk-7SAWHUJA.js.map +1 -0
- package/dist/chunk-7WEVW6IN.js +28 -0
- package/dist/chunk-7WEVW6IN.js.map +1 -0
- package/dist/chunk-A4ZOVTFX.js +117 -0
- package/dist/chunk-A4ZOVTFX.js.map +1 -0
- package/dist/chunk-A75LCRKO.js +45 -0
- package/dist/chunk-A75LCRKO.js.map +1 -0
- package/dist/chunk-AJRM2CRN.js +281 -0
- package/dist/chunk-AJRM2CRN.js.map +1 -0
- package/dist/chunk-AY2MOPIM.js +64 -0
- package/dist/chunk-AY2MOPIM.js.map +1 -0
- package/dist/chunk-AZXDKQTU.js +49 -0
- package/dist/chunk-AZXDKQTU.js.map +1 -0
- package/dist/chunk-B35ENQ53.js +174 -0
- package/dist/chunk-B35ENQ53.js.map +1 -0
- package/dist/chunk-BMVBU4ZS.js +192 -0
- package/dist/chunk-BMVBU4ZS.js.map +1 -0
- package/dist/chunk-BQ2C4JPD.js +231 -0
- package/dist/chunk-BQ2C4JPD.js.map +1 -0
- package/dist/chunk-BQ4YWXRL.js +51 -0
- package/dist/chunk-BQ4YWXRL.js.map +1 -0
- package/dist/chunk-BUU2P46X.js +145 -0
- package/dist/chunk-BUU2P46X.js.map +1 -0
- package/dist/chunk-C4IWE6EG.js +169 -0
- package/dist/chunk-C4IWE6EG.js.map +1 -0
- package/dist/chunk-C7HMJBJA.js +53 -0
- package/dist/chunk-C7HMJBJA.js.map +1 -0
- package/dist/chunk-D4GJM3C3.js +69 -0
- package/dist/chunk-D4GJM3C3.js.map +1 -0
- package/dist/chunk-DE6WTN3Q.js +144 -0
- package/dist/chunk-DE6WTN3Q.js.map +1 -0
- package/dist/chunk-DOA3BJLX.js +144 -0
- package/dist/chunk-DOA3BJLX.js.map +1 -0
- package/dist/chunk-EL53KVY4.js +144 -0
- package/dist/chunk-EL53KVY4.js.map +1 -0
- package/dist/chunk-ERXU77DA.js +281 -0
- package/dist/chunk-ERXU77DA.js.map +1 -0
- package/dist/chunk-EWFUZOWN.js +281 -0
- package/dist/chunk-EWFUZOWN.js.map +1 -0
- package/dist/chunk-FAZOROOU.js +68 -0
- package/dist/chunk-FAZOROOU.js.map +1 -0
- package/dist/chunk-FENPJ55R.js +230 -0
- package/dist/chunk-FENPJ55R.js.map +1 -0
- package/dist/chunk-FNV6FVQA.js +61 -0
- package/dist/chunk-FNV6FVQA.js.map +1 -0
- package/dist/chunk-FWRJFBQW.js +57 -0
- package/dist/chunk-FWRJFBQW.js.map +1 -0
- package/dist/chunk-FY47YMFM.js +145 -0
- package/dist/chunk-FY47YMFM.js.map +1 -0
- package/dist/chunk-GWJMQBPR.js +231 -0
- package/dist/chunk-GWJMQBPR.js.map +1 -0
- package/dist/chunk-H2NGLG6A.js +363 -0
- package/dist/chunk-H2NGLG6A.js.map +1 -0
- package/dist/chunk-H5UOKPYZ.js +79 -0
- package/dist/chunk-H5UOKPYZ.js.map +1 -0
- package/dist/chunk-HPEQBAHB.js +165 -0
- package/dist/chunk-HPEQBAHB.js.map +1 -0
- package/dist/chunk-I3CMYMBL.js +233 -0
- package/dist/chunk-I3CMYMBL.js.map +1 -0
- package/dist/chunk-IME3WMKT.js +63 -0
- package/dist/chunk-IME3WMKT.js.map +1 -0
- package/dist/chunk-IPF2UOFH.js +63 -0
- package/dist/chunk-IPF2UOFH.js.map +1 -0
- package/dist/chunk-ITUS6SKB.js +64 -0
- package/dist/chunk-ITUS6SKB.js.map +1 -0
- package/dist/chunk-IZHU33JE.js +174 -0
- package/dist/chunk-IZHU33JE.js.map +1 -0
- package/dist/chunk-JEO4YX65.js +63 -0
- package/dist/chunk-JEO4YX65.js.map +1 -0
- package/dist/chunk-JSOXMJ6K.js +43 -0
- package/dist/chunk-JSOXMJ6K.js.map +1 -0
- package/dist/chunk-KO66SUJN.js +174 -0
- package/dist/chunk-KO66SUJN.js.map +1 -0
- package/dist/chunk-KTCFIAAM.js +281 -0
- package/dist/chunk-KTCFIAAM.js.map +1 -0
- package/dist/chunk-LEUTTEBC.js +63 -0
- package/dist/chunk-LEUTTEBC.js.map +1 -0
- package/dist/chunk-M2SQB6ZY.js +23 -0
- package/dist/chunk-M2SQB6ZY.js.map +1 -0
- package/dist/chunk-NVNCLLYC.js +63 -0
- package/dist/chunk-NVNCLLYC.js.map +1 -0
- package/dist/chunk-OV5F3JZH.js +54 -0
- package/dist/chunk-OV5F3JZH.js.map +1 -0
- package/dist/chunk-P2VBB4C5.js +65 -0
- package/dist/chunk-P2VBB4C5.js.map +1 -0
- package/dist/chunk-P5ARB7KK.js +174 -0
- package/dist/chunk-P5ARB7KK.js.map +1 -0
- package/dist/chunk-PKZ4JCB2.js +231 -0
- package/dist/chunk-PKZ4JCB2.js.map +1 -0
- package/dist/chunk-QQ4ZK4BW.js +37 -0
- package/dist/chunk-QQ4ZK4BW.js.map +1 -0
- package/dist/chunk-QTVX2ERL.js +99 -0
- package/dist/chunk-QTVX2ERL.js.map +1 -0
- package/dist/chunk-QZJHGU4X.js +145 -0
- package/dist/chunk-QZJHGU4X.js.map +1 -0
- package/dist/chunk-R77BOAW5.js +151 -0
- package/dist/chunk-R77BOAW5.js.map +1 -0
- package/dist/chunk-RPCKPFRL.js +145 -0
- package/dist/chunk-RPCKPFRL.js.map +1 -0
- package/dist/chunk-RTVZMGDC.js +144 -0
- package/dist/chunk-RTVZMGDC.js.map +1 -0
- package/dist/chunk-SLBSIRB6.js +58 -0
- package/dist/chunk-SLBSIRB6.js.map +1 -0
- package/dist/chunk-UIGZ3PK5.js +63 -0
- package/dist/chunk-UIGZ3PK5.js.map +1 -0
- package/dist/chunk-UKKISPC5.js +145 -0
- package/dist/chunk-UKKISPC5.js.map +1 -0
- package/dist/chunk-UPZMRMK7.js +29 -0
- package/dist/chunk-UPZMRMK7.js.map +1 -0
- package/dist/chunk-UXOYDVHH.js +63 -0
- package/dist/chunk-UXOYDVHH.js.map +1 -0
- package/dist/chunk-UZUQQLTU.js +63 -0
- package/dist/chunk-UZUQQLTU.js.map +1 -0
- package/dist/chunk-VBLQSRLF.js +63 -0
- package/dist/chunk-VBLQSRLF.js.map +1 -0
- package/dist/chunk-VDKHCZHN.js +63 -0
- package/dist/chunk-VDKHCZHN.js.map +1 -0
- package/dist/chunk-VE737SXT.js +30 -0
- package/dist/chunk-VE737SXT.js.map +1 -0
- package/dist/chunk-VL652LU6.js +281 -0
- package/dist/chunk-VL652LU6.js.map +1 -0
- package/dist/chunk-VO7GWTGE.js +163 -0
- package/dist/chunk-VO7GWTGE.js.map +1 -0
- package/dist/chunk-W3DLS557.js +144 -0
- package/dist/chunk-W3DLS557.js.map +1 -0
- package/dist/chunk-WB2EZAD2.js +87 -0
- package/dist/chunk-WB2EZAD2.js.map +1 -0
- package/dist/chunk-WEBCXOO7.js +30 -0
- package/dist/chunk-WEBCXOO7.js.map +1 -0
- package/dist/chunk-WZM6EE5T.js +174 -0
- package/dist/chunk-WZM6EE5T.js.map +1 -0
- package/dist/chunk-X2AK6LTW.js +174 -0
- package/dist/chunk-X2AK6LTW.js.map +1 -0
- package/dist/chunk-X4R5GV7Q.js +125 -0
- package/dist/chunk-X4R5GV7Q.js.map +1 -0
- package/dist/chunk-YL5EYCRV.js +233 -0
- package/dist/chunk-YL5EYCRV.js.map +1 -0
- package/dist/chunk-YOIAYFQM.js +39 -0
- package/dist/chunk-YOIAYFQM.js.map +1 -0
- package/dist/chunk-Z4YM6RFE.js +70 -0
- package/dist/chunk-Z4YM6RFE.js.map +1 -0
- package/dist/chunk-Z5TVNR2U.js +145 -0
- package/dist/chunk-Z5TVNR2U.js.map +1 -0
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +101 -101
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +30 -30
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +29 -29
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-header.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-layout.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +26 -26
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +26 -26
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +26 -26
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +32 -32
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +26 -26
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +33 -33
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-video.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +34 -34
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-sidebar-item-wrapper.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-title.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +25 -25
- package/dist/molecules/curriculumV2/curriculum-sub-nav.js +25 -25
- package/dist/molecules/curriculumV2/curriculum-v2-layout.js +25 -25
- package/dist/molecules/curriculumV2/index.js +34 -34
- package/dist/molecules/date-picker/date-picker-button.cjs +5 -2
- package/dist/molecules/date-picker/date-picker-button.cjs.map +1 -1
- package/dist/molecules/date-picker/date-picker-button.js +27 -27
- package/dist/molecules/date-picker/index.cjs +5 -2
- package/dist/molecules/date-picker/index.cjs.map +1 -1
- package/dist/molecules/date-picker/index.js +26 -26
- package/dist/molecules/expand-table/index.js +25 -25
- package/dist/molecules/expand-table/row.js +25 -25
- package/dist/molecules/index.cjs +5 -2
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +42 -42
- package/dist/molecules/learning-post.js +2 -2
- package/dist/molecules/navigation.js +25 -25
- package/dist/molecules/radio-button-card.js +25 -25
- package/dist/molecules/stepper.js +2 -2
- package/dist/molecules/tag-selector.js +26 -26
- package/dist/molecules/time-select.js +25 -25
- package/package.json +3 -3
- package/src/molecules/date-picker/index.tsx +8 -7
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ReviewQuestionContentHeader
|
|
3
|
+
} from "./chunk-JSOXMJ6K.js";
|
|
4
|
+
import {
|
|
5
|
+
RadioButtonCard
|
|
6
|
+
} from "./chunk-SLXXCM56.js";
|
|
7
|
+
import {
|
|
8
|
+
Grid
|
|
9
|
+
} from "./chunk-EGEQY3KT.js";
|
|
10
|
+
import {
|
|
11
|
+
Card
|
|
12
|
+
} from "./chunk-HEDMSFPW.js";
|
|
13
|
+
import {
|
|
14
|
+
Box
|
|
15
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
16
|
+
import {
|
|
17
|
+
Flex
|
|
18
|
+
} from "./chunk-25HMMI7R.js";
|
|
19
|
+
import {
|
|
20
|
+
Typo
|
|
21
|
+
} from "./chunk-PARGQUJB.js";
|
|
22
|
+
import {
|
|
23
|
+
Button
|
|
24
|
+
} from "./chunk-AFPH32MF.js";
|
|
25
|
+
|
|
26
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.tsx
|
|
27
|
+
import { useCallback, useMemo, useState } from "react";
|
|
28
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
29
|
+
var correctAnswerStyle = {
|
|
30
|
+
backgroundColor: "var(--green-a2)"
|
|
31
|
+
};
|
|
32
|
+
function ReviewQuestionRadio(props) {
|
|
33
|
+
const { question, answer, onChange } = props;
|
|
34
|
+
const [isCheckAnswer, setIsCheckAnswer] = useState(false);
|
|
35
|
+
const checkAnswer = useCallback(() => {
|
|
36
|
+
setIsCheckAnswer(true);
|
|
37
|
+
}, []);
|
|
38
|
+
const isCorrect = isCheckAnswer && Number(answer) === question.correctAnswer;
|
|
39
|
+
const isWrong = isCheckAnswer && Number(answer) !== question.correctAnswer;
|
|
40
|
+
const radioColor = useMemo(() => {
|
|
41
|
+
if (isCorrect) return "green";
|
|
42
|
+
if (isWrong) return "red";
|
|
43
|
+
return void 0;
|
|
44
|
+
}, [isCorrect, isWrong]);
|
|
45
|
+
return /* @__PURE__ */ jsxs(Grid, { height: "100%", rows: "auto 1fr", width: "100%", children: [
|
|
46
|
+
/* @__PURE__ */ jsx(Card, { mb: "4", size: "2", children: /* @__PURE__ */ jsx(
|
|
47
|
+
ReviewQuestionContentHeader,
|
|
48
|
+
{
|
|
49
|
+
icon: question.icon,
|
|
50
|
+
question: question.question,
|
|
51
|
+
title: question.title,
|
|
52
|
+
type: question.type
|
|
53
|
+
}
|
|
54
|
+
) }),
|
|
55
|
+
/* @__PURE__ */ jsxs(Grid, { height: "100%", rows: "1fr auto", width: "100%", children: [
|
|
56
|
+
/* @__PURE__ */ jsx(Box, { position: "relative", children: /* @__PURE__ */ jsx(
|
|
57
|
+
RadioButtonCard.Root,
|
|
58
|
+
{
|
|
59
|
+
color: radioColor,
|
|
60
|
+
onValueChange: onChange,
|
|
61
|
+
style: {
|
|
62
|
+
width: "100%",
|
|
63
|
+
height: "100%",
|
|
64
|
+
overflowY: "auto",
|
|
65
|
+
position: "absolute"
|
|
66
|
+
},
|
|
67
|
+
value: answer,
|
|
68
|
+
children: /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "2", width: "100%", children: question.options.map((option, i) => {
|
|
69
|
+
const isThisOptionCorrect = isCheckAnswer && i === question.correctAnswer;
|
|
70
|
+
const isThisOptionSelected = isCheckAnswer && i === Number(answer);
|
|
71
|
+
const isThisOptionWrong = isCheckAnswer && isThisOptionSelected && i !== question.correctAnswer;
|
|
72
|
+
const style = (() => {
|
|
73
|
+
if (isThisOptionCorrect) return correctAnswerStyle;
|
|
74
|
+
return {};
|
|
75
|
+
})();
|
|
76
|
+
return /* @__PURE__ */ jsx(
|
|
77
|
+
RadioButtonCard.Item,
|
|
78
|
+
{
|
|
79
|
+
style,
|
|
80
|
+
value: i.toString(),
|
|
81
|
+
children: /* @__PURE__ */ jsxs(Box, { children: [
|
|
82
|
+
/* @__PURE__ */ jsx(Typo, { as: "p", children: option.label }),
|
|
83
|
+
isThisOptionCorrect ? /* @__PURE__ */ jsx(Typo, { color: "green", children: "\uC815\uB2F5\uC785\uB2C8\uB2E4" }) : null,
|
|
84
|
+
isThisOptionWrong ? /* @__PURE__ */ jsx(Typo, { color: "red", children: "\uC815\uB2F5\uC774 \uC544\uB2D9\uB2C8\uB2E4" }) : null
|
|
85
|
+
] })
|
|
86
|
+
},
|
|
87
|
+
`${option.label}-${i}`
|
|
88
|
+
);
|
|
89
|
+
}) })
|
|
90
|
+
}
|
|
91
|
+
) }),
|
|
92
|
+
/* @__PURE__ */ jsx(Flex, { justify: "end", mt: "2", children: /* @__PURE__ */ jsx(Button, { onClick: checkAnswer, children: "\uC815\uB2F5 \uD655\uC778" }) })
|
|
93
|
+
] })
|
|
94
|
+
] });
|
|
95
|
+
}
|
|
96
|
+
var review_question_radio_default = ReviewQuestionRadio;
|
|
97
|
+
|
|
98
|
+
export {
|
|
99
|
+
review_question_radio_default
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=chunk-7S2RDGXN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { Box, Button, Card, Flex, Grid, Typo } from '@/atoms';\nimport { type CurriculumReviewQuestionRadio } from '@/types/curriculumContents.type'; \nimport { RadioButtonCard } from \"../../../../radio-button-card\";\nimport { ReviewQuestionContentHeader } from './review-comp';\n\ninterface ReviewQuestionRadioProps {\n question: CurriculumReviewQuestionRadio;\n answer: string;\n error?: string;\n onChange: (value: string) => void;\n}\n\nconst correctAnswerStyle: React.CSSProperties = {\n backgroundColor: 'var(--green-a2)',\n};\n\nfunction ReviewQuestionRadio(props: ReviewQuestionRadioProps): React.ReactNode {\n const { question, answer, onChange } = props;\n const [isCheckAnswer, setIsCheckAnswer] = useState(false);\n\n const checkAnswer = useCallback(() => {\n setIsCheckAnswer(true);\n }, []);\n\n const isCorrect = isCheckAnswer && Number(answer) === question.correctAnswer;\n const isWrong = isCheckAnswer && Number(answer) !== question.correctAnswer;\n const radioColor = useMemo(() => {\n if (isCorrect) return 'green';\n if (isWrong) return 'red';\n return undefined;\n }, [isCorrect, isWrong]);\n\n return (\n <Grid height=\"100%\" rows=\"auto 1fr\" width=\"100%\">\n <Card mb=\"4\" size=\"2\">\n <ReviewQuestionContentHeader\n icon={question.icon}\n question={question.question}\n title={question.title}\n type={question.type}\n />\n </Card>\n\n <Grid height=\"100%\" rows=\"1fr auto\" width=\"100%\">\n <Box position=\"relative\">\n <RadioButtonCard.Root\n color={radioColor}\n onValueChange={onChange}\n style={{\n width: '100%',\n height: '100%',\n overflowY: 'auto',\n position: 'absolute',\n }}\n value={answer}\n >\n <Flex direction=\"column\" gap=\"2\" width=\"100%\">\n {question.options.map((option, i) => {\n const isThisOptionCorrect =\n isCheckAnswer && i === question.correctAnswer;\n const isThisOptionSelected =\n isCheckAnswer && i === Number(answer);\n const isThisOptionWrong =\n isCheckAnswer &&\n isThisOptionSelected &&\n i !== question.correctAnswer;\n const style = (() => {\n if (isThisOptionCorrect) return correctAnswerStyle;\n return {};\n })();\n\n return (\n <RadioButtonCard.Item\n // eslint-disable-next-line react/no-array-index-key -- 조합 키로 중복 회피\n key={`${option.label}-${i}`}\n style={style}\n value={i.toString()}\n >\n <Box>\n <Typo as=\"p\">{option.label}</Typo>\n {isThisOptionCorrect ? (\n <Typo color=\"green\">정답입니다</Typo>\n ) : null}\n {isThisOptionWrong ? (\n <Typo color=\"red\">정답이 아닙니다</Typo>\n ) : null}\n </Box>\n </RadioButtonCard.Item>\n );\n })}\n </Flex>\n </RadioButtonCard.Root>\n </Box>\n <Flex justify=\"end\" mt=\"2\">\n <Button onClick={checkAnswer}>정답 확인</Button>\n </Flex>\n </Grid>\n </Grid>\n );\n}\n\nexport default ReviewQuestionRadio;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,aAAa,SAAS,gBAAgB;AAoC9C,cA2CY,YA3CZ;AAvBR,IAAM,qBAA0C;AAAA,EAC9C,iBAAiB;AACnB;AAEA,SAAS,oBAAoB,OAAkD;AAC7E,QAAM,EAAE,UAAU,QAAQ,SAAS,IAAI;AACvC,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAS,KAAK;AAExD,QAAM,cAAc,YAAY,MAAM;AACpC,qBAAiB,IAAI;AAAA,EACvB,GAAG,CAAC,CAAC;AAEL,QAAM,YAAY,iBAAiB,OAAO,MAAM,MAAM,SAAS;AAC/D,QAAM,UAAU,iBAAiB,OAAO,MAAM,MAAM,SAAS;AAC7D,QAAM,aAAa,QAAQ,MAAM;AAC/B,QAAI,UAAW,QAAO;AACtB,QAAI,QAAS,QAAO;AACpB,WAAO;AAAA,EACT,GAAG,CAAC,WAAW,OAAO,CAAC;AAEvB,SACE,qBAAC,QAAK,QAAO,QAAO,MAAK,YAAW,OAAM,QACxC;AAAA,wBAAC,QAAK,IAAG,KAAI,MAAK,KAChB;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,SAAS;AAAA,QACf,UAAU,SAAS;AAAA,QACnB,OAAO,SAAS;AAAA,QAChB,MAAM,SAAS;AAAA;AAAA,IACjB,GACF;AAAA,IAEA,qBAAC,QAAK,QAAO,QAAO,MAAK,YAAW,OAAM,QACxC;AAAA,0BAAC,OAAI,UAAS,YACZ;AAAA,QAAC,gBAAgB;AAAA,QAAhB;AAAA,UACC,OAAO;AAAA,UACP,eAAe;AAAA,UACf,OAAO;AAAA,YACL,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,WAAW;AAAA,YACX,UAAU;AAAA,UACZ;AAAA,UACA,OAAO;AAAA,UAEP,8BAAC,QAAK,WAAU,UAAS,KAAI,KAAI,OAAM,QACpC,mBAAS,QAAQ,IAAI,CAAC,QAAQ,MAAM;AACnC,kBAAM,sBACJ,iBAAiB,MAAM,SAAS;AAClC,kBAAM,uBACJ,iBAAiB,MAAM,OAAO,MAAM;AACtC,kBAAM,oBACJ,iBACA,wBACA,MAAM,SAAS;AACjB,kBAAM,SAAS,MAAM;AACnB,kBAAI,oBAAqB,QAAO;AAChC,qBAAO,CAAC;AAAA,YACV,GAAG;AAEH,mBACE;AAAA,cAAC,gBAAgB;AAAA,cAAhB;AAAA,gBAGC;AAAA,gBACA,OAAO,EAAE,SAAS;AAAA,gBAElB,+BAAC,OACC;AAAA,sCAAC,QAAK,IAAG,KAAK,iBAAO,OAAM;AAAA,kBAC1B,sBACC,oBAAC,QAAK,OAAM,SAAQ,4CAAK,IACvB;AAAA,kBACH,oBACC,oBAAC,QAAK,OAAM,OAAM,yDAAQ,IACxB;AAAA,mBACN;AAAA;AAAA,cAZK,GAAG,OAAO,KAAK,IAAI,CAAC;AAAA,YAa3B;AAAA,UAEJ,CAAC,GACH;AAAA;AAAA,MACF,GACF;AAAA,MACA,oBAAC,QAAK,SAAQ,OAAM,IAAG,KACrB,8BAAC,UAAO,SAAS,aAAa,uCAAK,GACrC;AAAA,OACF;AAAA,KACF;AAEJ;AAEA,IAAO,gCAAQ;","names":[]}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import {
|
|
2
|
+
start_review_default
|
|
3
|
+
} from "./chunk-R77BOAW5.js";
|
|
4
|
+
import {
|
|
5
|
+
ReviewQuestion_default
|
|
6
|
+
} from "./chunk-LEUTTEBC.js";
|
|
7
|
+
import {
|
|
8
|
+
complete_review_default
|
|
9
|
+
} from "./chunk-H5UOKPYZ.js";
|
|
10
|
+
import {
|
|
11
|
+
CurriculumReviewProvider,
|
|
12
|
+
useCurriculumReviewContext
|
|
13
|
+
} from "./chunk-WZVJYDVP.js";
|
|
14
|
+
|
|
15
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.tsx
|
|
16
|
+
import { jsx } from "react/jsx-runtime";
|
|
17
|
+
function CurriculumReviewStepsInner() {
|
|
18
|
+
const {
|
|
19
|
+
formik,
|
|
20
|
+
step,
|
|
21
|
+
handleStart,
|
|
22
|
+
handleNext,
|
|
23
|
+
handlePrev,
|
|
24
|
+
onClickReviewMyAnswer,
|
|
25
|
+
handleSubmit,
|
|
26
|
+
currentQuestion,
|
|
27
|
+
currentAnswer,
|
|
28
|
+
currentError,
|
|
29
|
+
reviewContents,
|
|
30
|
+
handleAnswerChange
|
|
31
|
+
} = useCurriculumReviewContext();
|
|
32
|
+
const { questions } = reviewContents;
|
|
33
|
+
if (step === 0) {
|
|
34
|
+
return /* @__PURE__ */ jsx(start_review_default, { onStart: handleStart });
|
|
35
|
+
}
|
|
36
|
+
if (step > 0 && step <= questions.length && currentQuestion) {
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
ReviewQuestion_default,
|
|
39
|
+
{
|
|
40
|
+
answer: currentAnswer,
|
|
41
|
+
error: currentError,
|
|
42
|
+
index: step - 1,
|
|
43
|
+
isLast: step === questions.length,
|
|
44
|
+
isLoading: formik.isSubmitting,
|
|
45
|
+
isNextDisabled: currentError !== void 0,
|
|
46
|
+
onChange: handleAnswerChange,
|
|
47
|
+
onNext: handleNext,
|
|
48
|
+
onPrev: handlePrev,
|
|
49
|
+
onSubmit: handleSubmit,
|
|
50
|
+
question: currentQuestion,
|
|
51
|
+
total: questions.length
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
return /* @__PURE__ */ jsx(complete_review_default, { onClickReviewMyAnswer });
|
|
56
|
+
}
|
|
57
|
+
function CurriculumReviewSteps({
|
|
58
|
+
contents,
|
|
59
|
+
title,
|
|
60
|
+
onClickEndReview,
|
|
61
|
+
onSubmit,
|
|
62
|
+
defaultValues,
|
|
63
|
+
curriculum,
|
|
64
|
+
onReviewValueChange,
|
|
65
|
+
mode,
|
|
66
|
+
done
|
|
67
|
+
}) {
|
|
68
|
+
return /* @__PURE__ */ jsx(
|
|
69
|
+
CurriculumReviewProvider,
|
|
70
|
+
{
|
|
71
|
+
curriculum,
|
|
72
|
+
defaultValues,
|
|
73
|
+
done,
|
|
74
|
+
mode,
|
|
75
|
+
onClickEndReview,
|
|
76
|
+
onReviewValueChange,
|
|
77
|
+
onSubmit,
|
|
78
|
+
reviewContents: contents,
|
|
79
|
+
sectionTitle: title,
|
|
80
|
+
children: /* @__PURE__ */ jsx(CurriculumReviewStepsInner, {})
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
var CurriculumReviewSteps_default = CurriculumReviewSteps;
|
|
85
|
+
|
|
86
|
+
export {
|
|
87
|
+
CurriculumReviewSteps_default
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=chunk-7SAWHUJA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.tsx"],"sourcesContent":["import React from 'react';\nimport { type CurriculumReviewContents } from '@/types/curriculumContents.type';\nimport type { Curriculum } from '@/types'; \nimport {\n CurriculumReviewProvider,\n useCurriculumReviewContext,\n} from './curriculum-review-context';\nimport StartReview from './start-review';\nimport CompleteReview from './complete-review';\nimport ReviewQuestion from './ReviewQuestion';\n \nfunction CurriculumReviewStepsInner(): React.ReactNode {\n const {\n formik,\n step,\n handleStart,\n handleNext,\n handlePrev,\n onClickReviewMyAnswer,\n handleSubmit,\n currentQuestion,\n currentAnswer,\n currentError,\n reviewContents,\n handleAnswerChange,\n } = useCurriculumReviewContext();\n const { questions } = reviewContents;\n\n if (step === 0) {\n return <StartReview onStart={handleStart} />;\n }\n if (step > 0 && step <= questions.length && currentQuestion) {\n return (\n <ReviewQuestion\n answer={currentAnswer}\n error={currentError}\n index={step - 1}\n isLast={step === questions.length}\n isLoading={formik.isSubmitting}\n isNextDisabled={currentError !== undefined}\n onChange={handleAnswerChange}\n onNext={handleNext}\n onPrev={handlePrev}\n onSubmit={handleSubmit}\n question={currentQuestion}\n total={questions.length}\n />\n );\n }\n return <CompleteReview onClickReviewMyAnswer={onClickReviewMyAnswer} />;\n}\n\ninterface CurriculumReviewStepsProps {\n contents: CurriculumReviewContents;\n title: string | undefined;\n onClickEndReview: () => void;\n onSubmit: (values: Record<string, string>) => Promise<boolean>;\n defaultValues?: Record<string, string>;\n curriculum: Curriculum;\n onReviewValueChange: ({\n reviewId,\n answer,\n }: {\n reviewId: string;\n answer: Record<string, string>;\n }) => void;\n mode: 'edit' | 'create';\n done: boolean; \n}\n\nfunction CurriculumReviewSteps({\n contents,\n title,\n onClickEndReview,\n onSubmit,\n defaultValues,\n curriculum,\n onReviewValueChange,\n mode,\n done,\n}: CurriculumReviewStepsProps): React.ReactNode { \n\n return (\n <CurriculumReviewProvider\n curriculum={curriculum}\n defaultValues={defaultValues}\n done={done}\n mode={mode}\n onClickEndReview={onClickEndReview}\n onReviewValueChange={onReviewValueChange}\n onSubmit={onSubmit}\n reviewContents={contents}\n sectionTitle={title}\n >\n <CurriculumReviewStepsInner />\n </CurriculumReviewProvider>\n );\n}\n\nexport default CurriculumReviewSteps;\n"],"mappings":";;;;;;;;;;;;;;;AA6BW;AAlBX,SAAS,6BAA8C;AACrD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,2BAA2B;AAC/B,QAAM,EAAE,UAAU,IAAI;AAEtB,MAAI,SAAS,GAAG;AACd,WAAO,oBAAC,wBAAY,SAAS,aAAa;AAAA,EAC5C;AACA,MAAI,OAAO,KAAK,QAAQ,UAAU,UAAU,iBAAiB;AAC3D,WACE;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,OAAO,OAAO;AAAA,QACd,QAAQ,SAAS,UAAU;AAAA,QAC3B,WAAW,OAAO;AAAA,QAClB,gBAAgB,iBAAiB;AAAA,QACjC,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,UAAU;AAAA,QACV,UAAU;AAAA,QACV,OAAO,UAAU;AAAA;AAAA,IACnB;AAAA,EAEJ;AACA,SAAO,oBAAC,2BAAe,uBAA8C;AACvE;AAoBA,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAgD;AAE9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,gBAAgB;AAAA,MAChB,cAAc;AAAA,MAEd,8BAAC,8BAA2B;AAAA;AAAA,EAC9B;AAEJ;AAEA,IAAO,gCAAQ;","names":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Flex
|
|
3
|
+
} from "./chunk-25HMMI7R.js";
|
|
4
|
+
import {
|
|
5
|
+
Typo
|
|
6
|
+
} from "./chunk-PARGQUJB.js";
|
|
7
|
+
|
|
8
|
+
// src/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.tsx
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
function CurriculumItemTitle({
|
|
11
|
+
title,
|
|
12
|
+
subText,
|
|
13
|
+
duration
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "1", children: [
|
|
16
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", weight: "bold", children: title }),
|
|
17
|
+
/* @__PURE__ */ jsxs(Typo, { color: "gray", variant: "caption", children: [
|
|
18
|
+
subText,
|
|
19
|
+
duration ? ` | ${duration}\uBD84` : ""
|
|
20
|
+
] })
|
|
21
|
+
] });
|
|
22
|
+
}
|
|
23
|
+
var curriculum_item_title_default = CurriculumItemTitle;
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
curriculum_item_title_default
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=chunk-7WEVW6IN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.tsx"],"sourcesContent":["import React from 'react';\nimport { Flex, Typo } from '@/atoms';\n\ninterface CurriculumItemTitleProps {\n title: string;\n subText: string;\n duration?: number;\n}\n\nfunction CurriculumItemTitle({\n title,\n subText,\n duration,\n}: CurriculumItemTitleProps): React.ReactNode {\n return (\n <Flex direction=\"column\" gap=\"1\">\n <Typo color=\"gray\" weight=\"bold\">\n {title}\n </Typo>\n <Typo color=\"gray\" variant=\"caption\">\n {subText}\n {duration ? ` | ${duration}분` : ''}\n </Typo>\n </Flex>\n );\n}\n\nexport default CurriculumItemTitle;\n"],"mappings":";;;;;;;;AAgBM,cAGA,YAHA;AAPN,SAAS,oBAAoB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AACF,GAA8C;AAC5C,SACE,qBAAC,QAAK,WAAU,UAAS,KAAI,KAC3B;AAAA,wBAAC,QAAK,OAAM,QAAO,QAAO,QACvB,iBACH;AAAA,IACA,qBAAC,QAAK,OAAM,QAAO,SAAQ,WACxB;AAAA;AAAA,MACA,WAAW,MAAM,QAAQ,WAAM;AAAA,OAClC;AAAA,KACF;AAEJ;AAEA,IAAO,gCAAQ;","names":[]}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Skeleton
|
|
3
|
+
} from "./chunk-5H3YPCZK.js";
|
|
4
|
+
import {
|
|
5
|
+
Grid
|
|
6
|
+
} from "./chunk-EGEQY3KT.js";
|
|
7
|
+
import {
|
|
8
|
+
Inset
|
|
9
|
+
} from "./chunk-XQOL7UBI.js";
|
|
10
|
+
import {
|
|
11
|
+
Heading
|
|
12
|
+
} from "./chunk-34OQDUQR.js";
|
|
13
|
+
import {
|
|
14
|
+
DropdownMenu
|
|
15
|
+
} from "./chunk-HYE34QEM.js";
|
|
16
|
+
import {
|
|
17
|
+
Card
|
|
18
|
+
} from "./chunk-HEDMSFPW.js";
|
|
19
|
+
import {
|
|
20
|
+
Box
|
|
21
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
22
|
+
import {
|
|
23
|
+
Flex
|
|
24
|
+
} from "./chunk-25HMMI7R.js";
|
|
25
|
+
import {
|
|
26
|
+
Typo
|
|
27
|
+
} from "./chunk-PARGQUJB.js";
|
|
28
|
+
import {
|
|
29
|
+
Button
|
|
30
|
+
} from "./chunk-AFPH32MF.js";
|
|
31
|
+
import {
|
|
32
|
+
DotsVerticalIcon
|
|
33
|
+
} from "./chunk-V5XKNSCK.js";
|
|
34
|
+
|
|
35
|
+
// src/app/platform/contents-card.tsx
|
|
36
|
+
import { forwardRef } from "react";
|
|
37
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
38
|
+
var ContentsCard = forwardRef(
|
|
39
|
+
({
|
|
40
|
+
title,
|
|
41
|
+
description,
|
|
42
|
+
imageSrc,
|
|
43
|
+
footer,
|
|
44
|
+
dropdownItems,
|
|
45
|
+
onClickCard,
|
|
46
|
+
isLoading = false
|
|
47
|
+
}, ref) => {
|
|
48
|
+
return /* @__PURE__ */ jsxs(
|
|
49
|
+
Card,
|
|
50
|
+
{
|
|
51
|
+
onClick: onClickCard,
|
|
52
|
+
ref,
|
|
53
|
+
style: {
|
|
54
|
+
height: "100%",
|
|
55
|
+
width: "100%",
|
|
56
|
+
display: "grid",
|
|
57
|
+
cursor: "pointer",
|
|
58
|
+
maxHeight: "450px"
|
|
59
|
+
},
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsx(Inset, { clip: "padding-box", pb: "0", side: "top", children: /* @__PURE__ */ jsx(Skeleton, { loading: isLoading, children: /* @__PURE__ */ jsx(
|
|
62
|
+
Box,
|
|
63
|
+
{
|
|
64
|
+
height: "210px",
|
|
65
|
+
style: {
|
|
66
|
+
backgroundImage: `url(${imageSrc})`,
|
|
67
|
+
backgroundSize: "cover",
|
|
68
|
+
backgroundPosition: "center"
|
|
69
|
+
},
|
|
70
|
+
width: "100%"
|
|
71
|
+
}
|
|
72
|
+
) }) }),
|
|
73
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "column", p: "4", pb: "3", children: [
|
|
74
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
75
|
+
/* @__PURE__ */ jsx(Skeleton, { loading: isLoading, children: /* @__PURE__ */ jsx(Heading, { mb: "3", variant: "heading5", children: title }) }),
|
|
76
|
+
/* @__PURE__ */ jsx(Skeleton, { loading: isLoading, children: /* @__PURE__ */ jsx(Typo, { as: "p", variant: "caption", children: description }) })
|
|
77
|
+
] }),
|
|
78
|
+
/* @__PURE__ */ jsxs(
|
|
79
|
+
Grid,
|
|
80
|
+
{
|
|
81
|
+
align: "center",
|
|
82
|
+
columns: "1fr auto",
|
|
83
|
+
justify: "between",
|
|
84
|
+
pt: "2",
|
|
85
|
+
style: { marginTop: "auto" },
|
|
86
|
+
width: "100%",
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ jsx(Skeleton, { loading: isLoading, children: /* @__PURE__ */ jsx(Flex, { gap: "3", overflow: "hidden", children: footer }) }),
|
|
89
|
+
Boolean(dropdownItems == null ? void 0 : dropdownItems.length) && /* @__PURE__ */ jsxs(DropdownMenu.Root, { children: [
|
|
90
|
+
/* @__PURE__ */ jsx(DropdownMenu.Trigger, { children: /* @__PURE__ */ jsx(Button, { size: "large", variant: "transparent", children: /* @__PURE__ */ jsx(DotsVerticalIcon, { color: "gray", height: "20px", width: "20px" }) }) }),
|
|
91
|
+
/* @__PURE__ */ jsx(DropdownMenu.Content, { children: dropdownItems == null ? void 0 : dropdownItems.map((item) => /* @__PURE__ */ jsx(
|
|
92
|
+
DropdownMenu.Item,
|
|
93
|
+
{
|
|
94
|
+
onClick: (e) => {
|
|
95
|
+
e.stopPropagation();
|
|
96
|
+
item.onClick();
|
|
97
|
+
},
|
|
98
|
+
children: item.label
|
|
99
|
+
},
|
|
100
|
+
item.label
|
|
101
|
+
)) })
|
|
102
|
+
] })
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
] })
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
ContentsCard.displayName = "ContentsCard";
|
|
113
|
+
|
|
114
|
+
export {
|
|
115
|
+
ContentsCard
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=chunk-A4ZOVTFX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/contents-card.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { Heading } from '@/atoms/heading';\nimport { Button } from '@/atoms/button';\nimport { DropdownMenu } from '@/atoms/dropdown-menu';\nimport { Box } from '@/atoms/box';\nimport { Flex } from '@/atoms/flex';\nimport { Grid } from '@/atoms/grid';\nimport { Skeleton } from '@/atoms/skeleton';\nimport { Typo } from '@/atoms/typo';\nimport { DotsVerticalIcon } from '@/icon';\nimport { Card, Inset } from '@/atoms';\n\nexport interface ContentsCardProps {\n title?: React.ReactNode;\n description?: string;\n id?: string;\n imageSrc?: string | null;\n imageAlt?: string;\n footer?: React.ReactNode;\n dropdownItems?: {\n label: string;\n onClick: () => void;\n }[];\n onClickCard?: () => void;\n isLoading?: boolean;\n}\n\nexport const ContentsCard = forwardRef<HTMLDivElement, ContentsCardProps>(\n (\n {\n title,\n description,\n imageSrc,\n footer,\n dropdownItems,\n onClickCard,\n isLoading = false,\n },\n ref\n ): React.ReactNode => {\n return (\n <Card\n onClick={onClickCard}\n ref={ref}\n style={{\n height: '100%',\n width: '100%',\n display: 'grid',\n cursor: 'pointer',\n maxHeight: '450px',\n }}\n >\n {/* 섬네일 */}\n <Inset clip=\"padding-box\" pb=\"0\" side=\"top\">\n <Skeleton loading={isLoading}>\n <Box\n height=\"210px\"\n style={{\n backgroundImage: `url(${imageSrc})`,\n backgroundSize: 'cover',\n backgroundPosition: 'center',\n }}\n width=\"100%\"\n />\n </Skeleton>\n </Inset>\n {/* 제목, 설명 */}\n <Flex direction=\"column\" p=\"4\" pb=\"3\">\n <Box>\n <Skeleton loading={isLoading}>\n <Heading mb=\"3\" variant=\"heading5\">\n {title}\n </Heading>\n </Skeleton>\n <Skeleton loading={isLoading}>\n <Typo as=\"p\" variant=\"caption\">\n {description}\n </Typo>\n </Skeleton>\n </Box>\n <Grid\n align=\"center\"\n columns=\"1fr auto\"\n justify=\"between\"\n pt=\"2\"\n style={{ marginTop: 'auto' }}\n width=\"100%\"\n >\n <Skeleton loading={isLoading}>\n <Flex gap=\"3\" overflow=\"hidden\">\n {footer}\n </Flex>\n </Skeleton>\n {Boolean(dropdownItems?.length) && (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger>\n <Button size=\"large\" variant=\"transparent\">\n <DotsVerticalIcon color=\"gray\" height=\"20px\" width=\"20px\" />\n </Button>\n </DropdownMenu.Trigger>\n <DropdownMenu.Content>\n {dropdownItems?.map((item) => (\n <DropdownMenu.Item\n key={item.label}\n onClick={(e) => {\n e.stopPropagation();\n item.onClick();\n }}\n >\n {item.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n )}\n </Grid>\n </Flex>\n </Card>\n );\n }\n);\nContentsCard.displayName = 'ContentsCard';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,kBAAkB;AAuDtB,cAaF,YAbE;AA5BL,IAAM,eAAe;AAAA,EAC1B,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,EACd,GACA,QACoB;AACpB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT;AAAA,QACA,OAAO;AAAA,UACL,QAAQ;AAAA,UACR,OAAO;AAAA,UACP,SAAS;AAAA,UACT,QAAQ;AAAA,UACR,WAAW;AAAA,QACb;AAAA,QAGA;AAAA,8BAAC,SAAM,MAAK,eAAc,IAAG,KAAI,MAAK,OACpC,8BAAC,YAAS,SAAS,WACjB;AAAA,YAAC;AAAA;AAAA,cACC,QAAO;AAAA,cACP,OAAO;AAAA,gBACL,iBAAiB,OAAO,QAAQ;AAAA,gBAChC,gBAAgB;AAAA,gBAChB,oBAAoB;AAAA,cACtB;AAAA,cACA,OAAM;AAAA;AAAA,UACR,GACF,GACF;AAAA,UAEA,qBAAC,QAAK,WAAU,UAAS,GAAE,KAAI,IAAG,KAChC;AAAA,iCAAC,OACC;AAAA,kCAAC,YAAS,SAAS,WACjB,8BAAC,WAAQ,IAAG,KAAI,SAAQ,YACrB,iBACH,GACF;AAAA,cACA,oBAAC,YAAS,SAAS,WACjB,8BAAC,QAAK,IAAG,KAAI,SAAQ,WAClB,uBACH,GACF;AAAA,eACF;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,SAAQ;AAAA,gBACR,IAAG;AAAA,gBACH,OAAO,EAAE,WAAW,OAAO;AAAA,gBAC3B,OAAM;AAAA,gBAEN;AAAA,sCAAC,YAAS,SAAS,WACjB,8BAAC,QAAK,KAAI,KAAI,UAAS,UACpB,kBACH,GACF;AAAA,kBACC,QAAQ,+CAAe,MAAM,KAC5B,qBAAC,aAAa,MAAb,EACC;AAAA,wCAAC,aAAa,SAAb,EACC,8BAAC,UAAO,MAAK,SAAQ,SAAQ,eAC3B,8BAAC,oBAAiB,OAAM,QAAO,QAAO,QAAO,OAAM,QAAO,GAC5D,GACF;AAAA,oBACA,oBAAC,aAAa,SAAb,EACE,yDAAe,IAAI,CAAC,SACnB;AAAA,sBAAC,aAAa;AAAA,sBAAb;AAAA,wBAEC,SAAS,CAAC,MAAM;AACd,4BAAE,gBAAgB;AAClB,+BAAK,QAAQ;AAAA,wBACf;AAAA,wBAEC,eAAK;AAAA;AAAA,sBAND,KAAK;AAAA,oBAOZ,IAEJ;AAAA,qBACF;AAAA;AAAA;AAAA,YAEJ;AAAA,aACF;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AACA,aAAa,cAAc;","names":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Grid
|
|
3
|
+
} from "./chunk-EGEQY3KT.js";
|
|
4
|
+
import {
|
|
5
|
+
Heading
|
|
6
|
+
} from "./chunk-34OQDUQR.js";
|
|
7
|
+
import {
|
|
8
|
+
Box
|
|
9
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
10
|
+
import {
|
|
11
|
+
Flex
|
|
12
|
+
} from "./chunk-25HMMI7R.js";
|
|
13
|
+
import {
|
|
14
|
+
Typo
|
|
15
|
+
} from "./chunk-PARGQUJB.js";
|
|
16
|
+
|
|
17
|
+
// src/app/platform/userInfos/coaching-customer-info/small.tsx
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
function CoachingCustomerInfoSmall({
|
|
20
|
+
customer,
|
|
21
|
+
children,
|
|
22
|
+
badge
|
|
23
|
+
}) {
|
|
24
|
+
return /* @__PURE__ */ jsxs(
|
|
25
|
+
Flex,
|
|
26
|
+
{
|
|
27
|
+
direction: { initial: "column", xs: "row" },
|
|
28
|
+
gap: "3",
|
|
29
|
+
justify: "between",
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Grid, { align: "center", columns: "auto auto 1fr", gapX: "3", children: [
|
|
32
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading3", children: (customer == null ? void 0 : customer.username) || "\uC774\uB984 \uC5C6\uC74C" }),
|
|
33
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", truncate: true, variant: "body", children: customer == null ? void 0 : customer.company }),
|
|
34
|
+
/* @__PURE__ */ jsx(Box, { style: { justifySelf: "end" }, children: badge })
|
|
35
|
+
] }) }),
|
|
36
|
+
children
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
CoachingCustomerInfoSmall
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=chunk-A75LCRKO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/userInfos/coaching-customer-info/small.tsx"],"sourcesContent":["import React from 'react';\nimport { Box, Flex, Grid, Heading, Typo } from '../../../../atoms';\nimport type { CoachingCustomerInfoProps } from '../utils';\n\nexport function CoachingCustomerInfoSmall({\n customer,\n children,\n badge,\n}: CoachingCustomerInfoProps): React.ReactNode {\n return (\n <Flex\n direction={{ initial: 'column', xs: 'row' }}\n gap=\"3\"\n justify=\"between\"\n >\n {/* 이름, 사명 */}\n <Box>\n <Grid align=\"center\" columns=\"auto auto 1fr\" gapX=\"3\">\n <Heading variant=\"heading3\">\n {customer?.username || '이름 없음'}\n </Heading>\n <Typo color=\"gray\" truncate variant=\"body\">\n {customer?.company}\n </Typo>\n <Box style={{ justifySelf: 'end' }}>{badge}</Box>\n </Grid>\n </Box>\n {children}\n </Flex>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAiBQ,SACE,KADF;AAbD,SAAS,0BAA0B;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AACF,GAA+C;AAC7C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,EAAE,SAAS,UAAU,IAAI,MAAM;AAAA,MAC1C,KAAI;AAAA,MACJ,SAAQ;AAAA,MAGR;AAAA,4BAAC,OACC,+BAAC,QAAK,OAAM,UAAS,SAAQ,iBAAgB,MAAK,KAChD;AAAA,8BAAC,WAAQ,SAAQ,YACd,gDAAU,aAAY,6BACzB;AAAA,UACA,oBAAC,QAAK,OAAM,QAAO,UAAQ,MAAC,SAAQ,QACjC,+CAAU,SACb;AAAA,UACA,oBAAC,OAAI,OAAO,EAAE,aAAa,MAAM,GAAI,iBAAM;AAAA,WAC7C,GACF;AAAA,QACC;AAAA;AAAA;AAAA,EACH;AAEJ;","names":[]}
|