@tipp/ui 2.3.1 → 2.3.3
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 +4 -2
- package/dist/app/index.cjs.map +1 -1
- package/dist/app/index.js +94 -94
- package/dist/app/platform/coach-question-list.cjs.map +1 -1
- package/dist/app/platform/coach-question-list.js +29 -29
- package/dist/app/platform/contents-card.cjs.map +1 -1
- package/dist/app/platform/contents-card.js +29 -29
- 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 +4 -2
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +70 -70
- package/dist/app/platform/edit-service-type.cjs +4 -2
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +71 -71
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +70 -70
- package/dist/app/platform/goal-manage-card-read.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-read.js +29 -29
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +70 -70
- package/dist/app/platform/report-card.cjs.map +1 -1
- package/dist/app/platform/report-card.js +29 -29
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +71 -71
- package/dist/app/platform/session-card.cjs +4 -2
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +73 -73
- package/dist/app/platform/session-review-simple-read.cjs.map +1 -1
- package/dist/app/platform/session-review-simple-read.js +29 -29
- package/dist/app/platform/userInfos/coaching-customer-info/index.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +34 -34
- package/dist/app/platform/userInfos/coaching-customer-info/large.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +29 -29
- package/dist/app/platform/userInfos/coaching-customer-info/medium.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +29 -29
- package/dist/app/platform/userInfos/coaching-customer-info/small.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +29 -29
- package/dist/app/platform/userInfos/session-user-info-detail.cjs.map +1 -1
- package/dist/app/platform/userInfos/session-user-info-detail.js +29 -29
- package/dist/app/platform/userInfos/utils.cjs.map +1 -1
- package/dist/app/platform/userInfos/utils.js +28 -28
- package/dist/atoms/bullet-text.js +2 -2
- package/dist/atoms/dialog.cjs +4 -2
- package/dist/atoms/dialog.cjs.map +1 -1
- package/dist/atoms/dialog.d.cts +1 -0
- package/dist/atoms/dialog.d.ts +1 -0
- package/dist/atoms/dialog.js +2 -2
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.cjs +4 -2
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.js +60 -60
- 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-2MYKSCKP.js +99 -0
- package/dist/chunk-2MYKSCKP.js.map +1 -0
- package/dist/chunk-36DXOR67.js +68 -0
- package/dist/chunk-36DXOR67.js.map +1 -0
- package/dist/chunk-3I3IHASZ.js +64 -0
- package/dist/chunk-3I3IHASZ.js.map +1 -0
- package/dist/chunk-4BRN5AXJ.js +64 -0
- package/dist/chunk-4BRN5AXJ.js.map +1 -0
- package/dist/chunk-4N23WOT7.js +144 -0
- package/dist/chunk-4N23WOT7.js.map +1 -0
- package/dist/chunk-4WJF7WXY.js +192 -0
- package/dist/chunk-4WJF7WXY.js.map +1 -0
- package/dist/chunk-55RMETSZ.js +89 -0
- package/dist/chunk-55RMETSZ.js.map +1 -0
- package/dist/chunk-5NA6TNVC.js +54 -0
- package/dist/chunk-5NA6TNVC.js.map +1 -0
- package/dist/chunk-65AC2AKZ.js +117 -0
- package/dist/chunk-65AC2AKZ.js.map +1 -0
- package/dist/chunk-65ZUDFPR.js +117 -0
- package/dist/chunk-65ZUDFPR.js.map +1 -0
- package/dist/chunk-6CTQK5X5.js +196 -0
- package/dist/chunk-6CTQK5X5.js.map +1 -0
- package/dist/chunk-6GAZ3JJT.js +144 -0
- package/dist/chunk-6GAZ3JJT.js.map +1 -0
- package/dist/chunk-6K4VIQTT.js +54 -0
- package/dist/chunk-6K4VIQTT.js.map +1 -0
- package/dist/chunk-6PUQK6YK.js +99 -0
- package/dist/chunk-6PUQK6YK.js.map +1 -0
- package/dist/chunk-7BLUAQBV.js +233 -0
- package/dist/chunk-7BLUAQBV.js.map +1 -0
- package/dist/chunk-7IBUQ5XL.js +363 -0
- package/dist/chunk-7IBUQ5XL.js.map +1 -0
- package/dist/chunk-7Y6S4473.js +69 -0
- package/dist/chunk-7Y6S4473.js.map +1 -0
- package/dist/chunk-7YI6WBLJ.js +144 -0
- package/dist/chunk-7YI6WBLJ.js.map +1 -0
- package/dist/chunk-AH4A53SZ.js +137 -0
- package/dist/chunk-AH4A53SZ.js.map +1 -0
- package/dist/chunk-AYAO3MO4.js +69 -0
- package/dist/chunk-AYAO3MO4.js.map +1 -0
- package/dist/chunk-B5CCM56M.js +135 -0
- package/dist/chunk-B5CCM56M.js.map +1 -0
- package/dist/chunk-B6A7IIYJ.js +70 -0
- package/dist/chunk-B6A7IIYJ.js.map +1 -0
- package/dist/chunk-BW2VENFR.js +100 -0
- package/dist/chunk-BW2VENFR.js.map +1 -0
- package/dist/chunk-C6I6QXIL.js +228 -0
- package/dist/chunk-C6I6QXIL.js.map +1 -0
- package/dist/chunk-CCNYHZOR.js +169 -0
- package/dist/chunk-CCNYHZOR.js.map +1 -0
- package/dist/chunk-CLFON5AH.js +87 -0
- package/dist/chunk-CLFON5AH.js.map +1 -0
- package/dist/chunk-CMBTJWVJ.js +69 -0
- package/dist/chunk-CMBTJWVJ.js.map +1 -0
- package/dist/chunk-CMQRNBLB.js +54 -0
- package/dist/chunk-CMQRNBLB.js.map +1 -0
- package/dist/chunk-CMSM5Z5E.js +137 -0
- package/dist/chunk-CMSM5Z5E.js.map +1 -0
- package/dist/chunk-CWHY67LR.js +174 -0
- package/dist/chunk-CWHY67LR.js.map +1 -0
- package/dist/chunk-D6BUWYJI.js +54 -0
- package/dist/chunk-D6BUWYJI.js.map +1 -0
- package/dist/chunk-DAGMEXFD.js +174 -0
- package/dist/chunk-DAGMEXFD.js.map +1 -0
- package/dist/chunk-DCAW5B6B.js +64 -0
- package/dist/chunk-DCAW5B6B.js.map +1 -0
- package/dist/chunk-DW25XNLO.js +174 -0
- package/dist/chunk-DW25XNLO.js.map +1 -0
- package/dist/chunk-E5A6QALE.js +196 -0
- package/dist/chunk-E5A6QALE.js.map +1 -0
- package/dist/chunk-FQFLQN6Y.js +63 -0
- package/dist/chunk-FQFLQN6Y.js.map +1 -0
- package/dist/chunk-G6RTTIKB.js +64 -0
- package/dist/chunk-G6RTTIKB.js.map +1 -0
- package/dist/chunk-GNB7DD7J.js +196 -0
- package/dist/chunk-GNB7DD7J.js.map +1 -0
- package/dist/chunk-GOXSOL2S.js +145 -0
- package/dist/chunk-GOXSOL2S.js.map +1 -0
- package/dist/chunk-GXEWC3QS.js +196 -0
- package/dist/chunk-GXEWC3QS.js.map +1 -0
- package/dist/chunk-HLLWOJOK.js +174 -0
- package/dist/chunk-HLLWOJOK.js.map +1 -0
- package/dist/chunk-HWIBGZAC.js +165 -0
- package/dist/chunk-HWIBGZAC.js.map +1 -0
- package/dist/chunk-JI3K6VKE.js +144 -0
- package/dist/chunk-JI3K6VKE.js.map +1 -0
- package/dist/chunk-K2ATYWTQ.js +54 -0
- package/dist/chunk-K2ATYWTQ.js.map +1 -0
- package/dist/chunk-KJBSLION.js +174 -0
- package/dist/chunk-KJBSLION.js.map +1 -0
- package/dist/chunk-L6ZQX7HU.js +64 -0
- package/dist/chunk-L6ZQX7HU.js.map +1 -0
- package/dist/chunk-LVICE2MV.js +228 -0
- package/dist/chunk-LVICE2MV.js.map +1 -0
- package/dist/chunk-MPEEG7OO.js +64 -0
- package/dist/chunk-MPEEG7OO.js.map +1 -0
- package/dist/chunk-N5WK2MYE.js +64 -0
- package/dist/chunk-N5WK2MYE.js.map +1 -0
- package/dist/chunk-NIOXLMGY.js +64 -0
- package/dist/chunk-NIOXLMGY.js.map +1 -0
- package/dist/chunk-NQ6NKF3F.js +165 -0
- package/dist/chunk-NQ6NKF3F.js.map +1 -0
- package/dist/chunk-NYDG7SPN.js +63 -0
- package/dist/chunk-NYDG7SPN.js.map +1 -0
- package/dist/chunk-O66FI27Q.js +63 -0
- package/dist/chunk-O66FI27Q.js.map +1 -0
- package/dist/chunk-OB3C3JOM.js +144 -0
- package/dist/chunk-OB3C3JOM.js.map +1 -0
- package/dist/chunk-OQDPY5RB.js +137 -0
- package/dist/chunk-OQDPY5RB.js.map +1 -0
- package/dist/chunk-P7ZFJHY5.js +233 -0
- package/dist/chunk-P7ZFJHY5.js.map +1 -0
- package/dist/chunk-PAM3ZEFI.js +144 -0
- package/dist/chunk-PAM3ZEFI.js.map +1 -0
- package/dist/chunk-PCW3YU6E.js +196 -0
- package/dist/chunk-PCW3YU6E.js.map +1 -0
- package/dist/chunk-Q5Z4EHPC.js +169 -0
- package/dist/chunk-Q5Z4EHPC.js.map +1 -0
- package/dist/chunk-QGGG4IDX.js +196 -0
- package/dist/chunk-QGGG4IDX.js.map +1 -0
- package/dist/chunk-QPRH6W7T.js +196 -0
- package/dist/chunk-QPRH6W7T.js.map +1 -0
- package/dist/chunk-QRQYMO45.js +196 -0
- package/dist/chunk-QRQYMO45.js.map +1 -0
- package/dist/chunk-R2LFT26A.js +192 -0
- package/dist/chunk-R2LFT26A.js.map +1 -0
- package/dist/chunk-R7IT4TCD.js +139 -0
- package/dist/chunk-R7IT4TCD.js.map +1 -0
- package/dist/chunk-RFZPKB5J.js +196 -0
- package/dist/chunk-RFZPKB5J.js.map +1 -0
- package/dist/chunk-RNDGWKZA.js +54 -0
- package/dist/chunk-RNDGWKZA.js.map +1 -0
- package/dist/chunk-SDYFRI7L.js +54 -0
- package/dist/chunk-SDYFRI7L.js.map +1 -0
- package/dist/chunk-SVFDAVBS.js +70 -0
- package/dist/chunk-SVFDAVBS.js.map +1 -0
- package/dist/chunk-SWAF52SS.js +363 -0
- package/dist/chunk-SWAF52SS.js.map +1 -0
- package/dist/chunk-TAYCJ2P3.js +145 -0
- package/dist/chunk-TAYCJ2P3.js.map +1 -0
- package/dist/chunk-TDC2MDRA.js +68 -0
- package/dist/chunk-TDC2MDRA.js.map +1 -0
- package/dist/chunk-UE5S4ECH.js +137 -0
- package/dist/chunk-UE5S4ECH.js.map +1 -0
- package/dist/chunk-UHLHNMKL.js +135 -0
- package/dist/chunk-UHLHNMKL.js.map +1 -0
- package/dist/chunk-VG2DMJ2U.js +125 -0
- package/dist/chunk-VG2DMJ2U.js.map +1 -0
- package/dist/chunk-VGNQAHMB.js +79 -0
- package/dist/chunk-VGNQAHMB.js.map +1 -0
- package/dist/chunk-VH2ZMFTB.js +64 -0
- package/dist/chunk-VH2ZMFTB.js.map +1 -0
- package/dist/chunk-VIPNTIPC.js +174 -0
- package/dist/chunk-VIPNTIPC.js.map +1 -0
- package/dist/chunk-WZRGAW43.js +100 -0
- package/dist/chunk-WZRGAW43.js.map +1 -0
- package/dist/chunk-XBNMZOEU.js +144 -0
- package/dist/chunk-XBNMZOEU.js.map +1 -0
- package/dist/chunk-XCYDDU5Y.js +174 -0
- package/dist/chunk-XCYDDU5Y.js.map +1 -0
- package/dist/chunk-XEM7S4HK.js +79 -0
- package/dist/chunk-XEM7S4HK.js.map +1 -0
- package/dist/chunk-XLTMDAE3.js +75 -0
- package/dist/chunk-XLTMDAE3.js.map +1 -0
- package/dist/chunk-XQXNWDM7.js +144 -0
- package/dist/chunk-XQXNWDM7.js.map +1 -0
- package/dist/chunk-YJZJOZMK.js +125 -0
- package/dist/chunk-YJZJOZMK.js.map +1 -0
- package/dist/chunk-Z42FOTXC.js +87 -0
- package/dist/chunk-Z42FOTXC.js.map +1 -0
- package/dist/chunk-Z7ZJWOOJ.js +89 -0
- package/dist/chunk-Z7ZJWOOJ.js.map +1 -0
- package/dist/chunk-ZJNWNMA4.js +54 -0
- package/dist/chunk-ZJNWNMA4.js.map +1 -0
- package/dist/chunk-ZLIUPGUQ.js +89 -0
- package/dist/chunk-ZLIUPGUQ.js.map +1 -0
- package/dist/chunk-ZN5L462B.js +75 -0
- package/dist/chunk-ZN5L462B.js.map +1 -0
- package/dist/chunk-ZOJRVTUA.js +174 -0
- package/dist/chunk-ZOJRVTUA.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 +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +0 -12
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +150 -148
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +16 -16
- 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 +20 -20
- 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 +4 -2
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.cjs.map +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +22 -22
- package/dist/molecules/curriculumV2/CurriculumContents/index.cjs +4 -2
- 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 +7 -7
- 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 +4 -2
- package/dist/molecules/curriculumV2/index.cjs.map +1 -1
- package/dist/molecules/curriculumV2/index.js +37 -37
- 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.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 +4 -2
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +67 -67
- 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/atoms/dialog.tsx +4 -2
- package/src/icon.ts +1 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Heading
|
|
3
|
+
} from "./chunk-BESTU2AY.js";
|
|
4
|
+
import {
|
|
5
|
+
usePortalContainer
|
|
6
|
+
} from "./chunk-U7N2PWMO.js";
|
|
7
|
+
import {
|
|
8
|
+
IconButton
|
|
9
|
+
} from "./chunk-XK6VEVOK.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-AH4A53SZ.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":"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","names":["Content","Close","Trigger","Root"]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
review_question_satisfaction_option_default
|
|
3
|
+
} from "./chunk-BUZDDAS6.js";
|
|
4
|
+
import {
|
|
5
|
+
ReviewQuestionSatisfisText
|
|
6
|
+
} from "./chunk-BZJSMPS7.js";
|
|
7
|
+
import {
|
|
8
|
+
review_question_text_default
|
|
9
|
+
} from "./chunk-Z42FOTXC.js";
|
|
10
|
+
import {
|
|
11
|
+
review_question_radio_default
|
|
12
|
+
} from "./chunk-WHZZKXOD.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-AYAO3MO4.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":[]}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Heading
|
|
3
|
+
} from "./chunk-BESTU2AY.js";
|
|
4
|
+
import {
|
|
5
|
+
usePortalContainer
|
|
6
|
+
} from "./chunk-U7N2PWMO.js";
|
|
7
|
+
import {
|
|
8
|
+
IconButton
|
|
9
|
+
} from "./chunk-XK6VEVOK.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
|
+
hideCloseButton,
|
|
38
|
+
className
|
|
39
|
+
} = _a, rest = __objRest(_a, [
|
|
40
|
+
"children",
|
|
41
|
+
"style",
|
|
42
|
+
"width",
|
|
43
|
+
"maxWidth",
|
|
44
|
+
"minWidth",
|
|
45
|
+
"maxHeight",
|
|
46
|
+
"height",
|
|
47
|
+
"minHeight",
|
|
48
|
+
"title",
|
|
49
|
+
"buttons",
|
|
50
|
+
"hideCloseButton",
|
|
51
|
+
"className"
|
|
52
|
+
]);
|
|
53
|
+
const { dialogContainerRef } = usePortalContainer();
|
|
54
|
+
return /* @__PURE__ */ jsx(RadixDialog.Portal, { container: dialogContainerRef.current, children: /* @__PURE__ */ jsx(Theme, { asChild: true, children: /* @__PURE__ */ jsx(RadixDialog.Overlay, { className: "DialogOverlay", children: /* @__PURE__ */ jsxs(
|
|
55
|
+
RadixDialog.Content,
|
|
56
|
+
__spreadProps(__spreadValues({
|
|
57
|
+
className: `DialogContent ${className || ""} rt-BaseDialogContent`,
|
|
58
|
+
onPointerDownOutside: preventDefault,
|
|
59
|
+
style: __spreadValues({
|
|
60
|
+
width,
|
|
61
|
+
maxWidth,
|
|
62
|
+
minWidth,
|
|
63
|
+
maxHeight,
|
|
64
|
+
height,
|
|
65
|
+
minHeight
|
|
66
|
+
}, style)
|
|
67
|
+
}, rest), {
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ jsxs(Flex, { gap: "2", justify: "between", width: "100%", children: [
|
|
70
|
+
/* @__PURE__ */ jsx(RadixDialog.Title, { asChild: true, children: typeof title === "string" && title !== "" ? /* @__PURE__ */ jsx(Heading, { mb: "2", variant: "heading3", children: title }) : title }),
|
|
71
|
+
!hideCloseButton && /* @__PURE__ */ jsx(RadixDialog.Close, { asChild: true, className: "DialogClose", children: /* @__PURE__ */ jsx(IconButton, { color: "gray", variant: "ghost", children: /* @__PURE__ */ jsx(Cross1Icon, {}) }) })
|
|
72
|
+
] }),
|
|
73
|
+
children,
|
|
74
|
+
buttons ? /* @__PURE__ */ jsx(Flex, { gap: "3", justify: "end", mt: "3", width: "100%", children: buttons }) : null
|
|
75
|
+
]
|
|
76
|
+
})
|
|
77
|
+
) }) }) });
|
|
78
|
+
}
|
|
79
|
+
function Close2(_a) {
|
|
80
|
+
var _b = _a, {
|
|
81
|
+
children
|
|
82
|
+
} = _b, rest = __objRest(_b, [
|
|
83
|
+
"children"
|
|
84
|
+
]);
|
|
85
|
+
return /* @__PURE__ */ jsx(RadixDialog.Close, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
86
|
+
}
|
|
87
|
+
function Trigger2(_a) {
|
|
88
|
+
var _b = _a, {
|
|
89
|
+
children
|
|
90
|
+
} = _b, rest = __objRest(_b, [
|
|
91
|
+
"children"
|
|
92
|
+
]);
|
|
93
|
+
return /* @__PURE__ */ jsx(RadixDialog.Trigger, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
94
|
+
}
|
|
95
|
+
function Root2(props) {
|
|
96
|
+
const prevOpenRef = useRef(void 0);
|
|
97
|
+
const cleanupExecutedRef = useRef(false);
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
const prevOpen = prevOpenRef.current;
|
|
100
|
+
const currentOpen = props.open;
|
|
101
|
+
if (prevOpen === true && currentOpen === false && !cleanupExecutedRef.current) {
|
|
102
|
+
cleanupExecutedRef.current = true;
|
|
103
|
+
const timer = setTimeout(() => {
|
|
104
|
+
var _a;
|
|
105
|
+
try {
|
|
106
|
+
const activeElement = document.activeElement;
|
|
107
|
+
(_a = activeElement == null ? void 0 : activeElement.blur) == null ? void 0 : _a.call(activeElement);
|
|
108
|
+
document.body.style.pointerEvents = "";
|
|
109
|
+
} catch (e) {
|
|
110
|
+
} finally {
|
|
111
|
+
cleanupExecutedRef.current = false;
|
|
112
|
+
}
|
|
113
|
+
}, 100);
|
|
114
|
+
return () => {
|
|
115
|
+
clearTimeout(timer);
|
|
116
|
+
cleanupExecutedRef.current = false;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
prevOpenRef.current = currentOpen;
|
|
120
|
+
}, [props.open]);
|
|
121
|
+
return /* @__PURE__ */ jsx(RadixDialog.Root, __spreadValues({}, props));
|
|
122
|
+
}
|
|
123
|
+
var Dialog = {
|
|
124
|
+
Root: Root2,
|
|
125
|
+
Trigger: Trigger2,
|
|
126
|
+
Content: Content2,
|
|
127
|
+
Close: Close2,
|
|
128
|
+
Description: RadixDialog.Description,
|
|
129
|
+
Title: RadixDialog.Title
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export {
|
|
133
|
+
Dialog
|
|
134
|
+
};
|
|
135
|
+
//# sourceMappingURL=chunk-B5CCM56M.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};\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 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=\"DialogOverlay\">\n <RadixDialog.Content\n className={`DialogContent ${className || ''} rt-BaseDialogContent`}\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;AA2DtB,SAGM,KAHN;AA1CZ,IAAM,iBAAyE,CAC7E,MACG;AACH,IAAE,eAAe;AACnB;AAEA,SAASA,SAAQ,OAAsC;AACrD,QAcI,YAbF;AAAA;AAAA,IACA,QAAQ,CAAC;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAvCJ,IAyCM,IADC,iBACD,IADC;AAAA,IAZH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGF,QAAM,EAAE,mBAAmB,IAAI,mBAAmB;AAElD,SACE,oBAAa,oBAAZ,EAAmB,WAAW,mBAAmB,SAChD,8BAAC,SAAM,SAAO,MACZ,8BAAa,qBAAZ,EAAoB,WAAU,iBAC7B;AAAA,IAAa;AAAA,IAAZ;AAAA,MACC,WAAW,iBAAiB,aAAa,EAAE;AAAA,MAC3C,sBAAsB;AAAA,MACtB,OAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,SACG;AAAA,OAED,OAZL;AAAA,MAcC;AAAA,6BAAC,QAAK,KAAI,KAAI,SAAQ,WAAU,OAAM,QACpC;AAAA,8BAAa,mBAAZ,EAAkB,SAAO,MACvB,iBAAO,UAAU,YAAY,UAAU,KACtC,oBAAC,WAAQ,IAAG,KAAI,SAAQ,YACrB,iBACH,IAEA,OAEJ;AAAA,UACC,CAAC,mBACA,oBAAa,mBAAZ,EAAkB,SAAO,MAAC,WAAU,eACnC,8BAAC,cAAW,OAAM,QAAO,SAAQ,SAC/B,8BAAC,cAAW,GACd,GACF;AAAA,WAEJ;AAAA,QACC;AAAA,QACA,UACC,oBAAC,QAAK,KAAI,KAAI,SAAQ,OAAM,IAAG,KAAI,OAAM,QACtC,mBACH,IACE;AAAA;AAAA;AAAA,EACN,GACF,GACF,GACF;AAEJ;AAEA,SAASC,OAAM,IAGmC;AAHnC,eACb;AAAA;AAAA,EA9FF,IA6Fe,IAEV,iBAFU,IAEV;AAAA,IADH;AAAA;AAGA,SACE,oBAAa,mBAAZ,+BAAkB,SAAO,QAAK,OAA9B,EACE,WACH;AAEJ;AAEA,SAASC,SAAQ,IAGmC;AAHnC,eACf;AAAA;AAAA,EAzGF,IAwGiB,IAEZ,iBAFY,IAEZ;AAAA,IADH;AAAA;AAGA,SACE,oBAAa,qBAAZ,+BAAoB,SAAO,QAAK,OAAhC,EACE,WACH;AAEJ;AAEA,SAASC,MAAK,OAAiD;AAC7D,QAAM,cAAc,OAA4B,MAAS;AACzD,QAAM,qBAAqB,OAAgB,KAAK;AAGhD,YAAU,MAAM;AACd,UAAM,WAAW,YAAY;AAC7B,UAAM,cAAc,MAAM;AAG1B,QAAI,aAAa,QAAQ,gBAAgB,SAAS,CAAC,mBAAmB,SAAS;AAC7E,yBAAmB,UAAU;AAG7B,YAAM,QAAQ,WAAW,MAAM;AAjIrC;AAkIQ,YAAI;AAEF,gBAAM,gBAAgB,SAAS;AAE/B,+DAAe,SAAf;AAGA,mBAAS,KAAK,MAAM,gBAAgB;AAAA,QACtC,SAAQ;AAAA,QAER,UAAE;AACA,6BAAmB,UAAU;AAAA,QAC/B;AAAA,MACF,GAAG,GAAG;AAEN,aAAO,MAAM;AACX,qBAAa,KAAK;AAClB,2BAAmB,UAAU;AAAA,MAC/B;AAAA,IACF;AAGA,gBAAY,UAAU;AAAA,EACxB,GAAG,CAAC,MAAM,IAAI,CAAC;AAEf,SAAO,oBAAa,kBAAZ,mBAAqB,MAAO;AACtC;AAEO,IAAM,SAAS;AAAA,EACpB,MAAAA;AAAA,EACA,SAAAD;AAAA,EACA,SAAAF;AAAA,EACA,OAAAC;AAAA,EACA,aAAyB;AAAA,EACzB,OAAmB;AACrB;","names":["Content","Close","Trigger","Root"]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useCurriculumContext
|
|
3
|
+
} from "./chunk-IYQJIEVM.js";
|
|
4
|
+
import {
|
|
5
|
+
Typo
|
|
6
|
+
} from "./chunk-PMJIFLDT.js";
|
|
7
|
+
import {
|
|
8
|
+
Flex
|
|
9
|
+
} from "./chunk-25HMMI7R.js";
|
|
10
|
+
import {
|
|
11
|
+
Button
|
|
12
|
+
} from "./chunk-ZVDAEY5Q.js";
|
|
13
|
+
import {
|
|
14
|
+
ResetIcon
|
|
15
|
+
} from "./chunk-R7IT4TCD.js";
|
|
16
|
+
|
|
17
|
+
// src/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.tsx
|
|
18
|
+
import { useMemo } from "react";
|
|
19
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
+
function CurriculumAiTraning({
|
|
21
|
+
item
|
|
22
|
+
}) {
|
|
23
|
+
const { title, description, buttonTitle } = item;
|
|
24
|
+
const { curriculumCompleteMap, onActionButtonClick } = useCurriculumContext();
|
|
25
|
+
const done = useMemo(() => {
|
|
26
|
+
return Boolean(curriculumCompleteMap[item.uuid]);
|
|
27
|
+
}, [curriculumCompleteMap, item.uuid]);
|
|
28
|
+
const bgColor = done ? "var(--color-panel-solid)" : void 0;
|
|
29
|
+
return /* @__PURE__ */ jsxs(
|
|
30
|
+
Flex,
|
|
31
|
+
{
|
|
32
|
+
align: "center",
|
|
33
|
+
direction: "column",
|
|
34
|
+
height: "100%",
|
|
35
|
+
justify: "center",
|
|
36
|
+
style: {
|
|
37
|
+
backgroundImage: `url(https://tipp-coaching-live.s3.ap-northeast-2.amazonaws.com/images/curriculum_ai_bg.png)`,
|
|
38
|
+
backgroundPosition: "center",
|
|
39
|
+
backgroundSize: "cover",
|
|
40
|
+
backgroundRepeat: "no-repeat"
|
|
41
|
+
},
|
|
42
|
+
width: "100%",
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", weight: "bold", children: title }),
|
|
45
|
+
/* @__PURE__ */ jsx(Typo, { align: "center", as: "p", color: "gray", children: description }),
|
|
46
|
+
/* @__PURE__ */ jsxs(
|
|
47
|
+
Button,
|
|
48
|
+
{
|
|
49
|
+
mt: "3",
|
|
50
|
+
onClick: () => {
|
|
51
|
+
onActionButtonClick(item);
|
|
52
|
+
},
|
|
53
|
+
style: { minWidth: 232, backgroundColor: bgColor },
|
|
54
|
+
variant: done ? "outline" : "solid",
|
|
55
|
+
children: [
|
|
56
|
+
done ? "\uB2E4\uC2DC \uC5F0\uC2B5\uD558\uAE30" : buttonTitle || "\uC2DC\uC791\uD558\uAE30",
|
|
57
|
+
done ? /* @__PURE__ */ jsx(ResetIcon, {}) : null
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
var curriculum_ai_traning_default = CurriculumAiTraning;
|
|
66
|
+
|
|
67
|
+
export {
|
|
68
|
+
curriculum_ai_traning_default
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=chunk-B6A7IIYJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport type { CurriculumAiTrainingContents } from '@/types/curriculumContents.type';\nimport { Button } from '@/atoms/button';\nimport { Flex } from '@/atoms/flex';\nimport { Typo } from '@/atoms/typo';\nimport { ResetIcon } from '@/icon';\nimport { useCurriculumContext } from '../curriculum-context';\n\ninterface CurriculumAiTraningProps {\n item: CurriculumAiTrainingContents;\n}\n\nfunction CurriculumAiTraning({\n item,\n}: CurriculumAiTraningProps): React.ReactNode {\n const { title, description, buttonTitle } = item;\n const { curriculumCompleteMap, onActionButtonClick } = useCurriculumContext();\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 <Flex\n align=\"center\"\n direction=\"column\"\n height=\"100%\"\n justify=\"center\"\n style={{\n backgroundImage: `url(https://tipp-coaching-live.s3.ap-northeast-2.amazonaws.com/images/curriculum_ai_bg.png)`,\n backgroundPosition: 'center',\n backgroundSize: 'cover',\n backgroundRepeat: 'no-repeat',\n }}\n width=\"100%\"\n >\n <Typo color=\"gray\" weight=\"bold\">\n {title}\n </Typo>\n <Typo align=\"center\" as=\"p\" color=\"gray\">\n {description}\n </Typo>\n\n <Button\n mt=\"3\"\n onClick={() => { onActionButtonClick(item); }}\n style={{ minWidth: 232, backgroundColor: bgColor }}\n variant={done ? 'outline' : 'solid'}\n >\n {done ? '다시 연습하기' : buttonTitle || '시작하기'}\n {done ? <ResetIcon/> : null}\n </Button>\n \n </Flex>\n );\n}\n\nexport default CurriculumAiTraning;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAgB,eAAe;AAsCzB,cAOA,YAPA;AA1BN,SAAS,oBAAoB;AAAA,EAC3B;AACF,GAA8C;AAC5C,QAAM,EAAE,OAAO,aAAa,YAAY,IAAI;AAC5C,QAAM,EAAE,uBAAuB,oBAAoB,IAAI,qBAAqB;AAE5E,QAAM,OAAO,QAAQ,MAAM;AACzB,WAAO,QAAQ,sBAAsB,KAAK,IAAI,CAAC;AAAA,EACjD,GAAG,CAAC,uBAAuB,KAAK,IAAI,CAAC;AAErC,QAAM,UAAU,OAAO,6BAA6B;AAEpD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAM;AAAA,MACN,WAAU;AAAA,MACV,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,OAAO;AAAA,QACL,iBAAiB;AAAA,QACjB,oBAAoB;AAAA,QACpB,gBAAgB;AAAA,QAChB,kBAAkB;AAAA,MACpB;AAAA,MACA,OAAM;AAAA,MAEN;AAAA,4BAAC,QAAK,OAAM,QAAO,QAAO,QACvB,iBACH;AAAA,QACA,oBAAC,QAAK,OAAM,UAAS,IAAG,KAAI,OAAM,QAC/B,uBACH;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,SAAS,MAAM;AAAE,kCAAoB,IAAI;AAAA,YAAG;AAAA,YAC5C,OAAO,EAAE,UAAU,KAAK,iBAAiB,QAAQ;AAAA,YACjD,SAAS,OAAO,YAAY;AAAA,YAE3B;AAAA,qBAAO,0CAAY,eAAe;AAAA,cAClC,OAAO,oBAAC,aAAS,IAAK;AAAA;AAAA;AAAA,QACzB;AAAA;AAAA;AAAA,EAEF;AAEJ;AAEA,IAAO,gCAAQ;","names":[]}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useCurriculumContext
|
|
3
|
+
} from "./chunk-IYQJIEVM.js";
|
|
4
|
+
import {
|
|
5
|
+
Grid
|
|
6
|
+
} from "./chunk-EGEQY3KT.js";
|
|
7
|
+
import {
|
|
8
|
+
IconButton
|
|
9
|
+
} from "./chunk-XK6VEVOK.js";
|
|
10
|
+
import {
|
|
11
|
+
Box
|
|
12
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
13
|
+
import {
|
|
14
|
+
ChevronLeftIcon,
|
|
15
|
+
ChevronRightIcon
|
|
16
|
+
} from "./chunk-R7IT4TCD.js";
|
|
17
|
+
import {
|
|
18
|
+
Heading
|
|
19
|
+
} from "./chunk-BESTU2AY.js";
|
|
20
|
+
import {
|
|
21
|
+
Typo
|
|
22
|
+
} from "./chunk-PMJIFLDT.js";
|
|
23
|
+
|
|
24
|
+
// src/molecules/curriculumV2/curriculum-sub-nav.tsx
|
|
25
|
+
import { useCallback } from "react";
|
|
26
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
27
|
+
function CurriculumSubNav() {
|
|
28
|
+
const {
|
|
29
|
+
selectedItem,
|
|
30
|
+
selectedSectionTitle,
|
|
31
|
+
hasPrev,
|
|
32
|
+
hasNext,
|
|
33
|
+
selectPrev,
|
|
34
|
+
selectNext,
|
|
35
|
+
scrollNavItem
|
|
36
|
+
} = useCurriculumContext();
|
|
37
|
+
const onClickPrev = useCallback(() => {
|
|
38
|
+
selectPrev((moveIndex) => {
|
|
39
|
+
scrollNavItem(moveIndex.toString());
|
|
40
|
+
});
|
|
41
|
+
}, [selectPrev, scrollNavItem]);
|
|
42
|
+
const onClickNext = useCallback(() => {
|
|
43
|
+
selectNext((moveIndex) => {
|
|
44
|
+
scrollNavItem(moveIndex.toString());
|
|
45
|
+
});
|
|
46
|
+
}, [selectNext, scrollNavItem]);
|
|
47
|
+
return /* @__PURE__ */ jsxs(
|
|
48
|
+
Grid,
|
|
49
|
+
{
|
|
50
|
+
align: "center",
|
|
51
|
+
columns: { initial: "32px 1fr 32px", md: "48px 1fr 48px" },
|
|
52
|
+
pb: { initial: "2", md: "3" },
|
|
53
|
+
px: { initial: "1", md: "2" },
|
|
54
|
+
py: "2",
|
|
55
|
+
rows: "auto",
|
|
56
|
+
children: [
|
|
57
|
+
hasPrev ? /* @__PURE__ */ jsx(
|
|
58
|
+
IconButton,
|
|
59
|
+
{
|
|
60
|
+
color: "gray",
|
|
61
|
+
onClick: onClickPrev,
|
|
62
|
+
size: { initial: "medium", md: "large" },
|
|
63
|
+
variant: "ghost",
|
|
64
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, { height: "16px", width: "16px" })
|
|
65
|
+
}
|
|
66
|
+
) : /* @__PURE__ */ jsx(Box, {}),
|
|
67
|
+
/* @__PURE__ */ jsxs(Box, { width: "100%", children: [
|
|
68
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "none", md: "block" }, children: /* @__PURE__ */ jsx(Heading, { style: { textOverflow: "ellipsis" }, variant: "heading5", children: selectedItem.title }) }),
|
|
69
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "block", md: "none" }, children: /* @__PURE__ */ jsx(Typo, { weight: "bold", children: selectedItem.title }) }),
|
|
70
|
+
/* @__PURE__ */ jsx(
|
|
71
|
+
Typo,
|
|
72
|
+
{
|
|
73
|
+
as: "p",
|
|
74
|
+
color: "gray",
|
|
75
|
+
mt: "1",
|
|
76
|
+
style: { textOverflow: "ellipsis" },
|
|
77
|
+
variant: "caption",
|
|
78
|
+
children: selectedSectionTitle == null ? void 0 : selectedSectionTitle.title
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] }),
|
|
82
|
+
hasNext ? /* @__PURE__ */ jsx(
|
|
83
|
+
IconButton,
|
|
84
|
+
{
|
|
85
|
+
color: "gray",
|
|
86
|
+
onClick: onClickNext,
|
|
87
|
+
size: { initial: "medium", md: "large" },
|
|
88
|
+
variant: "ghost",
|
|
89
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, { height: "16px", width: "16px" })
|
|
90
|
+
}
|
|
91
|
+
) : /* @__PURE__ */ jsx(Box, {})
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export {
|
|
98
|
+
CurriculumSubNav
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=chunk-BW2VENFR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/curriculum-sub-nav.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport { Box, } from '@/atoms/box';\nimport { Grid } from '@/atoms/grid';\nimport { Heading } from '@/atoms/heading';\nimport { IconButton } from '@/atoms/icon-button';\nimport { Typo } from '@/atoms/typo';\nimport { ChevronLeftIcon, ChevronRightIcon } from '@/icon';\nimport { useCurriculumContext } from './curriculum-context';\n\nexport function CurriculumSubNav(): React.ReactNode {\n const {\n selectedItem,\n selectedSectionTitle,\n hasPrev,\n hasNext,\n selectPrev,\n selectNext,\n scrollNavItem,\n } = useCurriculumContext();\n\n const onClickPrev = useCallback(() => {\n selectPrev((moveIndex) => {\n scrollNavItem(moveIndex.toString());\n });\n }, [selectPrev, scrollNavItem]);\n\n const onClickNext = useCallback(() => {\n selectNext((moveIndex) => {\n scrollNavItem(moveIndex.toString());\n });\n }, [selectNext, scrollNavItem]);\n\n return (\n <Grid\n align=\"center\"\n columns={{ initial: '32px 1fr 32px', md: '48px 1fr 48px' }}\n pb={{ initial: '2', md: '3' }}\n px={{ initial: '1', md: '2' }}\n py=\"2\"\n rows=\"auto\"\n >\n {hasPrev ? (\n <IconButton\n color=\"gray\"\n onClick={onClickPrev}\n size={{ initial: 'medium', md: 'large' }}\n variant=\"ghost\"\n >\n <ChevronLeftIcon height=\"16px\" width=\"16px\" />\n </IconButton>\n ) : (\n <Box />\n )}\n <Box width=\"100%\">\n {/* 데스크탑 타이틀 */}\n <Box display={{ initial: 'none', md: 'block' }}>\n <Heading style={{ textOverflow: 'ellipsis' }} variant=\"heading5\">\n {selectedItem.title}\n </Heading>\n </Box>\n\n {/* 모바일 타이틀 */}\n <Box display={{ initial: 'block', md: 'none' }}>\n <Typo weight=\"bold\">{selectedItem.title}</Typo>\n </Box>\n\n <Typo\n as=\"p\"\n color=\"gray\"\n mt=\"1\"\n style={{ textOverflow: 'ellipsis' }}\n variant=\"caption\"\n >\n {selectedSectionTitle?.title}\n </Typo>\n </Box>\n {hasNext ? (\n <IconButton\n color=\"gray\"\n onClick={onClickNext}\n size={{ initial: 'medium', md: 'large' }}\n variant=\"ghost\"\n >\n <ChevronRightIcon height=\"16px\" width=\"16px\" />\n </IconButton>\n ) : (\n <Box />\n )}\n </Grid>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,mBAAmB;AAgDzB,cAKJ,YALI;AAvCH,SAAS,mBAAoC;AAClD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,qBAAqB;AAEzB,QAAM,cAAc,YAAY,MAAM;AACpC,eAAW,CAAC,cAAc;AACxB,oBAAc,UAAU,SAAS,CAAC;AAAA,IACpC,CAAC;AAAA,EACH,GAAG,CAAC,YAAY,aAAa,CAAC;AAE9B,QAAM,cAAc,YAAY,MAAM;AACpC,eAAW,CAAC,cAAc;AACxB,oBAAc,UAAU,SAAS,CAAC;AAAA,IACpC,CAAC;AAAA,EACH,GAAG,CAAC,YAAY,aAAa,CAAC;AAE9B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAM;AAAA,MACN,SAAS,EAAE,SAAS,iBAAiB,IAAI,gBAAgB;AAAA,MACzD,IAAI,EAAE,SAAS,KAAK,IAAI,IAAI;AAAA,MAC5B,IAAI,EAAE,SAAS,KAAK,IAAI,IAAI;AAAA,MAC5B,IAAG;AAAA,MACH,MAAK;AAAA,MAEJ;AAAA,kBACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAM;AAAA,YACN,SAAS;AAAA,YACT,MAAM,EAAE,SAAS,UAAU,IAAI,QAAQ;AAAA,YACvC,SAAQ;AAAA,YAER,8BAAC,mBAAgB,QAAO,QAAO,OAAM,QAAO;AAAA;AAAA,QAC9C,IAEA,oBAAC,OAAI;AAAA,QAEP,qBAAC,OAAI,OAAM,QAET;AAAA,8BAAC,OAAI,SAAS,EAAE,SAAS,QAAQ,IAAI,QAAQ,GAC3C,8BAAC,WAAQ,OAAO,EAAE,cAAc,WAAW,GAAG,SAAQ,YACnD,uBAAa,OAChB,GACF;AAAA,UAGA,oBAAC,OAAI,SAAS,EAAE,SAAS,SAAS,IAAI,OAAO,GAC3C,8BAAC,QAAK,QAAO,QAAQ,uBAAa,OAAM,GAC1C;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,IAAG;AAAA,cACH,OAAM;AAAA,cACN,IAAG;AAAA,cACH,OAAO,EAAE,cAAc,WAAW;AAAA,cAClC,SAAQ;AAAA,cAEP,uEAAsB;AAAA;AAAA,UACzB;AAAA,WACF;AAAA,QACC,UACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAM;AAAA,YACN,SAAS;AAAA,YACT,MAAM,EAAE,SAAS,UAAU,IAAI,QAAQ;AAAA,YACvC,SAAQ;AAAA,YAER,8BAAC,oBAAiB,QAAO,QAAO,OAAM,QAAO;AAAA;AAAA,QAC/C,IAEA,oBAAC,OAAI;AAAA;AAAA;AAAA,EAET;AAEJ;","names":[]}
|