@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,137 @@
|
|
|
1
|
+
import {
|
|
2
|
+
usePortalContainer
|
|
3
|
+
} from "./chunk-U7N2PWMO.js";
|
|
4
|
+
import {
|
|
5
|
+
IconButton
|
|
6
|
+
} from "./chunk-XK6VEVOK.js";
|
|
7
|
+
import {
|
|
8
|
+
Heading
|
|
9
|
+
} from "./chunk-BESTU2AY.js";
|
|
10
|
+
import {
|
|
11
|
+
__objRest,
|
|
12
|
+
__spreadProps,
|
|
13
|
+
__spreadValues
|
|
14
|
+
} from "./chunk-CRTRMMJ7.js";
|
|
15
|
+
|
|
16
|
+
// src/atoms/dialog.tsx
|
|
17
|
+
import * as RadixDialog from "@radix-ui/react-dialog";
|
|
18
|
+
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
19
|
+
import { Flex, Theme } from "@radix-ui/themes";
|
|
20
|
+
import { useEffect, useRef } from "react";
|
|
21
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
+
var preventDefault = (e) => {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
};
|
|
25
|
+
function Content2(props) {
|
|
26
|
+
const _a = props, {
|
|
27
|
+
children,
|
|
28
|
+
style = {},
|
|
29
|
+
width,
|
|
30
|
+
maxWidth,
|
|
31
|
+
minWidth,
|
|
32
|
+
maxHeight,
|
|
33
|
+
height,
|
|
34
|
+
minHeight,
|
|
35
|
+
title,
|
|
36
|
+
buttons,
|
|
37
|
+
size,
|
|
38
|
+
hideCloseButton,
|
|
39
|
+
className
|
|
40
|
+
} = _a, rest = __objRest(_a, [
|
|
41
|
+
"children",
|
|
42
|
+
"style",
|
|
43
|
+
"width",
|
|
44
|
+
"maxWidth",
|
|
45
|
+
"minWidth",
|
|
46
|
+
"maxHeight",
|
|
47
|
+
"height",
|
|
48
|
+
"minHeight",
|
|
49
|
+
"title",
|
|
50
|
+
"buttons",
|
|
51
|
+
"size",
|
|
52
|
+
"hideCloseButton",
|
|
53
|
+
"className"
|
|
54
|
+
]);
|
|
55
|
+
const { dialogContainerRef } = usePortalContainer();
|
|
56
|
+
return /* @__PURE__ */ jsx(RadixDialog.Portal, { container: dialogContainerRef.current, children: /* @__PURE__ */ jsx(Theme, { asChild: true, children: /* @__PURE__ */ jsx(RadixDialog.Overlay, { className: "rt-BaseDialogScroll rt-DialogScroll DialogOverlay", children: /* @__PURE__ */ jsxs(
|
|
57
|
+
RadixDialog.Content,
|
|
58
|
+
__spreadProps(__spreadValues({
|
|
59
|
+
className: `DialogContent ${className || ""} rt-BaseDialogContent rt-DialogContent rt-r-size-${size || "3"}`,
|
|
60
|
+
onPointerDownOutside: preventDefault,
|
|
61
|
+
style: __spreadValues({
|
|
62
|
+
width,
|
|
63
|
+
maxWidth,
|
|
64
|
+
minWidth,
|
|
65
|
+
maxHeight,
|
|
66
|
+
height,
|
|
67
|
+
minHeight
|
|
68
|
+
}, style)
|
|
69
|
+
}, rest), {
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsxs(Flex, { gap: "2", justify: "between", width: "100%", children: [
|
|
72
|
+
/* @__PURE__ */ jsx(RadixDialog.Title, { asChild: true, children: typeof title === "string" && title !== "" ? /* @__PURE__ */ jsx(Heading, { mb: "2", variant: "heading3", children: title }) : title }),
|
|
73
|
+
!hideCloseButton && /* @__PURE__ */ jsx(RadixDialog.Close, { asChild: true, className: "DialogClose", children: /* @__PURE__ */ jsx(IconButton, { color: "gray", variant: "ghost", children: /* @__PURE__ */ jsx(Cross1Icon, {}) }) })
|
|
74
|
+
] }),
|
|
75
|
+
children,
|
|
76
|
+
buttons ? /* @__PURE__ */ jsx(Flex, { gap: "3", justify: "end", mt: "3", width: "100%", children: buttons }) : null
|
|
77
|
+
]
|
|
78
|
+
})
|
|
79
|
+
) }) }) });
|
|
80
|
+
}
|
|
81
|
+
function Close2(_a) {
|
|
82
|
+
var _b = _a, {
|
|
83
|
+
children
|
|
84
|
+
} = _b, rest = __objRest(_b, [
|
|
85
|
+
"children"
|
|
86
|
+
]);
|
|
87
|
+
return /* @__PURE__ */ jsx(RadixDialog.Close, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
88
|
+
}
|
|
89
|
+
function Trigger2(_a) {
|
|
90
|
+
var _b = _a, {
|
|
91
|
+
children
|
|
92
|
+
} = _b, rest = __objRest(_b, [
|
|
93
|
+
"children"
|
|
94
|
+
]);
|
|
95
|
+
return /* @__PURE__ */ jsx(RadixDialog.Trigger, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
96
|
+
}
|
|
97
|
+
function Root2(props) {
|
|
98
|
+
const prevOpenRef = useRef(void 0);
|
|
99
|
+
const cleanupExecutedRef = useRef(false);
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
const prevOpen = prevOpenRef.current;
|
|
102
|
+
const currentOpen = props.open;
|
|
103
|
+
if (prevOpen === true && currentOpen === false && !cleanupExecutedRef.current) {
|
|
104
|
+
cleanupExecutedRef.current = true;
|
|
105
|
+
const timer = setTimeout(() => {
|
|
106
|
+
var _a;
|
|
107
|
+
try {
|
|
108
|
+
const activeElement = document.activeElement;
|
|
109
|
+
(_a = activeElement == null ? void 0 : activeElement.blur) == null ? void 0 : _a.call(activeElement);
|
|
110
|
+
document.body.style.pointerEvents = "";
|
|
111
|
+
} catch (e) {
|
|
112
|
+
} finally {
|
|
113
|
+
cleanupExecutedRef.current = false;
|
|
114
|
+
}
|
|
115
|
+
}, 100);
|
|
116
|
+
return () => {
|
|
117
|
+
clearTimeout(timer);
|
|
118
|
+
cleanupExecutedRef.current = false;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
prevOpenRef.current = currentOpen;
|
|
122
|
+
}, [props.open]);
|
|
123
|
+
return /* @__PURE__ */ jsx(RadixDialog.Root, __spreadValues({}, props));
|
|
124
|
+
}
|
|
125
|
+
var Dialog = {
|
|
126
|
+
Root: Root2,
|
|
127
|
+
Trigger: Trigger2,
|
|
128
|
+
Content: Content2,
|
|
129
|
+
Close: Close2,
|
|
130
|
+
Description: RadixDialog.Description,
|
|
131
|
+
Title: RadixDialog.Title
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export {
|
|
135
|
+
Dialog
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=chunk-JQ7VQ5SB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/atoms/dialog.tsx"],"sourcesContent":["import * as RadixDialog from '@radix-ui/react-dialog';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { Flex, Theme } from '@radix-ui/themes';\nimport { useEffect, useRef } from 'react';\nimport { usePortalContainer } from '@/theme/portal-provider';\nimport { Heading } from './heading';\nimport { IconButton } from './icon-button';\n\ntype ContentProps = RadixDialog.DialogContentProps & {\n width?: string;\n maxWidth?: string;\n minWidth?: string;\n height?: string;\n maxHeight?: string;\n minHeight?: string;\n title?: string;\n hideCloseButton?: boolean;\n buttons?: React.ReactNode;\n size?: '1' | '2' | '3' | '4';\n};\n\nconst preventDefault: RadixDialog.DialogContentProps['onPointerDownOutside'] = (\n e\n) => {\n e.preventDefault();\n};\n\nfunction Content(props: ContentProps): React.ReactNode {\n const {\n children,\n style = {},\n width,\n maxWidth,\n minWidth,\n maxHeight,\n height,\n minHeight,\n title,\n buttons,\n size,\n hideCloseButton,\n className,\n ...rest\n } = props;\n const { dialogContainerRef } = usePortalContainer();\n\n return (\n <RadixDialog.Portal container={dialogContainerRef.current}>\n <Theme asChild>\n <RadixDialog.Overlay className=\"rt-BaseDialogScroll rt-DialogScroll DialogOverlay\">\n <RadixDialog.Content\n className={`DialogContent ${className || ''} rt-BaseDialogContent rt-DialogContent rt-r-size-${size||'3'}`}\n onPointerDownOutside={preventDefault}\n style={{\n width,\n maxWidth,\n minWidth,\n maxHeight,\n height,\n minHeight,\n ...style,\n }}\n {...rest}\n >\n <Flex gap=\"2\" justify=\"between\" width=\"100%\">\n <RadixDialog.Title asChild>\n {typeof title === 'string' && title !== '' ? (\n <Heading mb=\"2\" variant=\"heading3\">\n {title}\n </Heading>\n ) : (\n title\n )}\n </RadixDialog.Title>\n {!hideCloseButton && (\n <RadixDialog.Close asChild className=\"DialogClose\">\n <IconButton color=\"gray\" variant=\"ghost\">\n <Cross1Icon />\n </IconButton>\n </RadixDialog.Close>\n )}\n </Flex>\n {children}\n {buttons ? (\n <Flex gap=\"3\" justify=\"end\" mt=\"3\" width=\"100%\">\n {buttons}\n </Flex>\n ) : null}\n </RadixDialog.Content>\n </RadixDialog.Overlay>\n </Theme>\n </RadixDialog.Portal>\n );\n}\n\nfunction Close({\n children,\n ...rest\n}: RadixDialog.DialogCloseProps): React.ReactNode {\n return (\n <RadixDialog.Close asChild {...rest}>\n {children}\n </RadixDialog.Close>\n );\n}\n\nfunction Trigger({\n children,\n ...rest\n}: RadixDialog.DialogTriggerProps): React.ReactNode {\n return (\n <RadixDialog.Trigger asChild {...rest}>\n {children}\n </RadixDialog.Trigger>\n );\n}\n\nfunction Root(props: RadixDialog.DialogProps): React.ReactNode {\n const prevOpenRef = useRef<boolean | undefined>(undefined);\n const cleanupExecutedRef = useRef<boolean>(false);\n\n // 모달이 닫힌 후 포커스 복원 및 이벤트 정리\n useEffect(() => {\n const prevOpen = prevOpenRef.current;\n const currentOpen = props.open;\n\n // 모달이 열린 상태에서 닫힌 상태로 변경될 때만 실행\n if (prevOpen === true && currentOpen === false && !cleanupExecutedRef.current) {\n cleanupExecutedRef.current = true;\n \n // 모달이 닫힌 후 약간의 지연을 두고 포커스 복원\n const timer = setTimeout(() => {\n try {\n // 활성 요소에 포커스 복원\n const activeElement = document.activeElement as HTMLElement | null;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- 어떤 dom인지 확실하지 않음\n activeElement?.blur?.();\n\n // body의 pointer-events 복원\n document.body.style.pointerEvents = '';\n } catch {\n // 에러 무시\n } finally {\n cleanupExecutedRef.current = false;\n }\n }, 100);\n\n return () => { \n clearTimeout(timer);\n cleanupExecutedRef.current = false;\n };\n }\n\n // 현재 상태를 이전 상태로 업데이트\n prevOpenRef.current = currentOpen;\n }, [props.open]);\n\n return <RadixDialog.Root {...props} />;\n}\n\nexport const Dialog = {\n Root,\n Trigger,\n Content,\n Close,\n Description: RadixDialog.Description,\n Title: RadixDialog.Title,\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,YAAY,iBAAiB;AAC7B,SAAS,kBAAkB;AAC3B,SAAS,MAAM,aAAa;AAC5B,SAAS,WAAW,cAAc;AA6DtB,SAGM,KAHN;AA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|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sidebar_item_default
|
|
3
|
+
} from "./chunk-LWLKHIDE.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-KFICWJI6.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,196 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CurriculumReviewSteps_default
|
|
3
|
+
} from "./chunk-5773MYBI.js";
|
|
4
|
+
import {
|
|
5
|
+
useCurriculumContext
|
|
6
|
+
} from "./chunk-IYQJIEVM.js";
|
|
7
|
+
import {
|
|
8
|
+
Dialog
|
|
9
|
+
} from "./chunk-AH4A53SZ.js";
|
|
10
|
+
import {
|
|
11
|
+
IconButton
|
|
12
|
+
} from "./chunk-XK6VEVOK.js";
|
|
13
|
+
import {
|
|
14
|
+
Box
|
|
15
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
16
|
+
import {
|
|
17
|
+
Typo
|
|
18
|
+
} from "./chunk-PMJIFLDT.js";
|
|
19
|
+
import {
|
|
20
|
+
Flex
|
|
21
|
+
} from "./chunk-25HMMI7R.js";
|
|
22
|
+
import {
|
|
23
|
+
Button
|
|
24
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
25
|
+
import {
|
|
26
|
+
__spreadValues
|
|
27
|
+
} from "./chunk-CRTRMMJ7.js";
|
|
28
|
+
|
|
29
|
+
// src/molecules/curriculumV2/CurriculumContents/curriculum-review.tsx
|
|
30
|
+
import { useCallback, useMemo, useState } from "react";
|
|
31
|
+
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
32
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
33
|
+
function CurriculumReview(props) {
|
|
34
|
+
const { item, sectionTitle } = props;
|
|
35
|
+
const { description, buttonTitle } = item;
|
|
36
|
+
const {
|
|
37
|
+
curriculum,
|
|
38
|
+
onReviewSubmit: _onReviewSubmit,
|
|
39
|
+
onReviewValueChange: _onReviewValueChange,
|
|
40
|
+
curriculumReviewAnswers,
|
|
41
|
+
tempCurriculumReviewAnswers,
|
|
42
|
+
curriculumCompleteMap
|
|
43
|
+
} = useCurriculumContext();
|
|
44
|
+
const [open, setOpen] = useState(false);
|
|
45
|
+
const [isChanged, setIsChanged] = useState(false);
|
|
46
|
+
const [closeDialogOpen, setCloseDialogOpen] = useState(false);
|
|
47
|
+
const onReviewValueChange = useCallback(
|
|
48
|
+
({
|
|
49
|
+
reviewId,
|
|
50
|
+
answer
|
|
51
|
+
}) => {
|
|
52
|
+
if (curriculumReviewAnswers[reviewId] === answer[reviewId]) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
setIsChanged(true);
|
|
56
|
+
_onReviewValueChange({ reviewId, answer });
|
|
57
|
+
},
|
|
58
|
+
[_onReviewValueChange, curriculumReviewAnswers]
|
|
59
|
+
);
|
|
60
|
+
const onReviewSubmit = useCallback(
|
|
61
|
+
(values) => {
|
|
62
|
+
return _onReviewSubmit({ reviewId: item.uuid, answer: values }).then(
|
|
63
|
+
(result) => {
|
|
64
|
+
setIsChanged(false);
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
},
|
|
69
|
+
[item.uuid, _onReviewSubmit]
|
|
70
|
+
);
|
|
71
|
+
const onClickEndReview = useCallback(() => {
|
|
72
|
+
setOpen(false);
|
|
73
|
+
}, []);
|
|
74
|
+
const onClickCloseDrawer = useCallback(() => {
|
|
75
|
+
if (isChanged) {
|
|
76
|
+
setCloseDialogOpen(true);
|
|
77
|
+
} else {
|
|
78
|
+
setOpen(false);
|
|
79
|
+
}
|
|
80
|
+
}, [isChanged]);
|
|
81
|
+
const mode = useMemo(() => {
|
|
82
|
+
return item.questions.every(
|
|
83
|
+
(question) => curriculumReviewAnswers[question.uuid] && curriculumReviewAnswers[question.uuid] !== ""
|
|
84
|
+
) ? "edit" : "create";
|
|
85
|
+
}, [curriculumReviewAnswers, item.questions]);
|
|
86
|
+
const defaultValues = useMemo(() => {
|
|
87
|
+
const allAnswers = __spreadValues(__spreadValues({}, tempCurriculumReviewAnswers), curriculumReviewAnswers);
|
|
88
|
+
return item.questions.reduce((acc, question) => {
|
|
89
|
+
acc[question.uuid] = allAnswers[question.uuid] || "";
|
|
90
|
+
return acc;
|
|
91
|
+
}, {});
|
|
92
|
+
}, [curriculumReviewAnswers, item.questions, tempCurriculumReviewAnswers]);
|
|
93
|
+
const done = useMemo(() => {
|
|
94
|
+
return Boolean(curriculumCompleteMap[item.uuid]);
|
|
95
|
+
}, [curriculumCompleteMap, item.uuid]);
|
|
96
|
+
const bgColor = done ? "var(--color-panel-solid)" : void 0;
|
|
97
|
+
return /* @__PURE__ */ jsxs(Dialog.Root, { onOpenChange: setOpen, open, children: [
|
|
98
|
+
/* @__PURE__ */ jsxs(
|
|
99
|
+
Flex,
|
|
100
|
+
{
|
|
101
|
+
align: "center",
|
|
102
|
+
direction: "column",
|
|
103
|
+
height: "100%",
|
|
104
|
+
justify: "center",
|
|
105
|
+
px: "3",
|
|
106
|
+
py: "3",
|
|
107
|
+
style: {
|
|
108
|
+
backgroundImage: `url(https://tipp-coaching-live.s3.ap-northeast-2.amazonaws.com/images/curriculum_review_bg.png)`,
|
|
109
|
+
backgroundPosition: "center",
|
|
110
|
+
backgroundSize: "cover",
|
|
111
|
+
backgroundRepeat: "no-repeat"
|
|
112
|
+
},
|
|
113
|
+
width: "100%",
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", weight: "bold", children: curriculum.title }),
|
|
116
|
+
/* @__PURE__ */ jsx(Typo, { align: "center", as: "p", color: "gray", children: description }),
|
|
117
|
+
/* @__PURE__ */ jsx(Dialog.Trigger, { children: /* @__PURE__ */ jsx(
|
|
118
|
+
Button,
|
|
119
|
+
{
|
|
120
|
+
mt: "3",
|
|
121
|
+
style: { minWidth: 232, backgroundColor: bgColor },
|
|
122
|
+
variant: done ? "outline" : "solid",
|
|
123
|
+
children: /* @__PURE__ */ jsx(Typo, { truncate: true, children: done ? "\uB098\uC758 \uC751\uB2F5 \uB2E4\uC2DC\uBCF4\uAE30" : buttonTitle })
|
|
124
|
+
}
|
|
125
|
+
) })
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
),
|
|
129
|
+
/* @__PURE__ */ jsx(
|
|
130
|
+
Dialog.Content,
|
|
131
|
+
{
|
|
132
|
+
height: "100%",
|
|
133
|
+
hideCloseButton: true,
|
|
134
|
+
style: { borderRadius: 0, padding: 0 },
|
|
135
|
+
title: "",
|
|
136
|
+
width: "100%",
|
|
137
|
+
children: /* @__PURE__ */ jsxs(
|
|
138
|
+
Flex,
|
|
139
|
+
{
|
|
140
|
+
align: "center",
|
|
141
|
+
height: "100%",
|
|
142
|
+
justify: "center",
|
|
143
|
+
pb: "3",
|
|
144
|
+
position: "relative",
|
|
145
|
+
width: "100%",
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ jsx(
|
|
148
|
+
CurriculumReviewSteps_default,
|
|
149
|
+
{
|
|
150
|
+
contents: item,
|
|
151
|
+
curriculum,
|
|
152
|
+
defaultValues,
|
|
153
|
+
done,
|
|
154
|
+
mode,
|
|
155
|
+
onClickEndReview,
|
|
156
|
+
onReviewValueChange,
|
|
157
|
+
onSubmit: onReviewSubmit,
|
|
158
|
+
title: sectionTitle
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
/* @__PURE__ */ jsx(Box, { position: "absolute", right: "16px", top: "16px", children: /* @__PURE__ */ jsxs(
|
|
162
|
+
IconButton,
|
|
163
|
+
{
|
|
164
|
+
color: "gray",
|
|
165
|
+
onClick: onClickCloseDrawer,
|
|
166
|
+
variant: "ghost",
|
|
167
|
+
children: [
|
|
168
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "none", md: "block" }, children: /* @__PURE__ */ jsx(Cross1Icon, { height: 20, width: 20 }) }),
|
|
169
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "block", md: "none" }, children: /* @__PURE__ */ jsx(Cross1Icon, { height: 16, width: 16 }) })
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
) }),
|
|
173
|
+
/* @__PURE__ */ jsx(Dialog.Root, { onOpenChange: setCloseDialogOpen, open: closeDialogOpen, children: /* @__PURE__ */ jsx(
|
|
174
|
+
Dialog.Content,
|
|
175
|
+
{
|
|
176
|
+
buttons: /* @__PURE__ */ jsxs(Flex, { gap: "3", justify: "end", children: [
|
|
177
|
+
/* @__PURE__ */ jsx(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { color: "gray", variant: "outline", children: "\uB3CC\uC544\uAC00\uAE30" }) }),
|
|
178
|
+
/* @__PURE__ */ jsx(Dialog.Close, { children: /* @__PURE__ */ jsx(Button, { color: "red", onClick: onClickEndReview, children: "\uB098\uAC00\uAE30" }) })
|
|
179
|
+
] }),
|
|
180
|
+
title: "\uC791\uC131\uC744 \uC911\uB2E8\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",
|
|
181
|
+
children: /* @__PURE__ */ jsx(Typo, { children: "\uD398\uC774\uC9C0\uC5D0\uC11C \uBC97\uC5B4\uB098\uBA74 \uC791\uC131\uD55C \uB0B4\uC6A9\uC774 \uC800\uC7A5\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." })
|
|
182
|
+
}
|
|
183
|
+
) })
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
)
|
|
187
|
+
}
|
|
188
|
+
)
|
|
189
|
+
] });
|
|
190
|
+
}
|
|
191
|
+
var curriculum_review_default = CurriculumReview;
|
|
192
|
+
|
|
193
|
+
export {
|
|
194
|
+
curriculum_review_default
|
|
195
|
+
};
|
|
196
|
+
//# sourceMappingURL=chunk-KLCL7FKY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/curriculum-review.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { Box } from '@/atoms/box';\nimport { Button } from '@/atoms/button';\nimport { Dialog } from '@/atoms/dialog';\nimport { Flex } from '@/atoms/flex';\nimport { IconButton } from '@/atoms/icon-button';\nimport { Typo } from '@/atoms/typo';\nimport { type CurriculumReviewContents } from '@/types/curriculumContents.type';\nimport { useCurriculumContext } from '../curriculum-context';\nimport CurriculumReviewSteps from './CurriculumReviewSteps';\n\ninterface CurriculumReviewProps {\n item: CurriculumReviewContents;\n sectionTitle: string | undefined;\n}\n\nfunction CurriculumReview(props: CurriculumReviewProps): React.ReactNode {\n const { item, sectionTitle } = props;\n const { description, buttonTitle } = item;\n const {\n curriculum,\n onReviewSubmit: _onReviewSubmit,\n onReviewValueChange: _onReviewValueChange,\n curriculumReviewAnswers,\n tempCurriculumReviewAnswers,\n curriculumCompleteMap,\n } = useCurriculumContext();\n const [open, setOpen] = useState(false);\n const [isChanged, setIsChanged] = useState(false);\n const [closeDialogOpen, setCloseDialogOpen] = useState(false);\n\n const onReviewValueChange = useCallback(\n ({\n reviewId,\n answer,\n }: {\n reviewId: string;\n answer: Record<string, string>;\n }) => {\n if (curriculumReviewAnswers[reviewId] === answer[reviewId]) {\n return;\n }\n\n setIsChanged(true);\n _onReviewValueChange({ reviewId, answer });\n },\n [_onReviewValueChange, curriculumReviewAnswers]\n );\n\n const onReviewSubmit = useCallback(\n (values: Record<string, string>) => {\n return _onReviewSubmit({ reviewId: item.uuid, answer: values }).then(\n (result) => {\n setIsChanged(false);\n return result;\n }\n );\n },\n [item.uuid, _onReviewSubmit]\n );\n\n const onClickEndReview = useCallback(() => {\n setOpen(false);\n }, []);\n\n const onClickCloseDrawer = useCallback(() => {\n if (isChanged) {\n setCloseDialogOpen(true);\n } else {\n setOpen(false);\n }\n }, [isChanged]);\n\n const mode = useMemo(() => {\n return item.questions.every(\n (question) =>\n curriculumReviewAnswers[question.uuid] &&\n curriculumReviewAnswers[question.uuid] !== ''\n )\n ? 'edit'\n : 'create';\n }, [curriculumReviewAnswers, item.questions]);\n\n const defaultValues = useMemo(() => {\n const allAnswers = {\n ...tempCurriculumReviewAnswers,\n ...curriculumReviewAnswers,\n };\n\n return item.questions.reduce<Record<string, string>>((acc, question) => {\n acc[question.uuid] = allAnswers[question.uuid] || '';\n return acc;\n }, {});\n }, [curriculumReviewAnswers, item.questions, tempCurriculumReviewAnswers]);\n\n const done = useMemo(() => {\n return Boolean(curriculumCompleteMap[item.uuid]);\n }, [curriculumCompleteMap, item.uuid]);\n\n const bgColor = done ? 'var(--color-panel-solid)' : undefined;\n\n return (\n <Dialog.Root onOpenChange={setOpen} open={open}>\n <Flex\n align=\"center\"\n direction=\"column\"\n height=\"100%\"\n justify=\"center\"\n px=\"3\"\n py=\"3\"\n style={{\n backgroundImage: `url(https://tipp-coaching-live.s3.ap-northeast-2.amazonaws.com/images/curriculum_review_bg.png)`,\n backgroundPosition: 'center',\n backgroundSize: 'cover',\n backgroundRepeat: 'no-repeat',\n }}\n width=\"100%\"\n >\n <Typo color=\"gray\" weight=\"bold\">\n {curriculum.title}\n </Typo>\n <Typo align=\"center\" as=\"p\" color=\"gray\">\n {description}\n </Typo>\n\n <Dialog.Trigger>\n <Button\n mt=\"3\"\n style={{ minWidth: 232, backgroundColor: bgColor }}\n variant={done ? 'outline' : 'solid'}\n >\n <Typo truncate>{done ? '나의 응답 다시보기' : buttonTitle}</Typo>\n </Button>\n </Dialog.Trigger>\n </Flex>\n <Dialog.Content\n height=\"100%\"\n hideCloseButton\n style={{ borderRadius: 0, padding: 0 }}\n title=\"\"\n width=\"100%\"\n >\n <Flex\n align=\"center\"\n height=\"100%\"\n justify=\"center\"\n pb=\"3\"\n position=\"relative\"\n width=\"100%\"\n >\n <CurriculumReviewSteps\n contents={item}\n curriculum={curriculum}\n defaultValues={defaultValues}\n done={done}\n mode={mode}\n onClickEndReview={onClickEndReview}\n onReviewValueChange={onReviewValueChange}\n onSubmit={onReviewSubmit}\n title={sectionTitle}\n />\n {/* 닫기 버튼 */}\n <Box position=\"absolute\" right=\"16px\" top=\"16px\">\n <IconButton\n color=\"gray\"\n onClick={onClickCloseDrawer}\n variant=\"ghost\"\n >\n <Box display={{ initial: 'none', md: 'block' }}>\n <Cross1Icon height={20} width={20} />\n </Box>\n <Box display={{ initial: 'block', md: 'none' }}>\n <Cross1Icon height={16} width={16} />\n </Box>\n </IconButton>\n </Box>\n\n {/* 진짜 닫겠습니까 모달 */}\n <Dialog.Root onOpenChange={setCloseDialogOpen} open={closeDialogOpen}>\n <Dialog.Content\n buttons={\n <Flex gap=\"3\" justify=\"end\">\n <Dialog.Close asChild>\n <Button color=\"gray\" variant=\"outline\">\n 돌아가기\n </Button>\n </Dialog.Close>\n <Dialog.Close>\n <Button color=\"red\" onClick={onClickEndReview}>\n 나가기\n </Button>\n </Dialog.Close>\n </Flex>\n }\n title=\"작성을 중단하시겠습니까?\"\n >\n <Typo>페이지에서 벗어나면 작성한 내용이 저장되지 않습니다.</Typo>\n </Dialog.Content>\n </Dialog.Root>\n </Flex>\n </Dialog.Content>\n </Dialog.Root>\n );\n}\n\nexport default CurriculumReview;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,aAAa,SAAS,gBAAgB;AACtD,SAAS,kBAAkB;AAuGrB,SAeE,KAfF;AAvFN,SAAS,iBAAiB,OAA+C;AACvE,QAAM,EAAE,MAAM,aAAa,IAAI;AAC/B,QAAM,EAAE,aAAa,YAAY,IAAI;AACrC,QAAM;AAAA,IACJ;AAAA,IACA,gBAAgB;AAAA,IAChB,qBAAqB;AAAA,IACrB;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,qBAAqB;AACzB,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,KAAK;AACtC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,CAAC,iBAAiB,kBAAkB,IAAI,SAAS,KAAK;AAE5D,QAAM,sBAAsB;AAAA,IAC1B,CAAC;AAAA,MACC;AAAA,MACA;AAAA,IACF,MAGM;AACJ,U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cACT;AAAA,cAEA,oBAAC,OAAI,UAAS,YAAW,OAAM,QAAO,KAAI,QACxC;AAAA,gBAAC;AAAA;AAAA,kBACC,OAAM;AAAA,kBACN,SAAS;AAAA,kBACT,SAAQ;AAAA,kBAER;AAAA,wCAAC,OAAI,SAAS,EAAE,SAAS,QAAQ,IAAI,QAAQ,GAC3C,8BAAC,cAAW,QAAQ,IAAI,OAAO,IAAI,GACrC;AAAA,oBACA,oBAAC,OAAI,SAAS,EAAE,SAAS,SAAS,IAAI,OAAO,GAC3C,8BAAC,cAAW,QAAQ,IAAI,OAAO,IAAI,GACrC;AAAA;AAAA;AAAA,cACF,GACF;AAAA,cAGA,oBAAC,OAAO,MAAP,EAAY,cAAc,oBAAoB,MAAM,iBACnD;AAAA,gBAAC,OAAO;AAAA,gBAAP;AAAA,kBACC,SACE,qBAAC,QAAK,KAAI,KAAI,SAAQ,OACpB;AAAA,wCAAC,OAAO,OAAP,EAAa,SAAO,MACnB,8BAAC,UAAO,OAAM,QAAO,SAAQ,WAAU,sCAEvC,GACF;AAAA,oBACA,oBAAC,OAAO,OAAP,EACC,8BAAC,UAAO,OAAM,OAAM,SAAS,kBAAkB,gCAE/C,GACF;AAAA,qBACF;AAAA,kBAEF,OAAM;AAAA,kBAEN,8BAAC,QAAK,8JAA6B;AAAA;AAAA,cACrC,GACF;AAAA;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,IAAO,4BAAQ;","names":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ReviewQuestionContentHeader
|
|
3
|
+
} from "./chunk-QB73IVKI.js";
|
|
4
|
+
import {
|
|
5
|
+
RadioGroup
|
|
6
|
+
} from "./chunk-6DJOIRMF.js";
|
|
7
|
+
import {
|
|
8
|
+
Flex
|
|
9
|
+
} from "./chunk-25HMMI7R.js";
|
|
10
|
+
import {
|
|
11
|
+
Card
|
|
12
|
+
} from "./chunk-RP2RGCAW.js";
|
|
13
|
+
|
|
14
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.tsx
|
|
15
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
function ReviewQuestionSatisfisRadio(props) {
|
|
17
|
+
var _a, _b, _c;
|
|
18
|
+
const { question, answer, onChange } = props;
|
|
19
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20
|
+
/* @__PURE__ */ jsx(Card, { size: "2", children: /* @__PURE__ */ jsx(
|
|
21
|
+
ReviewQuestionContentHeader,
|
|
22
|
+
{
|
|
23
|
+
icon: question.icon,
|
|
24
|
+
question: (_a = question.question) != null ? _a : "\uC774\uBC88 \uD559\uC2B5\uC5D0 \uB300\uD55C \uC804\uBC18\uC801\uC778 \uB9CC\uC871\uB3C4\uB97C \uC54C\uB824\uC8FC\uC138\uC694.",
|
|
25
|
+
title: (_b = question.title) != null ? _b : "\uB9CC\uC871\uB3C4 \uC870\uC0AC",
|
|
26
|
+
type: question.type
|
|
27
|
+
}
|
|
28
|
+
) }),
|
|
29
|
+
/* @__PURE__ */ jsx(RadioGroup.Root, { color: "iris", mt: "3", onValueChange: onChange, value: answer, children: /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "2", children: (_c = question.options) == null ? void 0 : _c.map((option) => /* @__PURE__ */ jsx(RadioGroup.Item, { value: String(option.value), children: option.label }, option.value)) }) })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
var review_question_satisfaction_option_default = ReviewQuestionSatisfisRadio;
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
review_question_satisfaction_option_default
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=chunk-KO6ZM4XB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.tsx"],"sourcesContent":["import React from 'react';\nimport { Card } from '@/atoms/card';\nimport { Flex } from '@/atoms/flex';\nimport { RadioGroup } from '@/atoms/radio-group';\nimport { type CurriculumReviewQuestionSatisfactionOption } from '@/types/curriculumContents.type';\nimport { ReviewQuestionContentHeader } from './review-comp';\n\ninterface ReviewQuestionSatisfactionOptionProps {\n question: CurriculumReviewQuestionSatisfactionOption;\n answer: string;\n error?: string;\n onChange: (value: string) => void;\n}\n\nfunction ReviewQuestionSatisfisRadio(\n props: ReviewQuestionSatisfactionOptionProps\n): React.ReactNode {\n const { question, answer, onChange } = props;\n \n return (\n <>\n <Card size=\"2\">\n <ReviewQuestionContentHeader\n icon={question.icon}\n question={\n question.question ??\n '이번 학습에 대한 전반적인 만족도를 알려주세요.'\n }\n title={question.title ?? '만족도 조사'}\n type={question.type}\n />\n </Card>\n <RadioGroup.Root color=\"iris\" mt=\"3\" onValueChange={onChange} value={answer}>\n <Flex direction=\"column\" gap=\"2\">\n {question.options?.map((option) => (\n <RadioGroup.Item key={option.value} value={String(option.value)}>\n {option.label}\n </RadioGroup.Item>\n ))}\n </Flex>\n </RadioGroup.Root>\n </>\n );\n}\n\nexport default ReviewQuestionSatisfisRadio;\n"],"mappings":";;;;;;;;;;;;;;AAoBI,mBAEI,KAFJ;AANJ,SAAS,4BACP,OACiB;AAhBnB;AAiBE,QAAM,EAAE,UAAU,QAAQ,SAAS,IAAI;AAEvC,SACE,iCACE;AAAA,wBAAC,QAAK,MAAK,KACT;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,SAAS;AAAA,QACf,WACE,cAAS,aAAT,YACA;AAAA,QAEF,QAAO,cAAS,UAAT,YAAkB;AAAA,QACzB,MAAM,SAAS;AAAA;AAAA,IACjB,GACF;AAAA,IACA,oBAAC,WAAW,MAAX,EAAgB,OAAM,QAAO,IAAG,KAAI,eAAe,UAAU,OAAO,QACnE,8BAAC,QAAK,WAAU,UAAS,KAAI,KAC1B,yBAAS,YAAT,mBAAkB,IAAI,CAAC,WACtB,oBAAC,WAAW,MAAX,EAAmC,OAAO,OAAO,OAAO,KAAK,GAC3D,iBAAO,SADY,OAAO,KAE7B,IAEJ,GACF;AAAA,KACF;AAEJ;AAEA,IAAO,8CAAQ;","names":[]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ReviewQuestionContentHeader
|
|
3
|
+
} from "./chunk-QB73IVKI.js";
|
|
4
|
+
import {
|
|
5
|
+
TextArea
|
|
6
|
+
} from "./chunk-5XYPLDI5.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
|
+
Callout
|
|
18
|
+
} from "./chunk-B6XJN6EC.js";
|
|
19
|
+
import {
|
|
20
|
+
Card
|
|
21
|
+
} from "./chunk-RP2RGCAW.js";
|
|
22
|
+
import {
|
|
23
|
+
BellIcon
|
|
24
|
+
} from "./chunk-R7IT4TCD.js";
|
|
25
|
+
|
|
26
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.tsx
|
|
27
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
28
|
+
function ReviewQuestionText(props) {
|
|
29
|
+
const { question, answer, onChange } = props;
|
|
30
|
+
const minLengthNotMet = question.minLength && answer.length < question.minLength;
|
|
31
|
+
const remainingLength = question.minLength && answer.length < question.minLength ? question.minLength - answer.length : 0;
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
Card,
|
|
34
|
+
{
|
|
35
|
+
size: "2",
|
|
36
|
+
style: {
|
|
37
|
+
width: "100%",
|
|
38
|
+
height: "100%"
|
|
39
|
+
},
|
|
40
|
+
children: /* @__PURE__ */ jsxs(Grid, { height: "100%", rows: "1fr auto", children: [
|
|
41
|
+
/* @__PURE__ */ jsxs(Grid, { height: "100%", rows: "auto 1fr", width: "100%", children: [
|
|
42
|
+
/* @__PURE__ */ jsx(
|
|
43
|
+
ReviewQuestionContentHeader,
|
|
44
|
+
{
|
|
45
|
+
icon: question.icon,
|
|
46
|
+
question: question.question,
|
|
47
|
+
title: question.title,
|
|
48
|
+
type: question.type
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ jsx(
|
|
52
|
+
TextArea,
|
|
53
|
+
{
|
|
54
|
+
mt: "2",
|
|
55
|
+
onChange: (e) => {
|
|
56
|
+
onChange(e.target.value);
|
|
57
|
+
},
|
|
58
|
+
placeholder: question.placeholder,
|
|
59
|
+
value: answer
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] }),
|
|
63
|
+
minLengthNotMet ? /* @__PURE__ */ jsxs(Box, { mt: "2", children: [
|
|
64
|
+
/* @__PURE__ */ jsx(Typo, { align: "right", as: "p", color: "red", variant: "caption", children: `${remainingLength}\uC790 \uB354 \uC791\uC131\uD574\uC8FC\uC138\uC694.` }),
|
|
65
|
+
question.minLengthInfoMessage ? /* @__PURE__ */ jsxs(
|
|
66
|
+
Callout.Root,
|
|
67
|
+
{
|
|
68
|
+
color: "iris",
|
|
69
|
+
mt: "2",
|
|
70
|
+
style: { alignItems: "center" },
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ jsx(Callout.Icon, { children: /* @__PURE__ */ jsx(BellIcon, {}) }),
|
|
73
|
+
/* @__PURE__ */ jsx(Callout.Text, { children: /* @__PURE__ */ jsx(Typo, { as: "p", variant: "caption", children: question.minLengthInfoMessage }) })
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
) : null
|
|
77
|
+
] }) : null
|
|
78
|
+
] })
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
var review_question_text_default = ReviewQuestionText;
|
|
83
|
+
|
|
84
|
+
export {
|
|
85
|
+
review_question_text_default
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=chunk-LNRB4XMK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.tsx"],"sourcesContent":["import React from 'react';\nimport { Box } from '@/atoms/box';\nimport { Card } from '@/atoms/card';\nimport { Grid } from '@/atoms/grid';\nimport { TextArea } from '@/atoms/text-area';\nimport { Typo } from '@/atoms/typo';\nimport { BellIcon } from '@/icon';\nimport { type CurriculumReviewQuestionText } from '@/types/curriculumContents.type';\nimport { Callout } from '@/atoms/call-out';\nimport { ReviewQuestionContentHeader } from './review-comp';\n\ninterface ReviewQuestionTextProps {\n question: CurriculumReviewQuestionText;\n answer: string;\n error?: string;\n onChange: (value: string) => void;\n}\n\nfunction ReviewQuestionText(props: ReviewQuestionTextProps): React.ReactNode {\n const { question, answer, onChange } = props;\n\n const minLengthNotMet =\n question.minLength && answer.length < question.minLength;\n\n const remainingLength =\n question.minLength && answer.length < question.minLength\n ? question.minLength - answer.length\n : 0;\n\n return (\n <Card\n size=\"2\"\n style={{\n width: '100%',\n height: '100%',\n }}\n >\n <Grid height=\"100%\" rows=\"1fr auto\">\n <Grid height=\"100%\" rows=\"auto 1fr\" width=\"100%\">\n <ReviewQuestionContentHeader\n icon={question.icon}\n question={question.question}\n title={question.title}\n type={question.type}\n />\n\n <TextArea\n mt=\"2\"\n onChange={(e) => {\n onChange(e.target.value);\n }}\n placeholder={question.placeholder}\n value={answer}\n />\n </Grid>\n {minLengthNotMet ? (\n <Box mt=\"2\">\n <Typo align=\"right\" as=\"p\" color=\"red\" variant=\"caption\">\n {`${remainingLength}자 더 작성해주세요.`}\n </Typo>\n {question.minLengthInfoMessage ? (\n <Callout.Root\n color=\"iris\"\n mt=\"2\"\n style={{ alignItems: 'center' }}\n >\n <Callout.Icon>\n <BellIcon />\n </Callout.Icon>\n <Callout.Text>\n <Typo as=\"p\" variant=\"caption\">\n {question.minLengthInfoMessage}\n </Typo>\n </Callout.Text>\n </Callout.Root>\n ) : null}\n </Box>\n ) : null}\n </Grid>\n </Card>\n );\n}\n\nexport default ReviewQuestionText;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsCQ,SACE,KADF;AApBR,SAAS,mBAAmB,OAAiD;AAC3E,QAAM,EAAE,UAAU,QAAQ,SAAS,IAAI;AAEvC,QAAM,kBACJ,SAAS,aAAa,OAAO,SAAS,SAAS;AAEjD,QAAM,kBACJ,SAAS,aAAa,OAAO,SAAS,SAAS,YAC3C,SAAS,YAAY,OAAO,SAC5B;AAEN,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,OAAO;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,MACV;AAAA,MAEA,+BAAC,QAAK,QAAO,QAAO,MAAK,YACvB;AAAA,6BAAC,QAAK,QAAO,QAAO,MAAK,YAAW,OAAM,QACxC;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,MAAM,SAAS;AAAA,cACf,UAAU,SAAS;AAAA,cACnB,OAAO,SAAS;AAAA,cAChB,MAAM,SAAS;AAAA;AAAA,UACjB;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,IAAG;AAAA,cACH,UAAU,CAAC,MAAM;AACf,yBAAS,EAAE,OAAO,KAAK;AAAA,cACzB;AAAA,cACA,aAAa,SAAS;AAAA,cACtB,OAAO;AAAA;AAAA,UACT;AAAA,WACF;AAAA,QACC,kBACC,qBAAC,OAAI,IAAG,KACN;AAAA,8BAAC,QAAK,OAAM,SAAQ,IAAG,KAAI,OAAM,OAAM,SAAQ,WAC5C,aAAG,eAAe,uDACrB;AAAA,UACC,SAAS,uBACR;AAAA,YAAC,QAAQ;AAAA,YAAR;AAAA,cACC,OAAM;AAAA,cACN,IAAG;AAAA,cACH,OAAO,EAAE,YAAY,SAAS;AAAA,cAE9B;AAAA,oCAAC,QAAQ,MAAR,EACC,8BAAC,YAAS,GACZ;AAAA,gBACA,oBAAC,QAAQ,MAAR,EACC,8BAAC,QAAK,IAAG,KAAI,SAAQ,WAClB,mBAAS,sBACZ,GACF;AAAA;AAAA;AAAA,UACF,IACE;AAAA,WACN,IACE;AAAA,SACN;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,+BAAQ;","names":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
curriculum_sidebar_item_wrapper_default
|
|
3
|
+
} from "./chunk-FC4SRBTF.js";
|
|
4
|
+
import {
|
|
5
|
+
section_item_default
|
|
6
|
+
} from "./chunk-6L4OTKID.js";
|
|
7
|
+
import {
|
|
8
|
+
section_title_default
|
|
9
|
+
} from "./chunk-4TST4UK5.js";
|
|
10
|
+
import {
|
|
11
|
+
getCurriculumIconColor
|
|
12
|
+
} from "./chunk-JF7JAMOQ.js";
|
|
13
|
+
import {
|
|
14
|
+
__spreadProps,
|
|
15
|
+
__spreadValues
|
|
16
|
+
} from "./chunk-CRTRMMJ7.js";
|
|
17
|
+
|
|
18
|
+
// src/molecules/curriculumV2/CurriculumSidebar/sidebar-item.tsx
|
|
19
|
+
import { jsx } from "react/jsx-runtime";
|
|
20
|
+
function SidebarItem({ item, selectedIndex, setSelectedIndex, index, done }) {
|
|
21
|
+
if (item.type === "sectionTitle") {
|
|
22
|
+
return /* @__PURE__ */ jsx(section_title_default, __spreadValues({}, item), item.uuid);
|
|
23
|
+
}
|
|
24
|
+
const isSelected = selectedIndex === index;
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
curriculum_sidebar_item_wrapper_default,
|
|
27
|
+
{
|
|
28
|
+
index,
|
|
29
|
+
isSelected,
|
|
30
|
+
onClick: () => {
|
|
31
|
+
setSelectedIndex(index);
|
|
32
|
+
},
|
|
33
|
+
children: /* @__PURE__ */ jsx(
|
|
34
|
+
section_item_default,
|
|
35
|
+
__spreadProps(__spreadValues({}, item), {
|
|
36
|
+
color: getCurriculumIconColor({
|
|
37
|
+
done,
|
|
38
|
+
selected: isSelected
|
|
39
|
+
})
|
|
40
|
+
})
|
|
41
|
+
)
|
|
42
|
+
},
|
|
43
|
+
item.uuid
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
var sidebar_item_default = SidebarItem;
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
sidebar_item_default
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=chunk-LWLKHIDE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumSidebar/sidebar-item.tsx"],"sourcesContent":["import type { CurriculumListContents } from '@/types/curriculum.type'; \nimport { getCurriculumIconColor } from '../../../utils/curriculum.utils';\nimport SectionTitle from './Items/section-title';\nimport CurriculumSidebarItemWrapper from './Items/curriculum-sidebar-item-wrapper';\nimport SectionCommonItem from './Items/section-item';\n\n\ninterface SidebarItemProps {\n item: CurriculumListContents;\n selectedIndex: number;\n setSelectedIndex: (index: number) => void;\n index: number;\n done: boolean;\n}\n\nfunction SidebarItem({item, selectedIndex, setSelectedIndex, index, done}: SidebarItemProps): React.ReactNode {\n \n \n if (item.type === 'sectionTitle') {\n return <SectionTitle key={item.uuid} {...item} />;\n }\n const isSelected = selectedIndex === index;\n\n return (\n <CurriculumSidebarItemWrapper\n index={index}\n isSelected={isSelected}\n key={item.uuid}\n onClick={() => {\n setSelectedIndex(index);\n }}\n >\n <SectionCommonItem\n {...item}\n color={getCurriculumIconColor({\n done,\n selected: isSelected,\n })}\n />\n </CurriculumSidebarItemWrapper>\n );\n }\n\nexport default SidebarItem;"],"mappings":";;;;;;;;;;;;;;;;;;AAmBe;AAJf,SAAS,YAAY,EAAC,MAAM,eAAe,kBAAkB,OAAO,KAAI,GAAsC;AAG5G,MAAI,KAAK,SAAS,gBAAgB;AAC5B,WAAO,oBAAC,0CAAiC,OAAf,KAAK,IAAgB;AAAA,EACjD;AACA,QAAM,aAAa,kBAAkB;AAErC,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MAEA,SAAS,MAAM;AACb,yBAAiB,KAAK;AAAA,MACxB;AAAA,MAEA;AAAA,QAAC;AAAA,yCACK,OADL;AAAA,UAEC,OAAO,uBAAuB;AAAA,YAC5B;AAAA,YACA,UAAU;AAAA,UACZ,CAAC;AAAA;AAAA,MACH;AAAA;AAAA,IAXK,KAAK;AAAA,EAYZ;AAEJ;AAEJ,IAAO,uBAAQ;","names":[]}
|