@tipp/ui 2.1.29 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/index.cjs +5 -2
- package/dist/app/index.cjs.map +1 -1
- package/dist/app/index.js +53 -53
- package/dist/app/platform/coach-question-list.js +26 -26
- package/dist/app/platform/contents-card.js +26 -26
- package/dist/app/platform/curriculum-card.js +2 -2
- package/dist/app/platform/edit-coaching-time.cjs +5 -2
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +41 -41
- package/dist/app/platform/edit-service-type.cjs +5 -2
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +40 -40
- package/dist/app/platform/goal-manage-card-edit.cjs +5 -2
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +41 -41
- package/dist/app/platform/goal-manage-card-read.js +26 -26
- package/dist/app/platform/on-offline-radio-card.cjs +5 -2
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +40 -40
- package/dist/app/platform/report-card.js +26 -26
- package/dist/app/platform/reservation-card.cjs +5 -2
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +41 -41
- package/dist/app/platform/session-card.cjs +5 -2
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +42 -42
- package/dist/app/platform/session-review-simple-read.js +26 -26
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +28 -28
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +26 -26
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +26 -26
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +25 -25
- package/dist/app/platform/userInfos/session-user-info-detail.js +25 -25
- package/dist/app/platform/userInfos/utils.js +25 -25
- package/dist/atoms/index.js +61 -61
- package/dist/chunk-26D5QIDQ.js +174 -0
- package/dist/chunk-26D5QIDQ.js.map +1 -0
- package/dist/chunk-2GLHYOET.js +144 -0
- package/dist/chunk-2GLHYOET.js.map +1 -0
- package/dist/chunk-2TXMPG5S.js +145 -0
- package/dist/chunk-2TXMPG5S.js.map +1 -0
- package/dist/chunk-3QM2WUAX.js +281 -0
- package/dist/chunk-3QM2WUAX.js.map +1 -0
- package/dist/chunk-5DJ2LHPL.js +144 -0
- package/dist/chunk-5DJ2LHPL.js.map +1 -0
- package/dist/chunk-5K4VOWNF.js +84 -0
- package/dist/chunk-5K4VOWNF.js.map +1 -0
- package/dist/chunk-6327I3ZH.js +196 -0
- package/dist/chunk-6327I3ZH.js.map +1 -0
- package/dist/chunk-6D5RCEOQ.js +281 -0
- package/dist/chunk-6D5RCEOQ.js.map +1 -0
- package/dist/chunk-6KZBQD4O.js +231 -0
- package/dist/chunk-6KZBQD4O.js.map +1 -0
- package/dist/chunk-6Q6OHG2C.js +74 -0
- package/dist/chunk-6Q6OHG2C.js.map +1 -0
- package/dist/chunk-7S2RDGXN.js +101 -0
- package/dist/chunk-7S2RDGXN.js.map +1 -0
- package/dist/chunk-7SAWHUJA.js +89 -0
- package/dist/chunk-7SAWHUJA.js.map +1 -0
- package/dist/chunk-7WEVW6IN.js +28 -0
- package/dist/chunk-7WEVW6IN.js.map +1 -0
- package/dist/chunk-A4ZOVTFX.js +117 -0
- package/dist/chunk-A4ZOVTFX.js.map +1 -0
- package/dist/chunk-A75LCRKO.js +45 -0
- package/dist/chunk-A75LCRKO.js.map +1 -0
- package/dist/chunk-AJRM2CRN.js +281 -0
- package/dist/chunk-AJRM2CRN.js.map +1 -0
- package/dist/chunk-AY2MOPIM.js +64 -0
- package/dist/chunk-AY2MOPIM.js.map +1 -0
- package/dist/chunk-AZXDKQTU.js +49 -0
- package/dist/chunk-AZXDKQTU.js.map +1 -0
- package/dist/chunk-B35ENQ53.js +174 -0
- package/dist/chunk-B35ENQ53.js.map +1 -0
- package/dist/chunk-BMVBU4ZS.js +192 -0
- package/dist/chunk-BMVBU4ZS.js.map +1 -0
- package/dist/chunk-BQ2C4JPD.js +231 -0
- package/dist/chunk-BQ2C4JPD.js.map +1 -0
- package/dist/chunk-BQ4YWXRL.js +51 -0
- package/dist/chunk-BQ4YWXRL.js.map +1 -0
- package/dist/chunk-BUU2P46X.js +145 -0
- package/dist/chunk-BUU2P46X.js.map +1 -0
- package/dist/chunk-C4IWE6EG.js +169 -0
- package/dist/chunk-C4IWE6EG.js.map +1 -0
- package/dist/chunk-C7HMJBJA.js +53 -0
- package/dist/chunk-C7HMJBJA.js.map +1 -0
- package/dist/chunk-D4GJM3C3.js +69 -0
- package/dist/chunk-D4GJM3C3.js.map +1 -0
- package/dist/chunk-DE6WTN3Q.js +144 -0
- package/dist/chunk-DE6WTN3Q.js.map +1 -0
- package/dist/chunk-DOA3BJLX.js +144 -0
- package/dist/chunk-DOA3BJLX.js.map +1 -0
- package/dist/chunk-EL53KVY4.js +144 -0
- package/dist/chunk-EL53KVY4.js.map +1 -0
- package/dist/chunk-ERXU77DA.js +281 -0
- package/dist/chunk-ERXU77DA.js.map +1 -0
- package/dist/chunk-EWFUZOWN.js +281 -0
- package/dist/chunk-EWFUZOWN.js.map +1 -0
- package/dist/chunk-FAZOROOU.js +68 -0
- package/dist/chunk-FAZOROOU.js.map +1 -0
- package/dist/chunk-FENPJ55R.js +230 -0
- package/dist/chunk-FENPJ55R.js.map +1 -0
- package/dist/chunk-FNV6FVQA.js +61 -0
- package/dist/chunk-FNV6FVQA.js.map +1 -0
- package/dist/chunk-FWRJFBQW.js +57 -0
- package/dist/chunk-FWRJFBQW.js.map +1 -0
- package/dist/chunk-FY47YMFM.js +145 -0
- package/dist/chunk-FY47YMFM.js.map +1 -0
- package/dist/chunk-GWJMQBPR.js +231 -0
- package/dist/chunk-GWJMQBPR.js.map +1 -0
- package/dist/chunk-H2NGLG6A.js +363 -0
- package/dist/chunk-H2NGLG6A.js.map +1 -0
- package/dist/chunk-H5UOKPYZ.js +79 -0
- package/dist/chunk-H5UOKPYZ.js.map +1 -0
- package/dist/chunk-HPEQBAHB.js +165 -0
- package/dist/chunk-HPEQBAHB.js.map +1 -0
- package/dist/chunk-I3CMYMBL.js +233 -0
- package/dist/chunk-I3CMYMBL.js.map +1 -0
- package/dist/chunk-IME3WMKT.js +63 -0
- package/dist/chunk-IME3WMKT.js.map +1 -0
- package/dist/chunk-IPF2UOFH.js +63 -0
- package/dist/chunk-IPF2UOFH.js.map +1 -0
- package/dist/chunk-ITUS6SKB.js +64 -0
- package/dist/chunk-ITUS6SKB.js.map +1 -0
- package/dist/chunk-IZHU33JE.js +174 -0
- package/dist/chunk-IZHU33JE.js.map +1 -0
- package/dist/chunk-JEO4YX65.js +63 -0
- package/dist/chunk-JEO4YX65.js.map +1 -0
- package/dist/chunk-JSOXMJ6K.js +43 -0
- package/dist/chunk-JSOXMJ6K.js.map +1 -0
- package/dist/chunk-KO66SUJN.js +174 -0
- package/dist/chunk-KO66SUJN.js.map +1 -0
- package/dist/chunk-KTCFIAAM.js +281 -0
- package/dist/chunk-KTCFIAAM.js.map +1 -0
- package/dist/chunk-LEUTTEBC.js +63 -0
- package/dist/chunk-LEUTTEBC.js.map +1 -0
- package/dist/chunk-M2SQB6ZY.js +23 -0
- package/dist/chunk-M2SQB6ZY.js.map +1 -0
- package/dist/chunk-NVNCLLYC.js +63 -0
- package/dist/chunk-NVNCLLYC.js.map +1 -0
- package/dist/chunk-OV5F3JZH.js +54 -0
- package/dist/chunk-OV5F3JZH.js.map +1 -0
- package/dist/chunk-P2VBB4C5.js +65 -0
- package/dist/chunk-P2VBB4C5.js.map +1 -0
- package/dist/chunk-P5ARB7KK.js +174 -0
- package/dist/chunk-P5ARB7KK.js.map +1 -0
- package/dist/chunk-PKZ4JCB2.js +231 -0
- package/dist/chunk-PKZ4JCB2.js.map +1 -0
- package/dist/chunk-QQ4ZK4BW.js +37 -0
- package/dist/chunk-QQ4ZK4BW.js.map +1 -0
- package/dist/chunk-QTVX2ERL.js +99 -0
- package/dist/chunk-QTVX2ERL.js.map +1 -0
- package/dist/chunk-QZJHGU4X.js +145 -0
- package/dist/chunk-QZJHGU4X.js.map +1 -0
- package/dist/chunk-R77BOAW5.js +151 -0
- package/dist/chunk-R77BOAW5.js.map +1 -0
- package/dist/chunk-RPCKPFRL.js +145 -0
- package/dist/chunk-RPCKPFRL.js.map +1 -0
- package/dist/chunk-RTVZMGDC.js +144 -0
- package/dist/chunk-RTVZMGDC.js.map +1 -0
- package/dist/chunk-SLBSIRB6.js +58 -0
- package/dist/chunk-SLBSIRB6.js.map +1 -0
- package/dist/chunk-UIGZ3PK5.js +63 -0
- package/dist/chunk-UIGZ3PK5.js.map +1 -0
- package/dist/chunk-UKKISPC5.js +145 -0
- package/dist/chunk-UKKISPC5.js.map +1 -0
- package/dist/chunk-UPZMRMK7.js +29 -0
- package/dist/chunk-UPZMRMK7.js.map +1 -0
- package/dist/chunk-UXOYDVHH.js +63 -0
- package/dist/chunk-UXOYDVHH.js.map +1 -0
- package/dist/chunk-UZUQQLTU.js +63 -0
- package/dist/chunk-UZUQQLTU.js.map +1 -0
- package/dist/chunk-VBLQSRLF.js +63 -0
- package/dist/chunk-VBLQSRLF.js.map +1 -0
- package/dist/chunk-VDKHCZHN.js +63 -0
- package/dist/chunk-VDKHCZHN.js.map +1 -0
- package/dist/chunk-VE737SXT.js +30 -0
- package/dist/chunk-VE737SXT.js.map +1 -0
- package/dist/chunk-VL652LU6.js +281 -0
- package/dist/chunk-VL652LU6.js.map +1 -0
- package/dist/chunk-VO7GWTGE.js +163 -0
- package/dist/chunk-VO7GWTGE.js.map +1 -0
- package/dist/chunk-W3DLS557.js +144 -0
- package/dist/chunk-W3DLS557.js.map +1 -0
- package/dist/chunk-WB2EZAD2.js +87 -0
- package/dist/chunk-WB2EZAD2.js.map +1 -0
- package/dist/chunk-WEBCXOO7.js +30 -0
- package/dist/chunk-WEBCXOO7.js.map +1 -0
- package/dist/chunk-WZM6EE5T.js +174 -0
- package/dist/chunk-WZM6EE5T.js.map +1 -0
- package/dist/chunk-X2AK6LTW.js +174 -0
- package/dist/chunk-X2AK6LTW.js.map +1 -0
- package/dist/chunk-X4R5GV7Q.js +125 -0
- package/dist/chunk-X4R5GV7Q.js.map +1 -0
- package/dist/chunk-YL5EYCRV.js +233 -0
- package/dist/chunk-YL5EYCRV.js.map +1 -0
- package/dist/chunk-YOIAYFQM.js +39 -0
- package/dist/chunk-YOIAYFQM.js.map +1 -0
- package/dist/chunk-Z4YM6RFE.js +70 -0
- package/dist/chunk-Z4YM6RFE.js.map +1 -0
- package/dist/chunk-Z5TVNR2U.js +145 -0
- package/dist/chunk-Z5TVNR2U.js.map +1 -0
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +101 -101
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +30 -30
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +29 -29
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-header.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-layout.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +26 -26
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +26 -26
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +26 -26
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +32 -32
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +26 -26
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +33 -33
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-video.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +34 -34
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-sidebar-item-wrapper.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-title.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +25 -25
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +25 -25
- package/dist/molecules/curriculumV2/curriculum-sub-nav.js +25 -25
- package/dist/molecules/curriculumV2/curriculum-v2-layout.js +25 -25
- package/dist/molecules/curriculumV2/index.js +34 -34
- package/dist/molecules/date-picker/date-picker-button.cjs +5 -2
- package/dist/molecules/date-picker/date-picker-button.cjs.map +1 -1
- package/dist/molecules/date-picker/date-picker-button.js +27 -27
- package/dist/molecules/date-picker/index.cjs +5 -2
- package/dist/molecules/date-picker/index.cjs.map +1 -1
- package/dist/molecules/date-picker/index.js +26 -26
- package/dist/molecules/expand-table/index.js +25 -25
- package/dist/molecules/expand-table/row.js +25 -25
- package/dist/molecules/index.cjs +5 -2
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +42 -42
- package/dist/molecules/learning-post.js +2 -2
- package/dist/molecules/navigation.js +25 -25
- package/dist/molecules/radio-button-card.js +25 -25
- package/dist/molecules/stepper.js +2 -2
- package/dist/molecules/tag-selector.js +26 -26
- package/dist/molecules/time-select.js +25 -25
- package/package.json +3 -3
- package/src/molecules/date-picker/index.tsx +8 -7
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Popover
|
|
3
|
+
} from "./chunk-5AVBYDPB.js";
|
|
4
|
+
import {
|
|
5
|
+
Heading
|
|
6
|
+
} from "./chunk-34OQDUQR.js";
|
|
7
|
+
import {
|
|
8
|
+
IconButton
|
|
9
|
+
} from "./chunk-O3DNDMV3.js";
|
|
10
|
+
import {
|
|
11
|
+
Box
|
|
12
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
13
|
+
import {
|
|
14
|
+
Flex
|
|
15
|
+
} from "./chunk-25HMMI7R.js";
|
|
16
|
+
import {
|
|
17
|
+
Typo
|
|
18
|
+
} from "./chunk-PARGQUJB.js";
|
|
19
|
+
import {
|
|
20
|
+
Button
|
|
21
|
+
} from "./chunk-AFPH32MF.js";
|
|
22
|
+
import {
|
|
23
|
+
ChevronLeftIcon,
|
|
24
|
+
ChevronRightIcon
|
|
25
|
+
} from "./chunk-V5XKNSCK.js";
|
|
26
|
+
import {
|
|
27
|
+
__objRest,
|
|
28
|
+
__spreadProps,
|
|
29
|
+
__spreadValues
|
|
30
|
+
} from "./chunk-2NMEKWO5.js";
|
|
31
|
+
|
|
32
|
+
// src/molecules/date-picker/index.tsx
|
|
33
|
+
import { forwardRef, useMemo, useState, useEffect, useRef } from "react";
|
|
34
|
+
import ReactDatePicker from "react-datepicker";
|
|
35
|
+
import { ko } from "date-fns/locale";
|
|
36
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
37
|
+
var DatePicker = forwardRef(
|
|
38
|
+
(props, ref) => {
|
|
39
|
+
const _a = props, { fullWidth } = _a, rest = __objRest(_a, ["fullWidth"]);
|
|
40
|
+
const fullWidthClassName = fullWidth ? "full-width" : "";
|
|
41
|
+
const [isYearDropdownOpen, setIsYearDropdownOpen] = useState(false);
|
|
42
|
+
const [isMonthDropdownOpen, setIsMonthDropdownOpen] = useState(false);
|
|
43
|
+
const renderCustomHeader = useMemo(() => {
|
|
44
|
+
const getYears = () => {
|
|
45
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
46
|
+
return Array.from(
|
|
47
|
+
{ length: currentYear + 5 - 1920 },
|
|
48
|
+
(_, index) => 1920 + index
|
|
49
|
+
).filter((year) => {
|
|
50
|
+
if (props.minDate && year < props.minDate.getFullYear()) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
if (props.maxDate && year > props.maxDate.getFullYear()) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
return true;
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
return getRenderCustomHeader(__spreadProps(__spreadValues({}, props), {
|
|
60
|
+
years: getYears(),
|
|
61
|
+
isYearDropdownOpen,
|
|
62
|
+
setIsYearDropdownOpen,
|
|
63
|
+
isMonthDropdownOpen,
|
|
64
|
+
setIsMonthDropdownOpen
|
|
65
|
+
}));
|
|
66
|
+
}, [isMonthDropdownOpen, isYearDropdownOpen, props]);
|
|
67
|
+
return /* @__PURE__ */ jsx(Flex, { p: "0", width: "100%", children: /* @__PURE__ */ jsx(
|
|
68
|
+
ReactDatePicker,
|
|
69
|
+
__spreadProps(__spreadValues({
|
|
70
|
+
dateFormat: "yyyy/MM/dd h:mm aa",
|
|
71
|
+
formatWeekDay: (nameOfDay) => {
|
|
72
|
+
return nameOfDay[0];
|
|
73
|
+
},
|
|
74
|
+
locale: ko,
|
|
75
|
+
nextMonthButtonLabel: "\uB2E4\uC74C \uB2EC",
|
|
76
|
+
placeholderText: "YYYY/MM/DD hh:mm AM/PM",
|
|
77
|
+
popperProps: { strategy: "fixed" },
|
|
78
|
+
previousMonthButtonLabel: "\uC774\uC804 \uB2EC",
|
|
79
|
+
ref,
|
|
80
|
+
renderCustomHeader,
|
|
81
|
+
showPopperArrow: false,
|
|
82
|
+
timeCaption: "\uC2DC\uAC04",
|
|
83
|
+
timeFormat: "h:mm aa",
|
|
84
|
+
timeIntervals: 10
|
|
85
|
+
}, rest), {
|
|
86
|
+
calendarClassName: `tipp_datePicker_calendar ${rest.calendarClassName || ""}`,
|
|
87
|
+
wrapperClassName: `tipp_datePicker ${fullWidthClassName} ${rest.wrapperClassName || ""}`
|
|
88
|
+
})
|
|
89
|
+
) });
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
DatePicker.displayName = "DatePicker";
|
|
93
|
+
function DropdownSelector({
|
|
94
|
+
isOpen,
|
|
95
|
+
onOpenChange,
|
|
96
|
+
onSelect,
|
|
97
|
+
options,
|
|
98
|
+
selectedValue,
|
|
99
|
+
suffix
|
|
100
|
+
}) {
|
|
101
|
+
const scrollContainerRef = useRef(null);
|
|
102
|
+
useEffect(() => {
|
|
103
|
+
if (isOpen) {
|
|
104
|
+
queueMicrotask(() => {
|
|
105
|
+
var _a;
|
|
106
|
+
const item = (_a = scrollContainerRef.current) == null ? void 0 : _a.querySelector(
|
|
107
|
+
`[data-year-month-dropdown-tiem="${selectedValue}"]`
|
|
108
|
+
);
|
|
109
|
+
if (item) {
|
|
110
|
+
item.scrollIntoView({ behavior: "instant" });
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}, [isOpen]);
|
|
115
|
+
return /* @__PURE__ */ jsxs(Popover.Root, { onOpenChange, open: isOpen, modal: true, children: [
|
|
116
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { children: /* @__PURE__ */ jsx(Button, { variant: "ghost", children: /* @__PURE__ */ jsxs(Heading, { variant: "heading4", weight: "regular", children: [
|
|
117
|
+
selectedValue,
|
|
118
|
+
suffix
|
|
119
|
+
] }) }) }),
|
|
120
|
+
/* @__PURE__ */ jsx(Popover.Content, { side: "bottom", children: /* @__PURE__ */ jsx(
|
|
121
|
+
Box,
|
|
122
|
+
{
|
|
123
|
+
maxHeight: "200px",
|
|
124
|
+
overflowY: "auto",
|
|
125
|
+
ref: scrollContainerRef,
|
|
126
|
+
style: { scrollbarWidth: "none" },
|
|
127
|
+
children: /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "1", children: options.map((item) => /* @__PURE__ */ jsx(
|
|
128
|
+
Button,
|
|
129
|
+
{
|
|
130
|
+
color: "gray",
|
|
131
|
+
"data-year-month-dropdown-tiem": item,
|
|
132
|
+
className: "react-datepicker_dropdown_item",
|
|
133
|
+
onMouseDown: (e) => {
|
|
134
|
+
e.stopPropagation();
|
|
135
|
+
e.preventDefault();
|
|
136
|
+
},
|
|
137
|
+
onClick: () => {
|
|
138
|
+
onSelect(item);
|
|
139
|
+
},
|
|
140
|
+
variant: "transparent",
|
|
141
|
+
children: /* @__PURE__ */ jsxs(Typo, { weight: item === selectedValue ? "bold" : void 0, children: [
|
|
142
|
+
item,
|
|
143
|
+
suffix
|
|
144
|
+
] })
|
|
145
|
+
},
|
|
146
|
+
item
|
|
147
|
+
)) })
|
|
148
|
+
}
|
|
149
|
+
) })
|
|
150
|
+
] });
|
|
151
|
+
}
|
|
152
|
+
var getRenderCustomHeader = (props) => {
|
|
153
|
+
const renderer = (renderCustomHeaderProps) => {
|
|
154
|
+
const {
|
|
155
|
+
date,
|
|
156
|
+
decreaseMonth,
|
|
157
|
+
increaseMonth,
|
|
158
|
+
prevMonthButtonDisabled,
|
|
159
|
+
nextMonthButtonDisabled,
|
|
160
|
+
changeYear,
|
|
161
|
+
changeMonth
|
|
162
|
+
} = renderCustomHeaderProps;
|
|
163
|
+
const {
|
|
164
|
+
years,
|
|
165
|
+
isYearDropdownOpen,
|
|
166
|
+
setIsYearDropdownOpen,
|
|
167
|
+
isMonthDropdownOpen,
|
|
168
|
+
setIsMonthDropdownOpen
|
|
169
|
+
} = props;
|
|
170
|
+
const year = date ? new Date(date).getFullYear() : "-";
|
|
171
|
+
const month = date ? new Date(date).getMonth() + 1 : "-";
|
|
172
|
+
return /* @__PURE__ */ jsxs(Flex, { align: "center", justify: "between", pl: "2", pr: "2", children: [
|
|
173
|
+
/* @__PURE__ */ jsx(
|
|
174
|
+
IconButton,
|
|
175
|
+
{
|
|
176
|
+
disabled: prevMonthButtonDisabled,
|
|
177
|
+
onClick: decreaseMonth,
|
|
178
|
+
type: "button",
|
|
179
|
+
variant: "ghost",
|
|
180
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
|
|
181
|
+
}
|
|
182
|
+
),
|
|
183
|
+
/* @__PURE__ */ jsxs(Flex, { gap: "3", children: [
|
|
184
|
+
/* @__PURE__ */ jsx(
|
|
185
|
+
DropdownSelector,
|
|
186
|
+
{
|
|
187
|
+
isOpen: isYearDropdownOpen,
|
|
188
|
+
onOpenChange: setIsYearDropdownOpen,
|
|
189
|
+
onSelect: (value) => {
|
|
190
|
+
changeYear(value);
|
|
191
|
+
setIsYearDropdownOpen(false);
|
|
192
|
+
},
|
|
193
|
+
options: years,
|
|
194
|
+
selectedValue: year,
|
|
195
|
+
suffix: "\uB144"
|
|
196
|
+
}
|
|
197
|
+
),
|
|
198
|
+
/* @__PURE__ */ jsx(
|
|
199
|
+
DropdownSelector,
|
|
200
|
+
{
|
|
201
|
+
isOpen: isMonthDropdownOpen,
|
|
202
|
+
onOpenChange: setIsMonthDropdownOpen,
|
|
203
|
+
onSelect: (value) => {
|
|
204
|
+
changeMonth(value - 1);
|
|
205
|
+
setIsMonthDropdownOpen(false);
|
|
206
|
+
},
|
|
207
|
+
options: Array.from({ length: 12 }, (_, index) => index + 1),
|
|
208
|
+
selectedValue: month,
|
|
209
|
+
suffix: "\uC6D4"
|
|
210
|
+
}
|
|
211
|
+
)
|
|
212
|
+
] }),
|
|
213
|
+
/* @__PURE__ */ jsx(
|
|
214
|
+
IconButton,
|
|
215
|
+
{
|
|
216
|
+
disabled: nextMonthButtonDisabled,
|
|
217
|
+
onClick: increaseMonth,
|
|
218
|
+
type: "button",
|
|
219
|
+
variant: "ghost",
|
|
220
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
221
|
+
}
|
|
222
|
+
)
|
|
223
|
+
] });
|
|
224
|
+
};
|
|
225
|
+
return renderer;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
export {
|
|
229
|
+
DatePicker
|
|
230
|
+
};
|
|
231
|
+
//# sourceMappingURL=chunk-PKZ4JCB2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/date-picker/index.tsx"],"sourcesContent":["import type { ElementRef } from 'react';\nimport React, { forwardRef, useMemo, useState, useEffect, useRef } from 'react';\nimport type { DatePickerProps as ReactDatePickerProps } from 'react-datepicker';\nimport ReactDatePicker from 'react-datepicker';\nimport { ko } from 'date-fns/locale';\nimport { Box, Button, Popover, Typo } from '@/atoms';\nimport { IconButton } from '../../atoms/icon-button';\nimport { Flex } from '../../atoms/flex';\nimport { ChevronLeftIcon, ChevronRightIcon } from '../../icon';\nimport { Heading } from '../../atoms/heading';\n\nexport type DatePickerProps = ReactDatePickerProps & {\n fullWidth?: boolean;\n};\ntype DatePickerRef = ElementRef<typeof ReactDatePicker>; \n\nexport const DatePicker = forwardRef<DatePickerRef, DatePickerProps>(\n (props, ref): React.ReactNode => {\n const { fullWidth, ...rest } = props;\n const fullWidthClassName = fullWidth ? 'full-width' : '';\n const [isYearDropdownOpen, setIsYearDropdownOpen] = useState(false);\n const [isMonthDropdownOpen, setIsMonthDropdownOpen] = useState(false);\n\n const renderCustomHeader = useMemo(() => {\n const getYears = (): number[] => {\n const currentYear = new Date().getFullYear();\n return Array.from(\n { length: currentYear + 5 - 1920 },\n (_, index) => 1920 + index\n ).filter((year) => {\n if (props.minDate && year < props.minDate.getFullYear()) {\n return false;\n }\n if (props.maxDate && year > props.maxDate.getFullYear()) {\n return false;\n }\n return true;\n });\n };\n\n return getRenderCustomHeader({\n ...props,\n years: getYears(),\n isYearDropdownOpen,\n setIsYearDropdownOpen,\n isMonthDropdownOpen,\n setIsMonthDropdownOpen,\n });\n }, [isMonthDropdownOpen, isYearDropdownOpen, props]);\n\n return (\n <Flex p=\"0\" width=\"100%\">\n <ReactDatePicker\n dateFormat=\"yyyy/MM/dd h:mm aa\"\n formatWeekDay={(nameOfDay) => { \n return nameOfDay[0];\n }}\n locale={ko}\n nextMonthButtonLabel=\"다음 달\"\n placeholderText=\"YYYY/MM/DD hh:mm AM/PM\"\n popperProps={{ strategy: 'fixed' }}\n previousMonthButtonLabel=\"이전 달\"\n ref={ref}\n renderCustomHeader={renderCustomHeader}\n showPopperArrow={false}\n timeCaption=\"시간\"\n timeFormat=\"h:mm aa\"\n timeIntervals={10} \n {...rest}\n calendarClassName={`tipp_datePicker_calendar ${rest.calendarClassName || ''}`}\n wrapperClassName={`tipp_datePicker ${fullWidthClassName} ${rest.wrapperClassName || ''}`}\n />\n </Flex>\n );\n }\n);\n\nDatePicker.displayName = 'DatePicker';\n\ninterface DropdownSelectorProps {\n isOpen: boolean;\n onOpenChange: (open: boolean) => void;\n onSelect: (value: number) => void;\n options: number[];\n selectedValue: number | string;\n suffix: string;\n}\n\nfunction DropdownSelector({\n isOpen,\n onOpenChange,\n onSelect,\n options,\n selectedValue,\n suffix,\n}: DropdownSelectorProps): React.JSX.Element {\n\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n useEffect(() => {\n if (isOpen) { \n queueMicrotask(() => {\n const item = scrollContainerRef.current?.querySelector(\n `[data-year-month-dropdown-tiem=\"${selectedValue}\"]`\n );\n if (item) {\n item.scrollIntoView({ behavior: 'instant' });\n }\n });\n }\n }, [isOpen]);\n \n\n return (\n <Popover.Root onOpenChange={onOpenChange} open={isOpen} modal>\n <Popover.Trigger>\n <Button variant=\"ghost\">\n <Heading variant=\"heading4\" weight=\"regular\">\n {selectedValue}\n {suffix}\n </Heading>\n </Button>\n </Popover.Trigger>\n <Popover.Content side=\"bottom\">\n <Box\n maxHeight=\"200px\"\n overflowY=\"auto\"\n ref={scrollContainerRef}\n style={{ scrollbarWidth: 'none' }}\n >\n <Flex direction=\"column\" gap=\"1\">\n {options.map((item: number) => (\n <Button\n color=\"gray\"\n data-year-month-dropdown-tiem={item}\n key={item}\n className={'react-datepicker_dropdown_item'}\n onMouseDown={(e) => {\n e.stopPropagation();\n e.preventDefault();\n }}\n onClick={() => {\n onSelect(item);\n }}\n variant=\"transparent\"\n >\n <Typo weight= {item === selectedValue ? 'bold' : undefined}>\n {item}\n {suffix}\n </Typo>\n </Button>\n ))}\n </Flex>\n </Box>\n </Popover.Content>\n </Popover.Root>\n );\n}\n\nconst getRenderCustomHeader: (\n props: ReactDatePickerProps & {\n years: number[];\n isYearDropdownOpen: boolean;\n setIsYearDropdownOpen: (show: boolean) => void;\n isMonthDropdownOpen: boolean;\n setIsMonthDropdownOpen: (show: boolean) => void;\n }\n) => ReactDatePickerProps['renderCustomHeader'] = (props) => {\n const renderer: ReactDatePickerProps['renderCustomHeader'] = (\n renderCustomHeaderProps\n ) => {\n const {\n date,\n decreaseMonth,\n increaseMonth,\n prevMonthButtonDisabled,\n nextMonthButtonDisabled,\n changeYear,\n changeMonth,\n } = renderCustomHeaderProps;\n const {\n years,\n isYearDropdownOpen,\n setIsYearDropdownOpen,\n isMonthDropdownOpen,\n setIsMonthDropdownOpen,\n } = props;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- date가 undefined일 수 있음\n const year = date ? new Date(date).getFullYear() : '-';\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- date가 undefined일 수 있음\n const month = date ? new Date(date).getMonth() + 1 : '-';\n\n return (\n <Flex align=\"center\" justify=\"between\" pl=\"2\" pr=\"2\">\n <IconButton\n disabled={prevMonthButtonDisabled}\n onClick={decreaseMonth}\n type=\"button\"\n variant=\"ghost\"\n >\n <ChevronLeftIcon />\n </IconButton>\n <Flex gap=\"3\">\n <DropdownSelector\n isOpen={isYearDropdownOpen}\n onOpenChange={setIsYearDropdownOpen}\n onSelect={(value) => {\n changeYear(value);\n setIsYearDropdownOpen(false);\n }}\n options={years}\n selectedValue={year}\n suffix=\"년\"\n />\n <DropdownSelector\n isOpen={isMonthDropdownOpen}\n onOpenChange={setIsMonthDropdownOpen}\n onSelect={(value) => {\n changeMonth(value - 1);\n setIsMonthDropdownOpen(false);\n }}\n options={Array.from({ length: 12 }, (_, index) => index + 1)}\n selectedValue={month}\n suffix=\"월\"\n />\n </Flex>\n\n <IconButton\n disabled={nextMonthButtonDisabled}\n onClick={increaseMonth}\n type=\"button\"\n variant=\"ghost\"\n >\n <ChevronRightIcon />\n </IconButton>\n </Flex>\n );\n };\n return renderer;\n};\n\n// DatePicker.displayName = 'DatePicker';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAgB,YAAY,SAAS,UAAU,WAAW,cAAc;AAExE,OAAO,qBAAqB;AAC5B,SAAS,UAAU;AAgDX,cAgEE,YAhEF;AApCD,IAAM,aAAa;AAAA,EACxB,CAAC,OAAO,QAAyB;AAC/B,UAA+B,YAAvB,YAlBZ,IAkBmC,IAAT,iBAAS,IAAT,CAAd;AACR,UAAM,qBAAqB,YAAY,eAAe;AACtD,UAAM,CAAC,oBAAoB,qBAAqB,IAAI,SAAS,KAAK;AAClE,UAAM,CAAC,qBAAqB,sBAAsB,IAAI,SAAS,KAAK;AAEpE,UAAM,qBAAqB,QAAQ,MAAM;AACvC,YAAM,WAAW,MAAgB;AAC/B,cAAM,eAAc,oBAAI,KAAK,GAAE,YAAY;AAC3C,eAAO,MAAM;AAAA,UACX,EAAE,QAAQ,cAAc,IAAI,KAAK;AAAA,UACjC,CAAC,GAAG,UAAU,OAAO;AAAA,QACvB,EAAE,OAAO,CAAC,SAAS;AACjB,cAAI,MAAM,WAAW,OAAO,MAAM,QAAQ,YAAY,GAAG;AACvD,mBAAO;AAAA,UACT;AACA,cAAI,MAAM,WAAW,OAAO,MAAM,QAAQ,YAAY,GAAG;AACvD,mBAAO;AAAA,UACT;AACA,iBAAO;AAAA,QACT,CAAC;AAAA,MACH;AAEA,aAAO,sBAAsB,iCACxB,QADwB;AAAA,QAE3B,OAAO,SAA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,UAER,8BAAC,mBAAgB;AAAA;AAAA,MACnB;AAAA,MACA,qBAAC,QAAK,KAAI,KACR;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,QAAQ;AAAA,YACR,cAAc;AAAA,YACd,UAAU,CAAC,UAAU;AACnB,yBAAW,KAAK;AAChB,oCAAsB,KAAK;AAAA,YAC7B;AAAA,YACA,SAAS;AAAA,YACT,eAAe;AAAA,YACf,QAAO;AAAA;AAAA,QACT;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,QAAQ;AAAA,YACR,cAAc;AAAA,YACd,UAAU,CAAC,UAAU;AACnB,0BAAY,QAAQ,CAAC;AACrB,qCAAuB,KAAK;AAAA,YAC9B;AAAA,YACA,SAAS,MAAM,KAAK,EAAE,QAAQ,GAAG,GAAG,CAAC,GAAG,UAAU,QAAQ,CAAC;AAAA,YAC3D,eAAe;AAAA,YACf,QAAO;AAAA;AAAA,QACT;AAAA,SACF;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,UAAU;AAAA,UACV,SAAS;AAAA,UACT,MAAK;AAAA,UACL,SAAQ;AAAA,UAER,8BAAC,oBAAiB;AAAA;AAAA,MACpB;AAAA,OACF;AAAA,EAEJ;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ReviewQuestionContentHeader
|
|
3
|
+
} from "./chunk-JSOXMJ6K.js";
|
|
4
|
+
import {
|
|
5
|
+
RadioGroup
|
|
6
|
+
} from "./chunk-6DJOIRMF.js";
|
|
7
|
+
import {
|
|
8
|
+
Card
|
|
9
|
+
} from "./chunk-HEDMSFPW.js";
|
|
10
|
+
import {
|
|
11
|
+
Flex
|
|
12
|
+
} from "./chunk-25HMMI7R.js";
|
|
13
|
+
|
|
14
|
+
// src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.tsx
|
|
15
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
function ReviewQuestionSatisfisRadio(props) {
|
|
17
|
+
var _a, _b, _c;
|
|
18
|
+
const { question, answer, onChange } = props;
|
|
19
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20
|
+
/* @__PURE__ */ jsx(Card, { size: "2", children: /* @__PURE__ */ jsx(
|
|
21
|
+
ReviewQuestionContentHeader,
|
|
22
|
+
{
|
|
23
|
+
icon: question.icon,
|
|
24
|
+
question: (_a = question.question) != null ? _a : "\uC774\uBC88 \uD559\uC2B5\uC5D0 \uB300\uD55C \uC804\uBC18\uC801\uC778 \uB9CC\uC871\uB3C4\uB97C \uC54C\uB824\uC8FC\uC138\uC694.",
|
|
25
|
+
title: (_b = question.title) != null ? _b : "\uB9CC\uC871\uB3C4 \uC870\uC0AC",
|
|
26
|
+
type: question.type
|
|
27
|
+
}
|
|
28
|
+
) }),
|
|
29
|
+
/* @__PURE__ */ jsx(RadioGroup.Root, { color: "iris", mt: "3", onValueChange: onChange, value: answer, children: /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "2", children: (_c = question.options) == null ? void 0 : _c.map((option) => /* @__PURE__ */ jsx(RadioGroup.Item, { value: String(option.value), children: option.label }, option.value)) }) })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
var review_question_satisfaction_option_default = ReviewQuestionSatisfisRadio;
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
review_question_satisfaction_option_default
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=chunk-QQ4ZK4BW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.tsx"],"sourcesContent":["import React from 'react';\nimport { Card, Flex, RadioGroup } from '@/atoms';\nimport { type CurriculumReviewQuestionSatisfactionOption } from '@/types/curriculumContents.type';\nimport { ReviewQuestionContentHeader } from './review-comp';\n\ninterface ReviewQuestionSatisfactionOptionProps {\n question: CurriculumReviewQuestionSatisfactionOption;\n answer: string;\n error?: string;\n onChange: (value: string) => void;\n}\n\nfunction ReviewQuestionSatisfisRadio(\n props: ReviewQuestionSatisfactionOptionProps\n): React.ReactNode {\n const { question, answer, onChange } = props;\n \n return (\n <>\n <Card size=\"2\">\n <ReviewQuestionContentHeader\n icon={question.icon}\n question={\n question.question ??\n '이번 학습에 대한 전반적인 만족도를 알려주세요.'\n }\n title={question.title ?? '만족도 조사'}\n type={question.type}\n />\n </Card>\n <RadioGroup.Root color=\"iris\" mt=\"3\" onValueChange={onChange} value={answer}>\n <Flex direction=\"column\" gap=\"2\">\n {question.options?.map((option) => (\n <RadioGroup.Item key={option.value} value={String(option.value)}>\n {option.label}\n </RadioGroup.Item>\n ))}\n </Flex>\n </RadioGroup.Root>\n </>\n );\n}\n\nexport default ReviewQuestionSatisfisRadio;\n"],"mappings":";;;;;;;;;;;;;;AAkBI,mBAEI,KAFJ;AANJ,SAAS,4BACP,OACiB;AAdnB;AAeE,QAAM,EAAE,UAAU,QAAQ,SAAS,IAAI;AAEvC,SACE,iCACE;AAAA,wBAAC,QAAK,MAAK,KACT;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,SAAS;AAAA,QACf,WACE,cAAS,aAAT,YACA;AAAA,QAEF,QAAO,cAAS,UAAT,YAAkB;AAAA,QACzB,MAAM,SAAS;AAAA;AAAA,IACjB,GACF;AAAA,IACA,oBAAC,WAAW,MAAX,EAAgB,OAAM,QAAO,IAAG,KAAI,eAAe,UAAU,OAAO,QACnE,8BAAC,QAAK,WAAU,UAAS,KAAI,KAC1B,yBAAS,YAAT,mBAAkB,IAAI,CAAC,WACtB,oBAAC,WAAW,MAAX,EAAmC,OAAO,OAAO,OAAO,KAAK,GAC3D,iBAAO,SADY,OAAO,KAE7B,IAEJ,GACF;AAAA,KACF;AAEJ;AAEA,IAAO,8CAAQ;","names":[]}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Grid
|
|
3
|
+
} from "./chunk-EGEQY3KT.js";
|
|
4
|
+
import {
|
|
5
|
+
Heading
|
|
6
|
+
} from "./chunk-34OQDUQR.js";
|
|
7
|
+
import {
|
|
8
|
+
Separator
|
|
9
|
+
} from "./chunk-HYITAA4J.js";
|
|
10
|
+
import {
|
|
11
|
+
Badge
|
|
12
|
+
} from "./chunk-FCIHNIOH.js";
|
|
13
|
+
import {
|
|
14
|
+
Box
|
|
15
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
16
|
+
import {
|
|
17
|
+
Flex
|
|
18
|
+
} from "./chunk-25HMMI7R.js";
|
|
19
|
+
import {
|
|
20
|
+
Typo
|
|
21
|
+
} from "./chunk-PARGQUJB.js";
|
|
22
|
+
import {
|
|
23
|
+
ArrowRightIcon,
|
|
24
|
+
TimerIcon
|
|
25
|
+
} from "./chunk-V5XKNSCK.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-QTVX2ERL.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,UAAC;AAAA;AAAA,YACC,QAAO;AAAA,YACP,GAAE;AAAA,YACF,OAAO;AAAA,cACL,iBAAiB,OAAO,MAAM;AAAA,cAC9B,iBAAiB;AAAA,cACjB,qBAAqB;AAAA,cACrB,qBAAqB;AAAA,cACrB,kBAAkB;AAAA,cAClB,gBAAgB;AAAA,cAChB,sBAAsB;AAAA,YACxB;AAAA,YACA,OAAM;AAAA,YAEN,8BAAC,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
+
import {
|
|
11
|
+
TextField
|
|
12
|
+
} from "./chunk-5KDNSBO5.js";
|
|
13
|
+
import {
|
|
14
|
+
Card
|
|
15
|
+
} from "./chunk-HEDMSFPW.js";
|
|
16
|
+
import {
|
|
17
|
+
Flex
|
|
18
|
+
} from "./chunk-25HMMI7R.js";
|
|
19
|
+
import {
|
|
20
|
+
Button
|
|
21
|
+
} from "./chunk-AFPH32MF.js";
|
|
22
|
+
import {
|
|
23
|
+
__spreadValues
|
|
24
|
+
} from "./chunk-2NMEKWO5.js";
|
|
25
|
+
|
|
26
|
+
// src/app/platform/goal-manage-card-edit.tsx
|
|
27
|
+
import { useCallback, useState } from "react";
|
|
28
|
+
import { format } from "date-fns";
|
|
29
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
30
|
+
var initialValues = {
|
|
31
|
+
goal: "",
|
|
32
|
+
effect: "",
|
|
33
|
+
huddle: "",
|
|
34
|
+
dueDate: void 0
|
|
35
|
+
};
|
|
36
|
+
var dummyFn = () => {
|
|
37
|
+
};
|
|
38
|
+
function GoalManageCardEdit(props) {
|
|
39
|
+
const { defaultValues, errors } = props;
|
|
40
|
+
const [values, setValues] = useState(defaultValues || initialValues);
|
|
41
|
+
const onChange = useCallback(
|
|
42
|
+
(v) => {
|
|
43
|
+
var _a;
|
|
44
|
+
setValues((prev) => __spreadValues(__spreadValues({}, prev), v));
|
|
45
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, v);
|
|
46
|
+
},
|
|
47
|
+
[props]
|
|
48
|
+
);
|
|
49
|
+
const onClickInit = useCallback(() => {
|
|
50
|
+
var _a;
|
|
51
|
+
setValues(initialValues);
|
|
52
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, defaultValues || initialValues);
|
|
53
|
+
}, [defaultValues, props]);
|
|
54
|
+
const onClickSubmit = useCallback(() => {
|
|
55
|
+
var _a;
|
|
56
|
+
(_a = props.onSubmit) == null ? void 0 : _a.call(props, values);
|
|
57
|
+
}, [props, values]);
|
|
58
|
+
return /* @__PURE__ */ jsx(Card, { style: { width: "100%" }, children: /* @__PURE__ */ jsxs(Form.Root, { onSubmit: dummyFn, children: [
|
|
59
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "5", children: [
|
|
60
|
+
/* @__PURE__ */ jsxs(Form.Field, { name: "title", children: [
|
|
61
|
+
/* @__PURE__ */ jsx(Form.Label, { children: "\uC774\uBC88 \uCF54\uCE6D\uC758 \uBAA9\uD45C\uB294 \uC544\uB798\uC640 \uAC19\uC2B5\uB2C8\uB2E4" }),
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
TextField.Root,
|
|
64
|
+
{
|
|
65
|
+
error: Boolean(errors == null ? void 0 : errors.goal),
|
|
66
|
+
onChange: (e) => {
|
|
67
|
+
onChange({ goal: e.target.value });
|
|
68
|
+
},
|
|
69
|
+
placeholder: "\uC774\uBC88 \uCF54\uCE6D \uACFC\uC815\uC758 \uBAA9\uD45C\uB97C \uD55C \uBB38\uC7A5\uC73C\uB85C \uC801\uC5B4\uC8FC\uC138\uC694",
|
|
70
|
+
value: values.goal
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ jsx(Form.Message, { forceMatch: Boolean(errors == null ? void 0 : errors.goal), children: errors == null ? void 0 : errors.goal })
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ jsxs(Form.Field, { name: "effect", children: [
|
|
76
|
+
/* @__PURE__ */ jsx(Form.Label, { children: "\uAE30\uB300\uD6A8\uACFC" }),
|
|
77
|
+
/* @__PURE__ */ jsx(
|
|
78
|
+
TextArea,
|
|
79
|
+
{
|
|
80
|
+
error: Boolean(errors == null ? void 0 : errors.effect),
|
|
81
|
+
onChange: (e) => {
|
|
82
|
+
onChange({ effect: e.target.value });
|
|
83
|
+
},
|
|
84
|
+
placeholder: "\uC608\uC2DC : \uD300\uC6D0\uB4E4\uACFC \uB354 \uCE5C\uBC00\uD574\uC9C0\uACE0, \uD300\uC6D0\uB4E4\uC5D0 \uB300\uD55C \uC774\uD574\uB3C4\uAC00 \uC313\uC774\uBA70 \uB354 \uD6A8\uC728\uC801\uC778 \uC778\uC7AC\uAD00\uB9AC\uB97C \uC704\uD55C \uAD00\uACC4\uD615\uC131\uC774 \uAC00\uB2A5\uD574\uC9D1\uB2C8\uB2E4.",
|
|
85
|
+
resize: "vertical",
|
|
86
|
+
value: values.effect
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ jsx(Form.Message, { forceMatch: Boolean(errors == null ? void 0 : errors.effect), children: errors == null ? void 0 : errors.effect })
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ jsxs(Form.Field, { name: "huddle", children: [
|
|
92
|
+
/* @__PURE__ */ jsx(Form.Label, { children: "\uBC29\uD574\uC694\uC18C" }),
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
TextArea,
|
|
95
|
+
{
|
|
96
|
+
error: Boolean(errors == null ? void 0 : errors.huddle),
|
|
97
|
+
onChange: (e) => {
|
|
98
|
+
onChange({ huddle: e.target.value });
|
|
99
|
+
},
|
|
100
|
+
placeholder: `- \uAC11\uC790\uAE30 \uC7A1\uD788\uB294 \uBBF8\uD305\uB4E4
|
|
101
|
+
- MZ \uC138\uB300\uC640\uC758 \uC790\uC5F0\uC2A4\uB7FD\uC9C0 \uC54A\uC740 \uC18C\uD1B5
|
|
102
|
+
- \uB300\uD654\uC5D0\uC11C \uCC38\uC744\uC131 \uBD80\uC871`,
|
|
103
|
+
resize: "vertical",
|
|
104
|
+
value: values.huddle
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ jsx(Form.Message, { forceMatch: Boolean(errors == null ? void 0 : errors.huddle), children: errors == null ? void 0 : errors.huddle })
|
|
108
|
+
] }),
|
|
109
|
+
/* @__PURE__ */ jsxs(Form.Field, { name: "dueDate", children: [
|
|
110
|
+
/* @__PURE__ */ jsx(Form.Label, { children: "\uBAA9\uD45C \uB2EC\uC131 \uAE30\uD55C\uC740 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4" }),
|
|
111
|
+
/* @__PURE__ */ jsx(
|
|
112
|
+
DatePickerButton,
|
|
113
|
+
{
|
|
114
|
+
format: (v) => format(v, "yyyy\uB144 MM\uC6D4 dd\uC77C"),
|
|
115
|
+
onChange: (date) => {
|
|
116
|
+
date && onChange({ dueDate: date });
|
|
117
|
+
},
|
|
118
|
+
placeholder: "YYYY\uB144 MM\uC6D4 DD\uC77C",
|
|
119
|
+
selected: values.dueDate
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
/* @__PURE__ */ jsx(Form.Message, { forceMatch: Boolean(errors == null ? void 0 : errors.dueDate), children: errors == null ? void 0 : errors.dueDate })
|
|
123
|
+
] })
|
|
124
|
+
] }),
|
|
125
|
+
/* @__PURE__ */ jsxs(Flex, { gap: "3", justify: "end", width: "100%", children: [
|
|
126
|
+
/* @__PURE__ */ jsx(
|
|
127
|
+
Button,
|
|
128
|
+
{
|
|
129
|
+
color: "gray",
|
|
130
|
+
onClick: onClickInit,
|
|
131
|
+
size: "small",
|
|
132
|
+
type: "button",
|
|
133
|
+
variant: "outline",
|
|
134
|
+
children: "\uCD08\uAE30\uD654\uD558\uAE30"
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
/* @__PURE__ */ jsx(Button, { onClick: onClickSubmit, size: "small", type: "button", children: "\uC800\uC7A5\uD558\uAE30" })
|
|
138
|
+
] })
|
|
139
|
+
] }) });
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export {
|
|
143
|
+
GoalManageCardEdit
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=chunk-QZJHGU4X.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/goal-manage-card-edit.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { format } from 'date-fns';\nimport { Button, Card, Flex, Form, TextArea, TextField } from '../../atoms';\nimport { DatePickerButton } from '../../molecules';\n\ninterface Values {\n goal?: string;\n effect?: string;\n huddle?: string;\n dueDate?: Date;\n}\n\ninterface GoalManageCardEditProps {\n onChange?: (values: Partial<Values>) => void;\n defaultValues?: Values;\n errors?: { [key in keyof Values]: string };\n onSubmit?: (values: Values) => void;\n}\n\nconst initialValues: Values = {\n goal: '',\n effect: '',\n huddle: '',\n dueDate: undefined,\n};\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function -- dummy용 함수\nconst dummyFn = (): void => {};\n\nexport function GoalManageCardEdit(\n props: GoalManageCardEditProps\n): React.ReactNode {\n const { defaultValues, errors } = props;\n const [values, setValues] = useState(defaultValues || initialValues);\n\n const onChange = useCallback(\n (v: Partial<Values>) => {\n setValues((prev) => ({ ...prev, ...v }));\n props.onChange?.(v);\n },\n [props]\n );\n\n const onClickInit = useCallback(() => {\n setValues(initialValues);\n props.onChange?.(defaultValues || initialValues);\n }, [defaultValues, props]);\n\n const onClickSubmit = useCallback(() => {\n props.onSubmit?.(values);\n }, [props, values]);\n\n return (\n <Card style={{ width: '100%' }}>\n <Form.Root onSubmit={dummyFn}>\n <Flex direction=\"column\" gap=\"5\">\n <Form.Field name=\"title\">\n <Form.Label>이번 코칭의 목표는 아래와 같습니다</Form.Label>\n <TextField.Root\n error={Boolean(errors?.goal)}\n onChange={(e) => {\n onChange({ goal: e.target.value });\n }}\n placeholder=\"이번 코칭 과정의 목표를 한 문장으로 적어주세요\"\n value={values.goal}\n />\n <Form.Message forceMatch={Boolean(errors?.goal)}>\n {errors?.goal}\n </Form.Message>\n </Form.Field>\n\n <Form.Field name=\"effect\">\n <Form.Label>기대효과</Form.Label>\n <TextArea\n error={Boolean(errors?.effect)}\n onChange={(e) => {\n onChange({ effect: e.target.value });\n }}\n placeholder=\"예시 : 팀원들과 더 친밀해지고, 팀원들에 대한 이해도가 쌓이며 더 효율적인 인재관리를 위한 관계형성이 가능해집니다.\"\n resize=\"vertical\"\n value={values.effect}\n />\n <Form.Message forceMatch={Boolean(errors?.effect)}>\n {errors?.effect}\n </Form.Message>\n </Form.Field>\n\n <Form.Field name=\"huddle\">\n <Form.Label>방해요소</Form.Label>\n <TextArea\n error={Boolean(errors?.huddle)}\n onChange={(e) => {\n onChange({ huddle: e.target.value });\n }}\n placeholder={`- 갑자기 잡히는 미팅들\n- MZ 세대와의 자연스럽지 않은 소통\n- 대화에서 참을성 부족`}\n resize=\"vertical\"\n value={values.huddle}\n />\n <Form.Message forceMatch={Boolean(errors?.huddle)}>\n {errors?.huddle}\n </Form.Message>\n </Form.Field>\n\n <Form.Field name=\"dueDate\">\n <Form.Label>목표 달성 기한은 다음과 같습니다</Form.Label>\n <DatePickerButton\n format={(v) => format(v, 'yyyy년 MM월 dd일')}\n onChange={(date) => {\n date && onChange({ dueDate: date });\n }}\n placeholder=\"YYYY년 MM월 DD일\"\n selected={values.dueDate}\n />\n <Form.Message forceMatch={Boolean(errors?.dueDate)}>\n {errors?.dueDate}\n </Form.Message>\n </Form.Field>\n </Flex>\n\n <Flex gap=\"3\" justify=\"end\" width=\"100%\">\n <Button\n color=\"gray\"\n onClick={onClickInit}\n size=\"small\"\n type=\"button\"\n variant=\"outline\"\n >\n 초기화하기\n </Button>\n <Button onClick={onClickSubmit} size=\"small\" type=\"button\">\n 저장하기\n </Button>\n </Flex>\n </Form.Root>\n </Card>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,aAAa,gBAAgB;AAC7C,SAAS,cAAc;AAuDb,SACE,KADF;AArCV,IAAM,gBAAwB;AAAA,EAC5B,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AACX;AAGA,IAAM,UAAU,MAAY;AAAC;AAEtB,SAAS,mBACd,OACiB;AACjB,QAAM,EAAE,eAAe,OAAO,IAAI;AAClC,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,iBAAiB,aAAa;AAEnE,QAAM,WAAW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