@tipp/ui 2.3.7 → 2.3.9
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.map +1 -1
- package/dist/app/index.js +89 -89
- package/dist/app/platform/coach-question-list.cjs.map +1 -1
- package/dist/app/platform/coach-question-list.js +30 -30
- package/dist/app/platform/contents-card.cjs.map +1 -1
- package/dist/app/platform/contents-card.js +30 -30
- package/dist/app/platform/curriculum-card.cjs.map +1 -1
- package/dist/app/platform/curriculum-card.js +7 -7
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +71 -71
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +72 -72
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +71 -71
- package/dist/app/platform/goal-manage-card-read.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-read.js +30 -30
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +71 -71
- package/dist/app/platform/report-card.cjs.map +1 -1
- package/dist/app/platform/report-card.js +30 -30
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +72 -72
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +74 -74
- package/dist/app/platform/session-review-simple-read.cjs.map +1 -1
- package/dist/app/platform/session-review-simple-read.js +30 -30
- package/dist/app/platform/userInfos/coaching-customer-info/index.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +33 -33
- package/dist/app/platform/userInfos/coaching-customer-info/large.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +30 -30
- package/dist/app/platform/userInfos/coaching-customer-info/medium.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +30 -30
- package/dist/app/platform/userInfos/coaching-customer-info/small.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +30 -30
- package/dist/app/platform/userInfos/session-user-info-detail.cjs.map +1 -1
- package/dist/app/platform/userInfos/session-user-info-detail.js +30 -30
- package/dist/app/platform/userInfos/utils.cjs.map +1 -1
- package/dist/app/platform/userInfos/utils.js +29 -29
- 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.cjs.map +1 -1
- package/dist/atoms/index.js +63 -63
- package/dist/atoms/list.js +2 -2
- package/dist/atoms/pagination.cjs.map +1 -1
- package/dist/atoms/pagination.js +4 -4
- package/dist/chunk-27MOXAR2.js +64 -0
- package/dist/chunk-27MOXAR2.js.map +1 -0
- package/dist/chunk-43FK4CS3.js +196 -0
- package/dist/chunk-43FK4CS3.js.map +1 -0
- package/dist/chunk-53LB62DW.js +165 -0
- package/dist/chunk-53LB62DW.js.map +1 -0
- package/dist/chunk-5ZIFEE7H.js +75 -0
- package/dist/chunk-5ZIFEE7H.js.map +1 -0
- package/dist/chunk-6D2NJ4JA.js +196 -0
- package/dist/chunk-6D2NJ4JA.js.map +1 -0
- package/dist/chunk-6NKDS27F.js +89 -0
- package/dist/chunk-6NKDS27F.js.map +1 -0
- package/dist/chunk-6V47NXW5.js +64 -0
- package/dist/chunk-6V47NXW5.js.map +1 -0
- package/dist/chunk-7N6VN2FK.js +70 -0
- package/dist/chunk-7N6VN2FK.js.map +1 -0
- package/dist/chunk-A3DYXUDV.js +144 -0
- package/dist/chunk-A3DYXUDV.js.map +1 -0
- package/dist/chunk-AZE4QTZI.js +165 -0
- package/dist/chunk-AZE4QTZI.js.map +1 -0
- package/dist/chunk-FVTBDVT4.js +233 -0
- package/dist/chunk-FVTBDVT4.js.map +1 -0
- package/dist/chunk-GFBHPXDF.js +196 -0
- package/dist/chunk-GFBHPXDF.js.map +1 -0
- package/dist/chunk-GU75W4O2.js +228 -0
- package/dist/chunk-GU75W4O2.js.map +1 -0
- package/dist/chunk-HDXQXNCG.js +99 -0
- package/dist/chunk-HDXQXNCG.js.map +1 -0
- package/dist/chunk-HKW45LNY.js +99 -0
- package/dist/chunk-HKW45LNY.js.map +1 -0
- package/dist/chunk-I46J2XHG.js +75 -0
- package/dist/chunk-I46J2XHG.js.map +1 -0
- package/dist/chunk-IEMRHLQ3.js +69 -0
- package/dist/chunk-IEMRHLQ3.js.map +1 -0
- package/dist/chunk-IG2TTPNN.js +233 -0
- package/dist/chunk-IG2TTPNN.js.map +1 -0
- package/dist/chunk-IMMHRXM2.js +363 -0
- package/dist/chunk-IMMHRXM2.js.map +1 -0
- package/dist/chunk-IPEAJLS3.js +169 -0
- package/dist/chunk-IPEAJLS3.js.map +1 -0
- package/dist/chunk-JAMNT4FG.js +125 -0
- package/dist/chunk-JAMNT4FG.js.map +1 -0
- package/dist/chunk-K7ERERDQ.js +174 -0
- package/dist/chunk-K7ERERDQ.js.map +1 -0
- package/dist/chunk-LAZUFZRZ.js +198 -0
- package/dist/chunk-LAZUFZRZ.js.map +1 -0
- package/dist/chunk-LHKGSKKG.js +70 -0
- package/dist/chunk-LHKGSKKG.js.map +1 -0
- package/dist/chunk-LTGEHFFG.js +363 -0
- package/dist/chunk-LTGEHFFG.js.map +1 -0
- package/dist/chunk-MQMW3XXD.js +117 -0
- package/dist/chunk-MQMW3XXD.js.map +1 -0
- package/dist/chunk-NIIMYTIK.js +117 -0
- package/dist/chunk-NIIMYTIK.js.map +1 -0
- package/dist/chunk-O63J4YET.js +169 -0
- package/dist/chunk-O63J4YET.js.map +1 -0
- package/dist/chunk-OUJ7TDIH.js +100 -0
- package/dist/chunk-OUJ7TDIH.js.map +1 -0
- package/dist/chunk-OX3N37YY.js +89 -0
- package/dist/chunk-OX3N37YY.js.map +1 -0
- package/dist/chunk-PLXD7ZKF.js +54 -0
- package/dist/chunk-PLXD7ZKF.js.map +1 -0
- package/dist/chunk-PPCORTMH.js +87 -0
- package/dist/chunk-PPCORTMH.js.map +1 -0
- package/dist/chunk-PYGTM7ML.js +79 -0
- package/dist/chunk-PYGTM7ML.js.map +1 -0
- package/dist/chunk-PZYP6MUR.js +174 -0
- package/dist/chunk-PZYP6MUR.js.map +1 -0
- package/dist/chunk-QDTII3D4.js +87 -0
- package/dist/chunk-QDTII3D4.js.map +1 -0
- package/dist/chunk-QIRUYN3K.js +69 -0
- package/dist/chunk-QIRUYN3K.js.map +1 -0
- package/dist/chunk-QQVXNMUF.js +192 -0
- package/dist/chunk-QQVXNMUF.js.map +1 -0
- package/dist/chunk-QT3MU3ZI.js +192 -0
- package/dist/chunk-QT3MU3ZI.js.map +1 -0
- package/dist/chunk-QYBSBW7T.js +64 -0
- package/dist/chunk-QYBSBW7T.js.map +1 -0
- package/dist/chunk-RCTSFOT7.js +145 -0
- package/dist/chunk-RCTSFOT7.js.map +1 -0
- package/dist/chunk-SDKOCP5V.js +125 -0
- package/dist/chunk-SDKOCP5V.js.map +1 -0
- package/dist/chunk-SP24KOSH.js +228 -0
- package/dist/chunk-SP24KOSH.js.map +1 -0
- package/dist/chunk-SW3F2AU5.js +63 -0
- package/dist/chunk-SW3F2AU5.js.map +1 -0
- package/dist/chunk-TMM2Z7GY.js +68 -0
- package/dist/chunk-TMM2Z7GY.js.map +1 -0
- package/dist/chunk-VWUWH2YW.js +64 -0
- package/dist/chunk-VWUWH2YW.js.map +1 -0
- package/dist/chunk-VZDOBBRZ.js +144 -0
- package/dist/chunk-VZDOBBRZ.js.map +1 -0
- package/dist/chunk-W3TY3SYU.js +63 -0
- package/dist/chunk-W3TY3SYU.js.map +1 -0
- package/dist/chunk-W5TPOFOO.js +141 -0
- package/dist/chunk-W5TPOFOO.js.map +1 -0
- package/dist/chunk-W747CDDK.js +79 -0
- package/dist/chunk-W747CDDK.js.map +1 -0
- package/dist/chunk-XUSCUT5R.js +100 -0
- package/dist/chunk-XUSCUT5R.js.map +1 -0
- package/dist/chunk-Y3JWP7C5.js +145 -0
- package/dist/chunk-Y3JWP7C5.js.map +1 -0
- package/dist/chunk-YPIM3E25.js +68 -0
- package/dist/chunk-YPIM3E25.js.map +1 -0
- package/dist/chunk-ZDMAVBNK.js +89 -0
- package/dist/chunk-ZDMAVBNK.js.map +1 -0
- package/dist/chunk-ZE3LSQUW.js +54 -0
- package/dist/chunk-ZE3LSQUW.js.map +1 -0
- package/dist/context/index.js +5 -5
- package/dist/icon.cjs +2 -0
- package/dist/icon.cjs.map +1 -1
- package/dist/icon.d.cts +1 -1
- package/dist/icon.d.ts +1 -1
- package/dist/icon.js +3 -1
- package/dist/index.cjs +43 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -0
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +145 -143
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +17 -17
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +10 -10
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.js +3 -3
- 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.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +21 -21
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +7 -7
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +23 -23
- package/dist/molecules/curriculumV2/CurriculumContents/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +26 -26
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +9 -9
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +6 -6
- package/dist/molecules/curriculumV2/curriculum-sub-nav.cjs.map +1 -1
- package/dist/molecules/curriculumV2/curriculum-sub-nav.js +5 -5
- package/dist/molecules/curriculumV2/curriculum-v2-layout.js +2 -2
- package/dist/molecules/curriculumV2/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/index.js +35 -35
- package/dist/molecules/date-picker/date-picker-button.cjs.map +1 -1
- package/dist/molecules/date-picker/date-picker-button.js +7 -7
- package/dist/molecules/date-picker/index.cjs.map +1 -1
- package/dist/molecules/date-picker/index.js +6 -6
- 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.cjs +41 -35
- package/dist/molecules/expand-table/index.cjs.map +1 -1
- package/dist/molecules/expand-table/index.js +5 -5
- package/dist/molecules/force-refresh.js +2 -2
- package/dist/molecules/ghost-post.js +4 -4
- package/dist/molecules/index.cjs +41 -35
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +65 -65
- 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.cjs.map +1 -1
- package/dist/molecules/stepper.js +5 -5
- package/dist/molecules/tag-selector.cjs.map +1 -1
- package/dist/molecules/tag-selector.js +6 -6
- package/dist/molecules/time-select.js +1 -1
- package/dist/utils/curriculum.utils.cjs.map +1 -1
- package/dist/utils/curriculum.utils.js +1 -1
- package/dist/utils/index.js +3 -3
- package/package.json +1 -1
- package/src/icon.ts +2 -1
- package/src/molecules/expand-table/index.tsx +29 -18
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OnOfflineRadioCard
|
|
3
|
+
} from "./chunk-M2PVHXOE.js";
|
|
4
|
+
import {
|
|
5
|
+
DatePickerButton
|
|
6
|
+
} from "./chunk-5ZIFEE7H.js";
|
|
7
|
+
import {
|
|
8
|
+
toast
|
|
9
|
+
} from "./chunk-EEKOTWBE.js";
|
|
10
|
+
import {
|
|
11
|
+
Inset
|
|
12
|
+
} from "./chunk-XQOL7UBI.js";
|
|
13
|
+
import {
|
|
14
|
+
Grid
|
|
15
|
+
} from "./chunk-EGEQY3KT.js";
|
|
16
|
+
import {
|
|
17
|
+
Heading
|
|
18
|
+
} from "./chunk-BESTU2AY.js";
|
|
19
|
+
import {
|
|
20
|
+
Box
|
|
21
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
22
|
+
import {
|
|
23
|
+
BulletText
|
|
24
|
+
} from "./chunk-Z34HR7RE.js";
|
|
25
|
+
import {
|
|
26
|
+
Typo
|
|
27
|
+
} from "./chunk-PMJIFLDT.js";
|
|
28
|
+
import {
|
|
29
|
+
Flex
|
|
30
|
+
} from "./chunk-25HMMI7R.js";
|
|
31
|
+
import {
|
|
32
|
+
Button
|
|
33
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
34
|
+
import {
|
|
35
|
+
Card
|
|
36
|
+
} from "./chunk-RP2RGCAW.js";
|
|
37
|
+
import {
|
|
38
|
+
ArrowRightIcon,
|
|
39
|
+
Cross1Icon
|
|
40
|
+
} from "./chunk-W5TPOFOO.js";
|
|
41
|
+
import {
|
|
42
|
+
Badge
|
|
43
|
+
} from "./chunk-U3BQT7ZO.js";
|
|
44
|
+
import {
|
|
45
|
+
__spreadProps,
|
|
46
|
+
__spreadValues
|
|
47
|
+
} from "./chunk-CRTRMMJ7.js";
|
|
48
|
+
|
|
49
|
+
// src/app/platform/reservation-card.tsx
|
|
50
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
51
|
+
import { format } from "date-fns";
|
|
52
|
+
import { ko } from "date-fns/locale";
|
|
53
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
54
|
+
function ReservationCard(props) {
|
|
55
|
+
const {
|
|
56
|
+
sessionNumber,
|
|
57
|
+
customerName,
|
|
58
|
+
readonly,
|
|
59
|
+
defaultTime,
|
|
60
|
+
defaultType,
|
|
61
|
+
error,
|
|
62
|
+
minTime,
|
|
63
|
+
maxTime,
|
|
64
|
+
onClickReserve,
|
|
65
|
+
onClickCancel,
|
|
66
|
+
onClickCompleteSession
|
|
67
|
+
} = props;
|
|
68
|
+
const [editValues, setEditValues] = useState({
|
|
69
|
+
date: props.defaultTime,
|
|
70
|
+
type: props.defaultType
|
|
71
|
+
});
|
|
72
|
+
const date = readonly ? defaultTime : editValues.date;
|
|
73
|
+
const type = readonly ? defaultType : editValues.type;
|
|
74
|
+
const onClickSave = useCallback(() => {
|
|
75
|
+
var _a;
|
|
76
|
+
(_a = props.onClickSave) == null ? void 0 : _a.call(props, editValues);
|
|
77
|
+
}, [editValues, props]);
|
|
78
|
+
const onClickReset = useCallback(() => {
|
|
79
|
+
setEditValues({
|
|
80
|
+
date: defaultTime,
|
|
81
|
+
type: defaultType
|
|
82
|
+
});
|
|
83
|
+
}, [defaultTime, defaultType]);
|
|
84
|
+
const ActionButtons = useMemo(() => {
|
|
85
|
+
if (readonly) {
|
|
86
|
+
return /* @__PURE__ */ jsx(Button, { onClick: onClickReserve, size: "small", variant: "surface", children: defaultTime && defaultType ? "\uC608\uC57D \uC218\uC815\uD558\uAE30" : "\uC608\uC57D\uD558\uAE30" });
|
|
87
|
+
}
|
|
88
|
+
return /* @__PURE__ */ jsx(Button, { color: "gray", onClick: onClickCancel, variant: "transparent", children: /* @__PURE__ */ jsx(Cross1Icon, {}) });
|
|
89
|
+
}, [defaultTime, defaultType, onClickCancel, onClickReserve, readonly]);
|
|
90
|
+
const onChangeDate = useCallback((newDate) => {
|
|
91
|
+
if (!newDate) return;
|
|
92
|
+
setEditValues((prev) => {
|
|
93
|
+
return __spreadProps(__spreadValues({}, prev), {
|
|
94
|
+
date: newDate
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
}, []);
|
|
98
|
+
const onChangeType = useCallback((newType) => {
|
|
99
|
+
setEditValues((prev) => {
|
|
100
|
+
return __spreadProps(__spreadValues({}, prev), {
|
|
101
|
+
type: newType
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
}, []);
|
|
105
|
+
const formatDate = useCallback((v) => {
|
|
106
|
+
return format(v, "yyyy\uB144 MM\uC6D4 dd\uC77C(EEE) aa h:mm", { locale: ko });
|
|
107
|
+
}, []);
|
|
108
|
+
useEffect(() => {
|
|
109
|
+
if (!minTime || !editValues.date || readonly) return;
|
|
110
|
+
if (editValues.date < minTime) {
|
|
111
|
+
toast.warn("\uC120\uD0DD \uAC00\uB2A5\uD55C \uC2DC\uAC04\uB300\uB85C \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");
|
|
112
|
+
setEditValues((prev) => {
|
|
113
|
+
return __spreadProps(__spreadValues({}, prev), {
|
|
114
|
+
date: minTime
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}, [editValues, minTime, readonly]);
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
if (!maxTime || !editValues.date || readonly) return;
|
|
121
|
+
if (editValues.date > maxTime) {
|
|
122
|
+
toast.warn("\uC120\uD0DD \uAC00\uB2A5\uD55C \uC2DC\uAC04\uB300\uB85C \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");
|
|
123
|
+
setEditValues((prev) => {
|
|
124
|
+
return __spreadProps(__spreadValues({}, prev), {
|
|
125
|
+
date: maxTime
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}, [editValues, maxTime, readonly]);
|
|
130
|
+
return /* @__PURE__ */ jsxs(
|
|
131
|
+
Card,
|
|
132
|
+
{
|
|
133
|
+
error: Boolean(error),
|
|
134
|
+
size: "3",
|
|
135
|
+
style: { overflow: "visible", contain: "initial" },
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ jsxs(Flex, { gap: "3", justify: "between", mb: "5", children: [
|
|
138
|
+
/* @__PURE__ */ jsxs(
|
|
139
|
+
Grid,
|
|
140
|
+
{
|
|
141
|
+
align: "center",
|
|
142
|
+
columns: { initial: "1", xs: "auto 1fr" },
|
|
143
|
+
gapY: "2",
|
|
144
|
+
children: [
|
|
145
|
+
/* @__PURE__ */ jsxs(Flex, { align: "center", children: [
|
|
146
|
+
/* @__PURE__ */ jsxs(Heading, { variant: "heading4", children: [
|
|
147
|
+
customerName || "-",
|
|
148
|
+
"\uB2D8 ",
|
|
149
|
+
sessionNumber || "-",
|
|
150
|
+
"\uD68C\uCC28 \uC138\uC158"
|
|
151
|
+
] }),
|
|
152
|
+
/* @__PURE__ */ jsx(Badge, { ml: "2", children: "\uB2E4\uC74C \uC138\uC158" })
|
|
153
|
+
] }),
|
|
154
|
+
error ? /* @__PURE__ */ jsx(BulletText, { color: "red", variant: "caption", children: error }) : null
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
/* @__PURE__ */ jsx(Flex, { children: ActionButtons })
|
|
159
|
+
] }),
|
|
160
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "5", children: [
|
|
161
|
+
/* @__PURE__ */ jsx(Heading, { mb: "2", variant: "heading5", weight: "regular", children: "\uC138\uC158 \uC77C\uC790\uC640 \uC2DC\uAC01" }),
|
|
162
|
+
/* @__PURE__ */ jsx(
|
|
163
|
+
DatePickerButton,
|
|
164
|
+
{
|
|
165
|
+
disabled: readonly,
|
|
166
|
+
format: formatDate,
|
|
167
|
+
maxDate: maxTime,
|
|
168
|
+
minDate: minTime,
|
|
169
|
+
onChange: onChangeDate,
|
|
170
|
+
placeholder: "\uC77C\uC790\uB97C \uC120\uD0DD\uD574\uC8FC\uC138\uC694",
|
|
171
|
+
selected: date,
|
|
172
|
+
showTimeSelect: true,
|
|
173
|
+
size: "large"
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
/* @__PURE__ */ jsx(Heading, { mb: "2", variant: "heading5", weight: "regular", children: "\uC628/\uC624\uD504\uB77C\uC778 \uC9C4\uD589 \uC5EC\uBD80" }),
|
|
177
|
+
/* @__PURE__ */ jsx(
|
|
178
|
+
OnOfflineRadioCard,
|
|
179
|
+
{
|
|
180
|
+
disabled: readonly,
|
|
181
|
+
onValueChange: onChangeType,
|
|
182
|
+
size: "1",
|
|
183
|
+
value: type
|
|
184
|
+
}
|
|
185
|
+
),
|
|
186
|
+
readonly ? null : /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "3", justify: "end", children: [
|
|
187
|
+
/* @__PURE__ */ jsx(
|
|
188
|
+
Button,
|
|
189
|
+
{
|
|
190
|
+
color: "gray",
|
|
191
|
+
onClick: onClickReset,
|
|
192
|
+
size: "small",
|
|
193
|
+
variant: "transparent",
|
|
194
|
+
children: "\uCD08\uAE30\uD654\uD558\uAE30"
|
|
195
|
+
}
|
|
196
|
+
),
|
|
197
|
+
/* @__PURE__ */ jsx(Button, { onClick: onClickSave, size: "small", children: "\uC800\uC7A5\uD558\uAE30" })
|
|
198
|
+
] })
|
|
199
|
+
] }) }),
|
|
200
|
+
readonly ? /* @__PURE__ */ jsx(Inset, { clip: "border-box", side: "bottom", children: /* @__PURE__ */ jsx(
|
|
201
|
+
Box,
|
|
202
|
+
{
|
|
203
|
+
mt: "5",
|
|
204
|
+
px: "5",
|
|
205
|
+
py: "4",
|
|
206
|
+
style: { backgroundColor: "var(--accent-a3)" },
|
|
207
|
+
width: "100%",
|
|
208
|
+
children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "4", justify: "center", children: [
|
|
209
|
+
/* @__PURE__ */ jsxs(Typo, { children: [
|
|
210
|
+
sessionNumber || "-",
|
|
211
|
+
"\uD68C\uCC28 \uC138\uC158\uC744 \uC644\uB8CC\uD558\uC168\uB098\uC694?"
|
|
212
|
+
] }),
|
|
213
|
+
/* @__PURE__ */ jsxs(Button, { onClick: onClickCompleteSession, size: "small", children: [
|
|
214
|
+
"\uC138\uC158 \uC885\uB8CC\uD558\uAE30",
|
|
215
|
+
/* @__PURE__ */ jsx(ArrowRightIcon, {})
|
|
216
|
+
] })
|
|
217
|
+
] })
|
|
218
|
+
}
|
|
219
|
+
) }) : null
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export {
|
|
226
|
+
ReservationCard
|
|
227
|
+
};
|
|
228
|
+
//# sourceMappingURL=chunk-GU75W4O2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/reservation-card.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { format } from 'date-fns';\nimport { ko } from 'date-fns/locale';\nimport {\n Badge,\n Box,\n BulletText,\n Button,\n Card,\n Flex,\n Form,\n Grid,\n Heading,\n Inset,\n toast,\n Typo,\n} from '../../atoms';\nimport { ArrowRightIcon, Cross1Icon } from '../../icon';\nimport { DatePickerButton } from '../../molecules';\nimport { OnOfflineRadioCard } from './on-offline-radio-card';\n\ntype Type = 'onlineCoaching' | 'offlineCoaching';\n\ninterface Values {\n date?: Date;\n type?: Type;\n}\n\nexport interface ReservationCardProps {\n sessionNumber?: number;\n readonly?: boolean;\n defaultTime?: Date;\n defaultType?: Type;\n customerName?: string;\n error?: string;\n onClickCompleteSession?: () => void;\n onClickReserve?: () => void;\n onClickSave?: (values: Values) => void;\n onClickCancel?: () => void;\n minTime?: Date;\n maxTime?: Date;\n}\n\nexport function ReservationCard(props: ReservationCardProps): React.ReactNode {\n const {\n sessionNumber,\n customerName,\n readonly,\n defaultTime,\n defaultType,\n error,\n minTime,\n maxTime,\n onClickReserve,\n onClickCancel,\n onClickCompleteSession,\n } = props;\n\n const [editValues, setEditValues] = useState<Values>({\n date: props.defaultTime,\n type: props.defaultType,\n });\n\n const date = readonly ? defaultTime : editValues.date;\n const type = readonly ? defaultType : editValues.type;\n\n const onClickSave = useCallback(() => {\n props.onClickSave?.(editValues);\n }, [editValues, props]);\n\n const onClickReset = useCallback(() => {\n setEditValues({\n date: defaultTime,\n type: defaultType,\n });\n }, [defaultTime, defaultType]);\n\n const ActionButtons = useMemo(() => {\n if (readonly) {\n return (\n <Button onClick={onClickReserve} size=\"small\" variant=\"surface\">\n {defaultTime && defaultType ? '예약 수정하기' : '예약하기'}\n </Button>\n );\n }\n return (\n <Button color=\"gray\" onClick={onClickCancel} variant=\"transparent\">\n <Cross1Icon />\n </Button>\n );\n }, [defaultTime, defaultType, onClickCancel, onClickReserve, readonly]);\n\n const onChangeDate = useCallback((newDate: Date | null) => {\n if (!newDate) return;\n setEditValues((prev) => {\n return {\n ...prev,\n date: newDate,\n };\n });\n }, []);\n\n const onChangeType = useCallback((newType: string) => {\n setEditValues((prev) => {\n return {\n ...prev,\n type: newType as Type,\n };\n });\n }, []);\n\n const formatDate = useCallback((v: Date) => {\n return format(v, 'yyyy년 MM월 dd일(EEE) aa h:mm', { locale: ko });\n }, []);\n\n useEffect(() => {\n if (!minTime || !editValues.date || readonly) return;\n if (editValues.date < minTime) {\n toast.warn('선택 가능한 시간대로 변경되었습니다.');\n setEditValues((prev) => {\n return {\n ...prev,\n date: minTime,\n };\n });\n }\n }, [editValues, minTime, readonly]);\n\n useEffect(() => {\n if (!maxTime || !editValues.date || readonly) return;\n if (editValues.date > maxTime) {\n toast.warn('선택 가능한 시간대로 변경되었습니다.');\n setEditValues((prev) => {\n return {\n ...prev,\n date: maxTime,\n };\n });\n }\n }, [editValues, maxTime, readonly]);\n\n return (\n <Card\n error={Boolean(error)}\n size=\"3\"\n style={{ overflow: 'visible', contain: 'initial' }}\n >\n <Flex gap=\"3\" justify=\"between\" mb=\"5\">\n <Grid\n align=\"center\"\n columns={{ initial: '1', xs: 'auto 1fr' }}\n gapY=\"2\"\n >\n <Flex align=\"center\">\n <Heading variant=\"heading4\">\n {customerName || '-'}님 {sessionNumber || '-'}회차 세션\n </Heading>\n <Badge ml=\"2\">다음 세션</Badge>\n </Flex>\n {error ? (\n <BulletText color=\"red\" variant=\"caption\">\n {error}\n </BulletText>\n ) : null}\n </Grid>\n <Flex>{ActionButtons}</Flex>\n </Flex>\n\n <Box>\n <Flex direction=\"column\" gap=\"5\">\n <Heading mb=\"2\" variant=\"heading5\" weight=\"regular\">\n 세션 일자와 시각\n </Heading>\n <DatePickerButton\n disabled={readonly}\n format={formatDate}\n maxDate={maxTime}\n minDate={minTime}\n onChange={onChangeDate}\n placeholder=\"일자를 선택해주세요\"\n selected={date}\n showTimeSelect\n size=\"large\"\n />\n\n <Heading mb=\"2\" variant=\"heading5\" weight=\"regular\">\n 온/오프라인 진행 여부\n </Heading>\n <OnOfflineRadioCard\n disabled={readonly}\n onValueChange={onChangeType}\n size=\"1\"\n value={type}\n />\n\n {readonly ? null : (\n <Flex align=\"center\" gap=\"3\" justify=\"end\">\n <Button\n color=\"gray\"\n onClick={onClickReset}\n size=\"small\"\n variant=\"transparent\"\n >\n 초기화하기\n </Button>\n <Button onClick={onClickSave} size=\"small\">\n 저장하기\n </Button>\n </Flex>\n )}\n </Flex>\n </Box>\n\n {readonly ? (\n <Inset clip=\"border-box\" side=\"bottom\">\n <Box\n mt=\"5\"\n px=\"5\"\n py=\"4\"\n style={{ backgroundColor: 'var(--accent-a3)' }}\n width=\"100%\"\n >\n <Flex align=\"center\" gap=\"4\" justify=\"center\">\n <Typo>{sessionNumber || '-'}회차 세션을 완료하셨나요?</Typo>\n <Button onClick={onClickCompleteSession} size=\"small\">\n 세션 종료하기\n <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,IAAG;AAAA,YACH,IAAG;AAAA,YACH,IAAG;AAAA,YACH,OAAO,EAAE,iBAAiB,mBAAmB;AAAA,YAC7C,OAAM;AAAA,YAEN,+BAAC,QAAK,OAAM,UAAS,KAAI,KAAI,SAAQ,UACnC;AAAA,mCAAC,QAAM;AAAA,iCAAiB;AAAA,gBAAI;AAAA,iBAAc;AAAA,cAC1C,qBAAC,UAAO,SAAS,wBAAwB,MAAK,SAAQ;AAAA;AAAA,gBAEpD,oBAAC,kBAAe;AAAA,iBAClB;AAAA,eACF;AAAA;AAAA,QACF,GACF,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;","names":[]}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Separator
|
|
3
|
+
} from "./chunk-HYITAA4J.js";
|
|
4
|
+
import {
|
|
5
|
+
Grid
|
|
6
|
+
} from "./chunk-EGEQY3KT.js";
|
|
7
|
+
import {
|
|
8
|
+
Flex
|
|
9
|
+
} from "./chunk-25HMMI7R.js";
|
|
10
|
+
import {
|
|
11
|
+
Badge
|
|
12
|
+
} from "./chunk-U3BQT7ZO.js";
|
|
13
|
+
import {
|
|
14
|
+
Box
|
|
15
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
16
|
+
import {
|
|
17
|
+
ArrowRightIcon,
|
|
18
|
+
TimerIcon
|
|
19
|
+
} from "./chunk-W5TPOFOO.js";
|
|
20
|
+
import {
|
|
21
|
+
Heading
|
|
22
|
+
} from "./chunk-BESTU2AY.js";
|
|
23
|
+
import {
|
|
24
|
+
Typo
|
|
25
|
+
} from "./chunk-PMJIFLDT.js";
|
|
26
|
+
|
|
27
|
+
// src/app/platform/curriculum-card.tsx
|
|
28
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
29
|
+
function CurriculumCard(props) {
|
|
30
|
+
const {
|
|
31
|
+
title,
|
|
32
|
+
imgTitle,
|
|
33
|
+
imgSrc,
|
|
34
|
+
description,
|
|
35
|
+
runningTime,
|
|
36
|
+
bgColor,
|
|
37
|
+
onClick
|
|
38
|
+
} = props;
|
|
39
|
+
return /* @__PURE__ */ jsxs(
|
|
40
|
+
Grid,
|
|
41
|
+
{
|
|
42
|
+
columns: { initial: "1", sm: "275px 1fr" },
|
|
43
|
+
gapX: "5",
|
|
44
|
+
gapY: "2",
|
|
45
|
+
onClick,
|
|
46
|
+
style: { cursor: "pointer" },
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ jsx(
|
|
49
|
+
Box,
|
|
50
|
+
{
|
|
51
|
+
height: "165px",
|
|
52
|
+
p: "3",
|
|
53
|
+
style: {
|
|
54
|
+
backgroundImage: `url(${imgSrc})`,
|
|
55
|
+
backgroundColor: bgColor,
|
|
56
|
+
backgroundPositionX: "right",
|
|
57
|
+
backgroundPositionY: "bottom",
|
|
58
|
+
backgroundRepeat: "no-repeat",
|
|
59
|
+
backgroundSize: "contain",
|
|
60
|
+
backgroundAttachment: "local"
|
|
61
|
+
},
|
|
62
|
+
width: "100%",
|
|
63
|
+
children: /* @__PURE__ */ jsx(Heading, { style: { whiteSpace: "break-spaces" }, variant: "heading3", children: imgTitle })
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "3", children: [
|
|
67
|
+
/* @__PURE__ */ jsxs(Grid, { columns: { initial: "1", xs: "1fr auto" }, gapY: "3", children: [
|
|
68
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading4", children: title }),
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
Badge,
|
|
71
|
+
{
|
|
72
|
+
size: "medium",
|
|
73
|
+
style: { justifySelf: "flex-start" },
|
|
74
|
+
variant: "outline",
|
|
75
|
+
children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "1", children: [
|
|
76
|
+
/* @__PURE__ */ jsx(TimerIcon, {}),
|
|
77
|
+
runningTime
|
|
78
|
+
] })
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] }),
|
|
82
|
+
/* @__PURE__ */ jsx(Box, { style: { marginBottom: "auto" }, children: /* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 20 }, children: description == null ? void 0 : description.map((el) => {
|
|
83
|
+
return /* @__PURE__ */ jsx("li", { style: { marginBottom: 8 }, children: /* @__PURE__ */ jsx(Heading, { truncate: true, variant: "heading5", weight: "regular", children: el }) }, el);
|
|
84
|
+
}) }) }),
|
|
85
|
+
/* @__PURE__ */ jsx(Separator, { size: "4" }),
|
|
86
|
+
/* @__PURE__ */ jsxs(Flex, { align: "center", gap: "2", justify: "end", children: [
|
|
87
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", children: "\uAC15\uC758 \uB4E3\uACE0 \uCF54\uCE58\uB2D8\uACFC \uBB34\uC81C\uD55C Q&A" }),
|
|
88
|
+
/* @__PURE__ */ jsx(ArrowRightIcon, { color: "gray" })
|
|
89
|
+
] })
|
|
90
|
+
] })
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export {
|
|
97
|
+
CurriculumCard
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=chunk-HDXQXNCG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/curriculum-card.tsx"],"sourcesContent":["import React from 'react';\nimport { Badge } from '@/atoms/badge';\nimport { Box } from '@/atoms/box';\nimport { Grid } from '@/atoms/grid';\nimport { Heading } from '@/atoms/heading';\nimport { Typo } from '@/atoms/typo';\nimport { Separator } from '@/atoms/separator';\nimport { Flex } from '@/atoms/flex';\nimport { ArrowRightIcon, TimerIcon } from '@/icon';\n\nexport interface CurriculumCardProps {\n title?: string;\n imgTitle?: string;\n imgSrc?: string;\n description?: string[];\n runningTime?: string;\n bgColor?: string;\n onClick?: () => void;\n}\n\nexport function CurriculumCard(props: CurriculumCardProps): React.ReactNode {\n const {\n title,\n imgTitle,\n imgSrc,\n description,\n runningTime,\n bgColor,\n onClick,\n } = props;\n return (\n <Grid\n columns={{ initial: '1', sm: '275px 1fr' }}\n gapX=\"5\"\n gapY=\"2\"\n onClick={onClick}\n style={{ cursor: 'pointer' }}\n >\n {/* 섬네일 */}\n <Box\n height=\"165px\"\n p=\"3\"\n style={{\n backgroundImage: `url(${imgSrc})`,\n backgroundColor: bgColor,\n backgroundPositionX: 'right',\n backgroundPositionY: 'bottom',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'contain',\n backgroundAttachment: 'local',\n }}\n width=\"100%\"\n >\n <Heading style={{ whiteSpace: 'break-spaces' }} variant=\"heading3\">\n {imgTitle}\n </Heading>\n </Box>\n {/* 텍스트 */}\n <Flex direction=\"column\" gap=\"3\">\n {/* 제목 */}\n <Grid columns={{ initial: '1', xs: '1fr auto' }} gapY=\"3\">\n <Heading variant=\"heading4\">{title}</Heading>\n <Badge\n size=\"medium\"\n style={{ justifySelf: 'flex-start' }}\n variant=\"outline\"\n >\n <Flex align=\"center\" gap=\"1\">\n <TimerIcon />\n {runningTime}\n </Flex>\n </Badge>\n </Grid>\n {/* 설명 */}\n <Box style={{ marginBottom: 'auto' }}>\n <ul style={{ margin: 0, paddingLeft: 20 }}>\n {description?.map((el) => {\n return (\n <li key={el} style={{ marginBottom: 8 }}>\n <Heading truncate variant=\"heading5\" weight=\"regular\">\n {el}\n </Heading>\n </li>\n );\n })}\n </ul>\n </Box>\n <Separator size=\"4\" />\n <Flex align=\"center\" gap=\"2\" justify=\"end\">\n <Typo color=\"gray\">강의 듣고 코치님과 무제한 Q&A</Typo>\n <ArrowRightIcon color=\"gray\" />\n </Flex>\n </Flex>\n </Grid>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDQ,cAcI,YAdJ;AAjCD,SAAS,eAAe,OAA6C;AAC1E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,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,KAAI;AAAA,UACpB,qBAAC,QAAK,OAAM,UAAS,KAAI,KAAI,SAAQ,OACnC;AAAA,gCAAC,QAAK,OAAM,QAAO,uFAAkB;AAAA,YACrC,oBAAC,kBAAe,OAAM,QAAO;AAAA,aAC/B;AAAA,WACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Separator
|
|
3
|
+
} from "./chunk-HYITAA4J.js";
|
|
4
|
+
import {
|
|
5
|
+
Grid
|
|
6
|
+
} from "./chunk-EGEQY3KT.js";
|
|
7
|
+
import {
|
|
8
|
+
Heading
|
|
9
|
+
} from "./chunk-BESTU2AY.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
|
+
ArrowRightIcon,
|
|
21
|
+
TimerIcon
|
|
22
|
+
} from "./chunk-W5TPOFOO.js";
|
|
23
|
+
import {
|
|
24
|
+
Badge
|
|
25
|
+
} from "./chunk-U3BQT7ZO.js";
|
|
26
|
+
|
|
27
|
+
// src/app/platform/curriculum-card.tsx
|
|
28
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
29
|
+
function CurriculumCard(props) {
|
|
30
|
+
const {
|
|
31
|
+
title,
|
|
32
|
+
imgTitle,
|
|
33
|
+
imgSrc,
|
|
34
|
+
description,
|
|
35
|
+
runningTime,
|
|
36
|
+
bgColor,
|
|
37
|
+
onClick
|
|
38
|
+
} = props;
|
|
39
|
+
return /* @__PURE__ */ jsxs(
|
|
40
|
+
Grid,
|
|
41
|
+
{
|
|
42
|
+
columns: { initial: "1", sm: "275px 1fr" },
|
|
43
|
+
gapX: "5",
|
|
44
|
+
gapY: "2",
|
|
45
|
+
onClick,
|
|
46
|
+
style: { cursor: "pointer" },
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ jsx(
|
|
49
|
+
Box,
|
|
50
|
+
{
|
|
51
|
+
height: "165px",
|
|
52
|
+
p: "3",
|
|
53
|
+
style: {
|
|
54
|
+
backgroundImage: `url(${imgSrc})`,
|
|
55
|
+
backgroundColor: bgColor,
|
|
56
|
+
backgroundPositionX: "right",
|
|
57
|
+
backgroundPositionY: "bottom",
|
|
58
|
+
backgroundRepeat: "no-repeat",
|
|
59
|
+
backgroundSize: "contain",
|
|
60
|
+
backgroundAttachment: "local"
|
|
61
|
+
},
|
|
62
|
+
width: "100%",
|
|
63
|
+
children: /* @__PURE__ */ jsx(Heading, { style: { whiteSpace: "break-spaces" }, variant: "heading3", children: imgTitle })
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "3", children: [
|
|
67
|
+
/* @__PURE__ */ jsxs(Grid, { columns: { initial: "1", xs: "1fr auto" }, gapY: "3", children: [
|
|
68
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading4", children: title }),
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
Badge,
|
|
71
|
+
{
|
|
72
|
+
size: "medium",
|
|
73
|
+
style: { justifySelf: "flex-start" },
|
|
74
|
+
variant: "outline",
|
|
75
|
+
children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "1", children: [
|
|
76
|
+
/* @__PURE__ */ jsx(TimerIcon, {}),
|
|
77
|
+
runningTime
|
|
78
|
+
] })
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] }),
|
|
82
|
+
/* @__PURE__ */ jsx(Box, { style: { marginBottom: "auto" }, children: /* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 20 }, children: description == null ? void 0 : description.map((el) => {
|
|
83
|
+
return /* @__PURE__ */ jsx("li", { style: { marginBottom: 8 }, children: /* @__PURE__ */ jsx(Heading, { truncate: true, variant: "heading5", weight: "regular", children: el }) }, el);
|
|
84
|
+
}) }) }),
|
|
85
|
+
/* @__PURE__ */ jsx(Separator, { size: "4" }),
|
|
86
|
+
/* @__PURE__ */ jsxs(Flex, { align: "center", gap: "2", justify: "end", children: [
|
|
87
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", children: "\uAC15\uC758 \uB4E3\uACE0 \uCF54\uCE58\uB2D8\uACFC \uBB34\uC81C\uD55C Q&A" }),
|
|
88
|
+
/* @__PURE__ */ jsx(ArrowRightIcon, { color: "gray" })
|
|
89
|
+
] })
|
|
90
|
+
] })
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export {
|
|
97
|
+
CurriculumCard
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=chunk-HKW45LNY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/curriculum-card.tsx"],"sourcesContent":["import React from 'react';\nimport { Badge } from '@/atoms/badge';\nimport { Box } from '@/atoms/box';\nimport { Grid } from '@/atoms/grid';\nimport { Heading } from '@/atoms/heading';\nimport { Typo } from '@/atoms/typo';\nimport { Separator } from '@/atoms/separator';\nimport { Flex } from '@/atoms/flex';\nimport { ArrowRightIcon, TimerIcon } from '@/icon';\n\nexport interface CurriculumCardProps {\n title?: string;\n imgTitle?: string;\n imgSrc?: string;\n description?: string[];\n runningTime?: string;\n bgColor?: string;\n onClick?: () => void;\n}\n\nexport function CurriculumCard(props: CurriculumCardProps): React.ReactNode {\n const {\n title,\n imgTitle,\n imgSrc,\n description,\n runningTime,\n bgColor,\n onClick,\n } = props;\n return (\n <Grid\n columns={{ initial: '1', sm: '275px 1fr' }}\n gapX=\"5\"\n gapY=\"2\"\n onClick={onClick}\n style={{ cursor: 'pointer' }}\n >\n {/* 섬네일 */}\n <Box\n height=\"165px\"\n p=\"3\"\n style={{\n backgroundImage: `url(${imgSrc})`,\n backgroundColor: bgColor,\n backgroundPositionX: 'right',\n backgroundPositionY: 'bottom',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'contain',\n backgroundAttachment: 'local',\n }}\n width=\"100%\"\n >\n <Heading style={{ whiteSpace: 'break-spaces' }} variant=\"heading3\">\n {imgTitle}\n </Heading>\n </Box>\n {/* 텍스트 */}\n <Flex direction=\"column\" gap=\"3\">\n {/* 제목 */}\n <Grid columns={{ initial: '1', xs: '1fr auto' }} gapY=\"3\">\n <Heading variant=\"heading4\">{title}</Heading>\n <Badge\n size=\"medium\"\n style={{ justifySelf: 'flex-start' }}\n variant=\"outline\"\n >\n <Flex align=\"center\" gap=\"1\">\n <TimerIcon />\n {runningTime}\n </Flex>\n </Badge>\n </Grid>\n {/* 설명 */}\n <Box style={{ marginBottom: 'auto' }}>\n <ul style={{ margin: 0, paddingLeft: 20 }}>\n {description?.map((el) => {\n return (\n <li key={el} style={{ marginBottom: 8 }}>\n <Heading truncate variant=\"heading5\" weight=\"regular\">\n {el}\n </Heading>\n </li>\n );\n })}\n </ul>\n </Box>\n <Separator size=\"4\" />\n <Flex align=\"center\" gap=\"2\" justify=\"end\">\n <Typo color=\"gray\">강의 듣고 코치님과 무제한 Q&A</Typo>\n <ArrowRightIcon color=\"gray\" />\n </Flex>\n </Flex>\n </Grid>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDQ,cAcI,YAdJ;AAjCD,SAAS,eAAe,OAA6C;AAC1E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS,EAAE,SAAS,KAAK,IAAI,YAAY;AAAA,MACzC,MAAK;AAAA,MACL,MAAK;AAAA,MACL;AAAA,MACA,OAAO,EAAE,QAAQ,UAAU;AAAA,MAG3B;AAAA;AAAA,UA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ACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DatePicker
|
|
3
|
+
} from "./chunk-FVTBDVT4.js";
|
|
4
|
+
import {
|
|
5
|
+
TextField
|
|
6
|
+
} from "./chunk-6NPTJBFE.js";
|
|
7
|
+
import {
|
|
8
|
+
Button
|
|
9
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
10
|
+
import {
|
|
11
|
+
Box
|
|
12
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
13
|
+
import {
|
|
14
|
+
CalendarIcon
|
|
15
|
+
} from "./chunk-W5TPOFOO.js";
|
|
16
|
+
import {
|
|
17
|
+
__objRest,
|
|
18
|
+
__spreadProps,
|
|
19
|
+
__spreadValues
|
|
20
|
+
} from "./chunk-CRTRMMJ7.js";
|
|
21
|
+
|
|
22
|
+
// src/molecules/date-picker/date-picker-button.tsx
|
|
23
|
+
import { useMemo } from "react";
|
|
24
|
+
import { format } from "date-fns";
|
|
25
|
+
import { clsx } from "clsx";
|
|
26
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
27
|
+
function DatePickerButton(props) {
|
|
28
|
+
const _a = props, { size, format: formatProps, disabled } = _a, rest = __objRest(_a, ["size", "format", "disabled"]);
|
|
29
|
+
const placeholder = rest.placeholder || "\uB0A0\uC9DC\uB97C \uC120\uD0DD\uD574\uC8FC\uC138\uC694";
|
|
30
|
+
const buttonProps = useMemo(() => {
|
|
31
|
+
const variant = "outline";
|
|
32
|
+
const color = "gray";
|
|
33
|
+
return { size, color, variant, disabled };
|
|
34
|
+
}, [disabled, size]);
|
|
35
|
+
const selectFormat = useMemo(() => {
|
|
36
|
+
if (formatProps) return formatProps;
|
|
37
|
+
return (date) => {
|
|
38
|
+
return date ? format(date, "yyyy\uB144 MM\uC6D4 dd\uC77C") : "";
|
|
39
|
+
};
|
|
40
|
+
}, [formatProps]);
|
|
41
|
+
const className = useMemo(() => {
|
|
42
|
+
return clsx(
|
|
43
|
+
"date-picker-button",
|
|
44
|
+
(disabled || props.readOnly) && "disabled"
|
|
45
|
+
);
|
|
46
|
+
}, [disabled, props.readOnly]);
|
|
47
|
+
const placeholderVisible = useMemo(() => {
|
|
48
|
+
return rest.selected ? "" : "placeholder-visible";
|
|
49
|
+
}, [rest.selected]);
|
|
50
|
+
return /* @__PURE__ */ jsx(Box, { p: "0", width: "100%", children: /* @__PURE__ */ jsx(
|
|
51
|
+
DatePicker,
|
|
52
|
+
__spreadProps(__spreadValues({
|
|
53
|
+
customInput: /* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({ asChild: true, className, type: "button" }, buttonProps), { children: /* @__PURE__ */ jsxs(
|
|
54
|
+
TextField.Root,
|
|
55
|
+
{
|
|
56
|
+
className: placeholderVisible,
|
|
57
|
+
placeholder: placeholder || "",
|
|
58
|
+
value: rest.selected ? selectFormat(rest.selected) : placeholder,
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ jsx(TextField.Slot, { className: "hide-slot" }),
|
|
61
|
+
/* @__PURE__ */ jsx(TextField.Slot, { children: /* @__PURE__ */ jsx(CalendarIcon, {}) })
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
) })),
|
|
65
|
+
wrapperClassName: "full-width"
|
|
66
|
+
}, rest), {
|
|
67
|
+
disabled
|
|
68
|
+
})
|
|
69
|
+
) });
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export {
|
|
73
|
+
DatePickerButton
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=chunk-I46J2XHG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/date-picker/date-picker-button.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { format } from 'date-fns';\nimport { clsx } from 'clsx';\nimport type { ButtonProps } from '@/atoms/button.type';\nimport { Button } from '@/atoms/button';\nimport { TextField } from '@/atoms/text-field';\nimport { Box } from '@/atoms/box';\nimport { CalendarIcon } from '../../icon';\nimport type { DatePickerProps } from '.';\nimport { DatePicker } from '.';\n\nexport type DatePickerButtonProps = DatePickerProps & {\n placeholder?: string;\n format?: (date: Date) => string;\n size?: ButtonProps['size'];\n};\n\nexport function DatePickerButton(\n props: DatePickerButtonProps\n): React.ReactNode {\n const { size, format: formatProps, disabled, ...rest } = props;\n const placeholder = rest.placeholder || '날짜를 선택해주세요';\n\n const buttonProps = useMemo(() => {\n const variant: ButtonProps['variant'] = 'outline';\n const color: ButtonProps['color'] = 'gray';\n return { size, color, variant, disabled };\n }, [disabled, size]);\n\n const selectFormat = useMemo(() => {\n if (formatProps) return formatProps;\n return (date?: Date) => {\n return date ? format(date, 'yyyy년 MM월 dd일') : '';\n };\n }, [formatProps]);\n\n const className = useMemo(() => {\n return clsx(\n 'date-picker-button',\n (disabled || props.readOnly) && 'disabled'\n );\n }, [disabled, props.readOnly]);\n\n const placeholderVisible = useMemo(() => {\n return rest.selected ? '' : 'placeholder-visible';\n }, [rest.selected]);\n\n return (\n <Box p=\"0\" width=\"100%\">\n <DatePicker\n customInput={\n <Button asChild className={className} type=\"button\" {...buttonProps}>\n <TextField.Root\n className={placeholderVisible}\n placeholder={placeholder || ''}\n value={rest.selected ? selectFormat(rest.selected) : placeholder}\n >\n <TextField.Slot className=\"hide-slot\" />\n <TextField.Slot>\n <CalendarIcon />\n </TextField.Slot>\n </TextField.Root>\n </Button>\n }\n wrapperClassName=\"full-width\"\n {...rest}\n disabled={disabled}\n />\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,eAAe;AAC/B,SAAS,cAAc;AACvB,SAAS,YAAY;AAkDT,SAKE,KALF;AAnCL,SAAS,iBACd,OACiB;AACjB,QAAyD,YAAjD,QAAM,QAAQ,aAAa,SApBrC,IAoB2D,IAAT,iBAAS,IAAT,CAAxC,QAAM,UAAqB;AACnC,QAAM,cAAc,KAAK,eAAe;AAExC,QAAM,cAAc,QAAQ,MAAM;AAChC,UAAM,UAAkC;AACxC,UAAM,QAA8B;AACpC,WAAO,EAAE,MAAM,OAAO,SAAS,SAAS;AAAA,EAC1C,GAAG,CAAC,UAAU,IAAI,CAAC;AAEnB,QAAM,eAAe,QAAQ,MAAM;AACjC,QAAI,YAAa,QAAO;AACxB,WAAO,CAAC,SAAgB;AACtB,aAAO,OAAO,OAAO,MAAM,8BAAe,IAAI;AAAA,IAChD;AAAA,EACF,GAAG,CAAC,WAAW,CAAC;AAEhB,QAAM,YAAY,QAAQ,MAAM;AAC9B,WAAO;AAAA,MACL;AAAA,OACC,YAAY,MAAM,aAAa;AAAA,IAClC;AAAA,EACF,GAAG,CAAC,UAAU,MAAM,QAAQ,CAAC;AAE7B,QAAM,qBAAqB,QAAQ,MAAM;AACvC,WAAO,KAAK,WAAW,KAAK;AAAA,EAC9B,GAAG,CAAC,KAAK,QAAQ,CAAC;AAElB,SACE,oBAAC,OAAI,GAAE,KAAI,OAAM,QACf;AAAA,IAAC;AAAA;AAAA,MACC,aACE,oBAAC,uCAAO,SAAO,MAAC,WAAsB,MAAK,YAAa,cAAvD,EACC;AAAA,QAAC,UAAU;AAAA,QAAV;AAAA,UACC,WAAW;AAAA,UACX,aAAa,eAAe;AAAA,UAC5B,OAAO,KAAK,WAAW,aAAa,KAAK,QAAQ,IAAI;AAAA,UAErD;AAAA,gCAAC,UAAU,MAAV,EAAe,WAAU,aAAY;AAAA,YACtC,oBAAC,UAAU,MAAV,EACC,8BAAC,gBAAa,GAChB;AAAA;AAAA;AAAA,MACF,IACF;AAAA,MAEF,kBAAiB;AAAA,OACb,OAhBL;AAAA,MAiBC;AAAA;AAAA,EACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
review_question_satisfaction_option_default
|
|
3
|
+
} from "./chunk-TNGEPJ3G.js";
|
|
4
|
+
import {
|
|
5
|
+
ReviewQuestionSatisfisText
|
|
6
|
+
} from "./chunk-CC5RCOSM.js";
|
|
7
|
+
import {
|
|
8
|
+
review_question_text_default
|
|
9
|
+
} from "./chunk-PPCORTMH.js";
|
|
10
|
+
import {
|
|
11
|
+
review_question_radio_default
|
|
12
|
+
} from "./chunk-4NNBXE2Q.js";
|
|
13
|
+
|
|
14
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.tsx
|
|
15
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
|
+
function ReviewQuestionBody(props) {
|
|
17
|
+
const { question, answer, error, onChange } = props;
|
|
18
|
+
if (question.type === "question_radio") {
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
review_question_radio_default,
|
|
21
|
+
{
|
|
22
|
+
answer,
|
|
23
|
+
error,
|
|
24
|
+
onChange,
|
|
25
|
+
question
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
if (question.type === "question_text") {
|
|
30
|
+
return /* @__PURE__ */ jsx(
|
|
31
|
+
review_question_text_default,
|
|
32
|
+
{
|
|
33
|
+
answer,
|
|
34
|
+
error,
|
|
35
|
+
onChange,
|
|
36
|
+
question
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
if (question.type === "question_satisfaction_option") {
|
|
41
|
+
return /* @__PURE__ */ jsx(
|
|
42
|
+
review_question_satisfaction_option_default,
|
|
43
|
+
{
|
|
44
|
+
answer,
|
|
45
|
+
error,
|
|
46
|
+
onChange,
|
|
47
|
+
question
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
if (question.type === "question_satisfaction_text") {
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
ReviewQuestionSatisfisText,
|
|
54
|
+
{
|
|
55
|
+
answer,
|
|
56
|
+
error,
|
|
57
|
+
onChange,
|
|
58
|
+
question
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
var review_question_body_default = ReviewQuestionBody;
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
review_question_body_default
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=chunk-IEMRHLQ3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.tsx"],"sourcesContent":["import React from 'react'; \nimport type { ReviewQuestionElement } from '@/types/curriculum.type';\nimport ReviewQuestionRadio from './review-question-radio';\nimport ReviewQuestionText from './review-question-text';\nimport ReviewQuestionSatisfactionOption from './review-question-satisfaction-option';\nimport ReviewQuestionSatisfactionText from './review-question-satisfaction-text';\n\ninterface ReviewQuestionBodyProps {\n question: ReviewQuestionElement;\n answer: string;\n error?: string;\n onChange: (value: string) => void;\n}\n\nfunction ReviewQuestionBody(props: ReviewQuestionBodyProps): React.ReactNode {\n const { question, answer, error, onChange } = props;\n \n if (question.type === 'question_radio') {\n return (\n <ReviewQuestionRadio\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n );\n }\n if (question.type === 'question_text') {\n return (\n <ReviewQuestionText\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n );\n }\n if (question.type === 'question_satisfaction_option') {\n return (\n <ReviewQuestionSatisfactionOption\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- 그 외의 타입이 있을 경우 있음\n if (question.type === 'question_satisfaction_text') {\n return (\n <ReviewQuestionSatisfactionText\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n );\n }\n\n return null;\n}\nexport default ReviewQuestionBody;\n"],"mappings":";;;;;;;;;;;;;;AAmBM;AALN,SAAS,mBAAmB,OAAiD;AAC3E,QAAM,EAAE,UAAU,QAAQ,OAAO,SAAS,IAAI;AAE9C,MAAI,SAAS,SAAS,kBAAkB;AACtC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AACA,MAAI,SAAS,SAAS,iBAAiB;AACrC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AACA,MAAI,SAAS,SAAS,gCAAgC;AACpD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AAGA,MAAI,SAAS,SAAS,8BAA8B;AAClD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,SAAO;AACT;AACA,IAAO,+BAAQ;","names":[]}
|