@tipp/ui 2.3.3 → 2.3.4
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.js +81 -81
- package/dist/app/platform/coach-question-list.js +28 -28
- package/dist/app/platform/contents-card.js +28 -28
- package/dist/app/platform/curriculum-card.js +6 -6
- package/dist/app/platform/edit-coaching-time.js +65 -65
- package/dist/app/platform/edit-service-type.js +66 -66
- package/dist/app/platform/goal-manage-card-edit.js +65 -65
- package/dist/app/platform/goal-manage-card-read.js +28 -28
- package/dist/app/platform/on-offline-radio-card.js +65 -65
- package/dist/app/platform/report-card.js +28 -28
- package/dist/app/platform/reservation-card.js +66 -66
- package/dist/app/platform/session-card.js +68 -68
- package/dist/app/platform/session-review-simple-read.js +28 -28
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +31 -31
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +28 -28
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +28 -28
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +28 -28
- package/dist/app/platform/userInfos/session-user-info-detail.js +28 -28
- package/dist/app/platform/userInfos/utils.js +27 -27
- package/dist/atoms/bullet-text.js +2 -2
- package/dist/atoms/dialog.js +2 -2
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.js +59 -59
- package/dist/atoms/list.js +2 -2
- package/dist/atoms/pagination.js +3 -3
- package/dist/chunk-2ZAUZRYP.js +51 -0
- package/dist/chunk-2ZAUZRYP.js.map +1 -0
- package/dist/chunk-3UB5MADH.js +63 -0
- package/dist/chunk-3UB5MADH.js.map +1 -0
- package/dist/chunk-3XVQJ43L.js +69 -0
- package/dist/chunk-3XVQJ43L.js.map +1 -0
- package/dist/chunk-4H6OYVRA.js +64 -0
- package/dist/chunk-4H6OYVRA.js.map +1 -0
- package/dist/chunk-5773MYBI.js +89 -0
- package/dist/chunk-5773MYBI.js.map +1 -0
- package/dist/chunk-AGDS5FTY.js +30 -0
- package/dist/chunk-AGDS5FTY.js.map +1 -0
- package/dist/chunk-DGXKSYZ2.js +144 -0
- package/dist/chunk-DGXKSYZ2.js.map +1 -0
- package/dist/chunk-ECMGWPU5.js +174 -0
- package/dist/chunk-ECMGWPU5.js.map +1 -0
- package/dist/chunk-FD6QZZQY.js +69 -0
- package/dist/chunk-FD6QZZQY.js.map +1 -0
- package/dist/chunk-FT27KFX7.js +145 -0
- package/dist/chunk-FT27KFX7.js.map +1 -0
- package/dist/chunk-JQ7VQ5SB.js +137 -0
- package/dist/chunk-JQ7VQ5SB.js.map +1 -0
- package/dist/chunk-KFICWJI6.js +61 -0
- package/dist/chunk-KFICWJI6.js.map +1 -0
- package/dist/chunk-KLCL7FKY.js +196 -0
- package/dist/chunk-KLCL7FKY.js.map +1 -0
- package/dist/chunk-KO6ZM4XB.js +37 -0
- package/dist/chunk-KO6ZM4XB.js.map +1 -0
- package/dist/chunk-LNRB4XMK.js +87 -0
- package/dist/chunk-LNRB4XMK.js.map +1 -0
- package/dist/chunk-LWLKHIDE.js +51 -0
- package/dist/chunk-LWLKHIDE.js.map +1 -0
- package/dist/chunk-MBMREYHZ.js +174 -0
- package/dist/chunk-MBMREYHZ.js.map +1 -0
- package/dist/chunk-ORQ4NCWG.js +63 -0
- package/dist/chunk-ORQ4NCWG.js.map +1 -0
- package/dist/chunk-QB73IVKI.js +43 -0
- package/dist/chunk-QB73IVKI.js.map +1 -0
- package/dist/chunk-RYK2ILB2.js +105 -0
- package/dist/chunk-RYK2ILB2.js.map +1 -0
- package/dist/chunk-SYGLFURC.js +49 -0
- package/dist/chunk-SYGLFURC.js.map +1 -0
- package/dist/chunk-T4O3ONUV.js +64 -0
- package/dist/chunk-T4O3ONUV.js.map +1 -0
- package/dist/chunk-T6BKRGZ7.js +54 -0
- package/dist/chunk-T6BKRGZ7.js.map +1 -0
- package/dist/chunk-UCBF57MG.js +196 -0
- package/dist/chunk-UCBF57MG.js.map +1 -0
- package/dist/chunk-UIY4HDKD.js +144 -0
- package/dist/chunk-UIY4HDKD.js.map +1 -0
- package/dist/chunk-UWM72J67.js +151 -0
- package/dist/chunk-UWM72J67.js.map +1 -0
- package/dist/chunk-VIKHKUHF.js +89 -0
- package/dist/chunk-VIKHKUHF.js.map +1 -0
- package/dist/chunk-W6LDMZNY.js +29 -0
- package/dist/chunk-W6LDMZNY.js.map +1 -0
- package/dist/chunk-WPRRJQOM.js +61 -0
- package/dist/chunk-WPRRJQOM.js.map +1 -0
- package/dist/chunk-YZ7LP3PU.js +101 -0
- package/dist/chunk-YZ7LP3PU.js.map +1 -0
- package/dist/context/index.js +5 -5
- package/dist/index.css +12 -0
- package/dist/index.js +133 -133
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +15 -15
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +9 -9
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-header.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-layout.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +19 -19
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +21 -21
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +24 -24
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +7 -7
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +5 -5
- package/dist/molecules/curriculumV2/curriculum-sub-nav.js +4 -4
- package/dist/molecules/curriculumV2/curriculum-v2-layout.js +2 -2
- package/dist/molecules/curriculumV2/index.js +31 -31
- package/dist/molecules/date-picker/date-picker-button.js +6 -6
- package/dist/molecules/date-picker/index.js +5 -5
- package/dist/molecules/download-card.js +2 -2
- package/dist/molecules/dynamic-field.js +4 -4
- package/dist/molecules/dynamic-form.js +5 -5
- package/dist/molecules/expand-table/index.js +4 -4
- package/dist/molecules/force-refresh.js +2 -2
- package/dist/molecules/ghost-post.js +4 -4
- package/dist/molecules/index.js +62 -62
- package/dist/molecules/learning-post.js +5 -5
- package/dist/molecules/navigation.js +3 -3
- package/dist/molecules/one-on-one-guide-list.js +3 -3
- package/dist/molecules/stepper.js +4 -4
- package/dist/molecules/tag-selector.js +5 -5
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
curriculum_item_title_default
|
|
3
|
+
} from "./chunk-MJMHPIYX.js";
|
|
4
|
+
import {
|
|
5
|
+
getCurriculumContentSubTypeText,
|
|
6
|
+
getCurriculumIcon
|
|
7
|
+
} from "./chunk-RYK2ILB2.js";
|
|
8
|
+
|
|
9
|
+
// src/molecules/curriculumV2/CurriculumSidebar/Items/section-item.tsx
|
|
10
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
function SectionCommonItem({
|
|
12
|
+
title,
|
|
13
|
+
duration,
|
|
14
|
+
icon,
|
|
15
|
+
type,
|
|
16
|
+
color = "gray"
|
|
17
|
+
}) {
|
|
18
|
+
const IconComp = getCurriculumIcon({ type, icon });
|
|
19
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20
|
+
/* @__PURE__ */ jsx(IconComp, { color }),
|
|
21
|
+
/* @__PURE__ */ jsx(curriculum_item_title_default, { duration, subText: getCurriculumContentSubTypeText(type), title })
|
|
22
|
+
] });
|
|
23
|
+
}
|
|
24
|
+
var section_item_default = SectionCommonItem;
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
section_item_default
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=chunk-W6LDMZNY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumSidebar/Items/section-item.tsx"],"sourcesContent":["import React from 'react';\nimport { getCurriculumContentSubTypeText, getCurriculumIcon } from '@/utils/curriculum.utils';\nimport CurriculumItemTitle from './curriculum-item-title';\n\ninterface SectionTitleProps {\n title: string;\n duration?: number;\n icon?: string;\n type: string;\n color?: string;\n}\n\nfunction SectionCommonItem({\n title,\n duration,\n icon,\n type,\n color = 'gray',\n}: SectionTitleProps): React.ReactNode {\n const IconComp = getCurriculumIcon({ type, icon });\n\n return (\n <>\n <IconComp color={color} />\n <CurriculumItemTitle duration={duration} subText={getCurriculumContentSubTypeText(type)} title={title} />\n </>\n );\n}\n\nexport default SectionCommonItem;\n"],"mappings":";;;;;;;;;AAsBI,mBACE,KADF;AAVJ,SAAS,kBAAkB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AACV,GAAuC;AACrC,QAAM,WAAW,kBAAkB,EAAE,MAAM,KAAK,CAAC;AAEjD,SACE,iCACE;AAAA,wBAAC,YAAS,OAAc;AAAA,IACxB,oBAAC,iCAAoB,UAAoB,SAAS,gCAAgC,IAAI,GAAG,OAAc;AAAA,KACzG;AAEJ;AAEA,IAAO,uBAAQ;","names":[]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sidebar_item_default
|
|
3
|
+
} from "./chunk-2ZAUZRYP.js";
|
|
4
|
+
import {
|
|
5
|
+
useCurriculumContext
|
|
6
|
+
} from "./chunk-IYQJIEVM.js";
|
|
7
|
+
import {
|
|
8
|
+
Tabs
|
|
9
|
+
} from "./chunk-5ZITU5L7.js";
|
|
10
|
+
import {
|
|
11
|
+
Grid
|
|
12
|
+
} from "./chunk-EGEQY3KT.js";
|
|
13
|
+
import {
|
|
14
|
+
Box
|
|
15
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
16
|
+
|
|
17
|
+
// src/molecules/curriculumV2/CurriculumSidebar/index.tsx
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
var TAB_LIST = [
|
|
20
|
+
{
|
|
21
|
+
label: "\uAC15\uC758 \uBAA9\uCC28",
|
|
22
|
+
value: "curriculum"
|
|
23
|
+
}
|
|
24
|
+
];
|
|
25
|
+
function CurriculumSidebar() {
|
|
26
|
+
const { curriculum, selectedIndex, setSelectedIndex, scrollAreaRef, curriculumCompleteMap } = useCurriculumContext();
|
|
27
|
+
const list = curriculum.contents.list;
|
|
28
|
+
return /* @__PURE__ */ jsx(Tabs.Root, { asChild: true, defaultValue: TAB_LIST[0].value, children: /* @__PURE__ */ jsxs(Grid, { height: "100%", overflowY: "auto", rows: "auto 1fr ", width: "100%", children: [
|
|
29
|
+
/* @__PURE__ */ jsx(Tabs.List, { style: { padding: "0 var(--space-3)" }, children: TAB_LIST.map((tab) => /* @__PURE__ */ jsx(Tabs.Trigger, { value: tab.value, children: tab.label }, tab.value)) }),
|
|
30
|
+
/* @__PURE__ */ jsx(
|
|
31
|
+
Box,
|
|
32
|
+
{
|
|
33
|
+
height: "100%",
|
|
34
|
+
overflowY: "auto",
|
|
35
|
+
position: "relative",
|
|
36
|
+
ref: scrollAreaRef,
|
|
37
|
+
width: "100%",
|
|
38
|
+
children: /* @__PURE__ */ jsxs(
|
|
39
|
+
Tabs.Content,
|
|
40
|
+
{
|
|
41
|
+
style: {
|
|
42
|
+
position: "absolute",
|
|
43
|
+
height: "100%",
|
|
44
|
+
width: "100%"
|
|
45
|
+
},
|
|
46
|
+
value: TAB_LIST[0].value,
|
|
47
|
+
children: [
|
|
48
|
+
list.map((item, index) => /* @__PURE__ */ jsx(sidebar_item_default, { done: curriculumCompleteMap[item.uuid], index, item, selectedIndex, setSelectedIndex }, item.uuid)),
|
|
49
|
+
/* @__PURE__ */ jsx(Box, { height: "150px" })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] }) });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export {
|
|
59
|
+
CurriculumSidebar
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=chunk-WPRRJQOM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumSidebar/index.tsx"],"sourcesContent":["import React from 'react';\nimport { Box } from '@/atoms/box';\nimport { Grid } from '@/atoms/grid';\nimport { Tabs } from '@/atoms/tabs';\nimport { useCurriculumContext } from '../curriculum-context'; \nimport SidebarItem from './sidebar-item';\n\nconst TAB_LIST = [\n {\n label: '강의 목차',\n value: 'curriculum',\n },\n];\nexport function CurriculumSidebar(): React.ReactNode {\n const { curriculum, selectedIndex, setSelectedIndex, scrollAreaRef, curriculumCompleteMap } =\n useCurriculumContext();\n const list = curriculum.contents.list;\n \n\n return (\n <Tabs.Root asChild defaultValue={TAB_LIST[0].value}>\n <Grid height=\"100%\" overflowY=\"auto\" rows=\"auto 1fr \" width=\"100%\">\n <Tabs.List style={{ padding: '0 var(--space-3)' }}>\n {TAB_LIST.map((tab) => (\n <Tabs.Trigger key={tab.value} value={tab.value}>\n {tab.label}\n </Tabs.Trigger>\n ))}\n </Tabs.List>\n <Box\n height=\"100%\"\n overflowY=\"auto\"\n position=\"relative\"\n ref={scrollAreaRef}\n width=\"100%\"\n >\n <Tabs.Content\n style={{\n position: 'absolute',\n height: '100%',\n width: '100%',\n }}\n value={TAB_LIST[0].value}\n >\n {list.map((item, index) => (\n <SidebarItem done={curriculumCompleteMap[item.uuid]} index={index} item={item} key={item.uuid} selectedIndex={selectedIndex} setSelectedIndex={setSelectedIndex} />\n ))}\n <Box height=\"150px\" />\n </Tabs.Content>\n </Box>\n </Grid>\n </Tabs.Root>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAwBY,cAYF,YAZE;AAjBZ,IAAM,WAAW;AAAA,EACf;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACF;AACO,SAAS,oBAAqC;AACnD,QAAM,EAAE,YAAY,eAAe,kBAAkB,eAAe,sBAAsB,IACxF,qBAAqB;AACvB,QAAM,OAAO,WAAW,SAAS;AAGjC,SACE,oBAAC,KAAK,MAAL,EAAU,SAAO,MAAC,cAAc,SAAS,CAAC,EAAE,OAC3C,+BAAC,QAAK,QAAO,QAAO,WAAU,QAAO,MAAK,aAAY,OAAM,QAC1D;AAAA,wBAAC,KAAK,MAAL,EAAU,OAAO,EAAE,SAAS,mBAAmB,GAC7C,mBAAS,IAAI,CAAC,QACb,oBAAC,KAAK,SAAL,EAA6B,OAAO,IAAI,OACtC,cAAI,SADY,IAAI,KAEvB,CACD,GACH;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,QAAO;AAAA,QACP,WAAU;AAAA,QACV,UAAS;AAAA,QACT,KAAK;AAAA,QACL,OAAM;AAAA,QAEN;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,OAAO;AAAA,cACL,UAAU;AAAA,cACV,QAAQ;AAAA,cACR,OAAO;AAAA,YACT;AAAA,YACA,OAAO,SAAS,CAAC,EAAE;AAAA,YAElB;AAAA,mBAAK,IAAI,CAAC,MAAM,UACf,oBAAC,wBAAY,MAAM,sBAAsB,KAAK,IAAI,GAAG,OAAc,MAA4B,eAA8B,oBAAzC,KAAK,IAAwE,CAClK;AAAA,cACD,oBAAC,OAAI,QAAO,SAAQ;AAAA;AAAA;AAAA,QACtB;AAAA;AAAA,IACF;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ReviewQuestionContentHeader
|
|
3
|
+
} from "./chunk-QB73IVKI.js";
|
|
4
|
+
import {
|
|
5
|
+
RadioButtonCard
|
|
6
|
+
} from "./chunk-CSKNBWPB.js";
|
|
7
|
+
import {
|
|
8
|
+
Grid
|
|
9
|
+
} from "./chunk-EGEQY3KT.js";
|
|
10
|
+
import {
|
|
11
|
+
Box
|
|
12
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
13
|
+
import {
|
|
14
|
+
Typo
|
|
15
|
+
} from "./chunk-PMJIFLDT.js";
|
|
16
|
+
import {
|
|
17
|
+
Flex
|
|
18
|
+
} from "./chunk-25HMMI7R.js";
|
|
19
|
+
import {
|
|
20
|
+
Button
|
|
21
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
22
|
+
import {
|
|
23
|
+
Card
|
|
24
|
+
} from "./chunk-RP2RGCAW.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-YZ7LP3PU.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 } from '@/atoms/box';\nimport { Button } from '@/atoms/button';\nimport { Card } from '@/atoms/card';\nimport { Flex } from '@/atoms/flex';\nimport { Grid } from '@/atoms/grid';\nimport { Typo } from '@/atoms/typo';\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;AAyC9C,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":[]}
|
package/dist/context/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "../chunk-P5EMTC35.js";
|
|
2
|
-
import {
|
|
3
|
-
DynamicFormProvider,
|
|
4
|
-
useDynamicForm
|
|
5
|
-
} from "../chunk-O2S7S5B4.js";
|
|
6
|
-
import "../chunk-2OMSNCRH.js";
|
|
7
2
|
import {
|
|
8
3
|
UIStateContext,
|
|
9
4
|
UIStateProvider,
|
|
10
5
|
useUIState
|
|
11
6
|
} from "../chunk-PT57HCAI.js";
|
|
7
|
+
import {
|
|
8
|
+
DynamicFormProvider,
|
|
9
|
+
useDynamicForm
|
|
10
|
+
} from "../chunk-O2S7S5B4.js";
|
|
11
|
+
import "../chunk-2OMSNCRH.js";
|
|
12
12
|
import "../chunk-BESTU2AY.js";
|
|
13
13
|
import "../chunk-PMJIFLDT.js";
|
|
14
14
|
import "../chunk-LDBWASUA.js";
|
package/dist/index.css
CHANGED
|
@@ -31195,14 +31195,26 @@ p.kg-collection-card-post-excerpt{
|
|
|
31195
31195
|
}
|
|
31196
31196
|
.DialogOverlay{
|
|
31197
31197
|
background-color: var(--black-a9);
|
|
31198
|
+
position: fixed;
|
|
31199
|
+
inset: 0;
|
|
31200
|
+
animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
31201
|
+
display: flex;
|
|
31202
|
+
align-items: center;
|
|
31203
|
+
justify-content: center;
|
|
31204
|
+
width: 100%;
|
|
31205
|
+
height: 100%;
|
|
31198
31206
|
}
|
|
31199
31207
|
.DialogContent{
|
|
31208
|
+
background-color: var(--color-panel);
|
|
31209
|
+
border-radius: var(--radius-4);
|
|
31210
|
+
box-shadow: var(--shadow-2);
|
|
31200
31211
|
overflow: visible;
|
|
31201
31212
|
max-height: 100vh;
|
|
31202
31213
|
position: fixed;
|
|
31203
31214
|
top: 50%;
|
|
31204
31215
|
left: 50%;
|
|
31205
31216
|
transform: translate(-50%, -50%);
|
|
31217
|
+
padding: var(--space-6);
|
|
31206
31218
|
animation: contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
31207
31219
|
min-width: 280px;
|
|
31208
31220
|
}
|