@tipp/ui 2.3.14 → 2.3.16

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.
Files changed (271) hide show
  1. package/dist/app/index.cjs +182 -159
  2. package/dist/app/index.cjs.map +1 -1
  3. package/dist/app/index.js +100 -98
  4. package/dist/app/platform/coach-question-list.js +31 -31
  5. package/dist/app/platform/contents-card.js +31 -31
  6. package/dist/app/platform/curriculum-card.js +5 -5
  7. package/dist/app/platform/edit-coaching-time.cjs +39 -16
  8. package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
  9. package/dist/app/platform/edit-coaching-time.js +76 -74
  10. package/dist/app/platform/edit-service-type.cjs +41 -16
  11. package/dist/app/platform/edit-service-type.cjs.map +1 -1
  12. package/dist/app/platform/edit-service-type.js +77 -75
  13. package/dist/app/platform/goal-manage-card-edit.cjs +47 -22
  14. package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
  15. package/dist/app/platform/goal-manage-card-edit.js +76 -74
  16. package/dist/app/platform/goal-manage-card-read.js +31 -31
  17. package/dist/app/platform/on-offline-radio-card.cjs +45 -22
  18. package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
  19. package/dist/app/platform/on-offline-radio-card.js +76 -74
  20. package/dist/app/platform/report-card.js +31 -31
  21. package/dist/app/platform/reservation-card.cjs +58 -33
  22. package/dist/app/platform/reservation-card.cjs.map +1 -1
  23. package/dist/app/platform/reservation-card.js +77 -75
  24. package/dist/app/platform/session-card.cjs +78 -55
  25. package/dist/app/platform/session-card.cjs.map +1 -1
  26. package/dist/app/platform/session-card.js +79 -77
  27. package/dist/app/platform/session-review-simple-read.js +31 -31
  28. package/dist/app/platform/userInfos/coaching-customer-info/index.js +36 -36
  29. package/dist/app/platform/userInfos/coaching-customer-info/large.js +31 -31
  30. package/dist/app/platform/userInfos/coaching-customer-info/medium.js +31 -31
  31. package/dist/app/platform/userInfos/coaching-customer-info/small.js +31 -31
  32. package/dist/app/platform/userInfos/session-user-info-detail.js +31 -31
  33. package/dist/app/platform/userInfos/utils.js +30 -30
  34. package/dist/atoms/bullet-text.js +2 -2
  35. package/dist/atoms/dialog.js +2 -2
  36. package/dist/atoms/field-error-wrapper.js +2 -2
  37. package/dist/atoms/index.js +62 -62
  38. package/dist/atoms/list.js +2 -2
  39. package/dist/atoms/pagination.js +3 -3
  40. package/dist/chunk-2GTKMGHS.js +70 -0
  41. package/dist/chunk-2GTKMGHS.js.map +1 -0
  42. package/dist/chunk-2GWB6C4M.js +63 -0
  43. package/dist/chunk-2GWB6C4M.js.map +1 -0
  44. package/dist/chunk-2OVAPUSZ.js +218 -0
  45. package/dist/chunk-2OVAPUSZ.js.map +1 -0
  46. package/dist/chunk-33FHBMD2.js +89 -0
  47. package/dist/chunk-33FHBMD2.js.map +1 -0
  48. package/dist/chunk-3IDHQODC.js +99 -0
  49. package/dist/chunk-3IDHQODC.js.map +1 -0
  50. package/dist/chunk-3INEXJIV.js +37 -0
  51. package/dist/chunk-3INEXJIV.js.map +1 -0
  52. package/dist/chunk-3UOA73MU.js +196 -0
  53. package/dist/chunk-3UOA73MU.js.map +1 -0
  54. package/dist/chunk-4F2XOUIR.js +51 -0
  55. package/dist/chunk-4F2XOUIR.js.map +1 -0
  56. package/dist/chunk-4GDCXSDS.js +87 -0
  57. package/dist/chunk-4GDCXSDS.js.map +1 -0
  58. package/dist/chunk-52IAQ2FT.js +233 -0
  59. package/dist/chunk-52IAQ2FT.js.map +1 -0
  60. package/dist/chunk-54POQFUI.js +98 -0
  61. package/dist/chunk-54POQFUI.js.map +1 -0
  62. package/dist/chunk-5FBWB2W4.js +57 -0
  63. package/dist/chunk-5FBWB2W4.js.map +1 -0
  64. package/dist/chunk-5VPNBYFV.js +89 -0
  65. package/dist/chunk-5VPNBYFV.js.map +1 -0
  66. package/dist/chunk-6DAL2GRI.js +196 -0
  67. package/dist/chunk-6DAL2GRI.js.map +1 -0
  68. package/dist/chunk-6INLPCD5.js +30 -0
  69. package/dist/chunk-6INLPCD5.js.map +1 -0
  70. package/dist/chunk-6LJJRIWT.js +49 -0
  71. package/dist/chunk-6LJJRIWT.js.map +1 -0
  72. package/dist/chunk-6WT3VRAP.js +144 -0
  73. package/dist/chunk-6WT3VRAP.js.map +1 -0
  74. package/dist/chunk-7MB2G5XF.js +145 -0
  75. package/dist/chunk-7MB2G5XF.js.map +1 -0
  76. package/dist/chunk-7XUN3OQT.js +1 -0
  77. package/dist/chunk-7XUN3OQT.js.map +1 -0
  78. package/dist/chunk-A2DBM6WR.js +51 -0
  79. package/dist/chunk-A2DBM6WR.js.map +1 -0
  80. package/dist/chunk-AB5USZGJ.js +101 -0
  81. package/dist/chunk-AB5USZGJ.js.map +1 -0
  82. package/dist/chunk-AJWRR5KG.js +74 -0
  83. package/dist/chunk-AJWRR5KG.js.map +1 -0
  84. package/dist/chunk-ALFE4BOS.js +139 -0
  85. package/dist/chunk-ALFE4BOS.js.map +1 -0
  86. package/dist/chunk-AULDM6SL.js +89 -0
  87. package/dist/chunk-AULDM6SL.js.map +1 -0
  88. package/dist/chunk-BJLJNTF2.js +218 -0
  89. package/dist/chunk-BJLJNTF2.js.map +1 -0
  90. package/dist/chunk-CMFHPI3J.js +51 -0
  91. package/dist/chunk-CMFHPI3J.js.map +1 -0
  92. package/dist/chunk-DAZY7DRP.js +145 -0
  93. package/dist/chunk-DAZY7DRP.js.map +1 -0
  94. package/dist/chunk-DXD774YC.js +145 -0
  95. package/dist/chunk-DXD774YC.js.map +1 -0
  96. package/dist/chunk-EAMKUF7R.js +75 -0
  97. package/dist/chunk-EAMKUF7R.js.map +1 -0
  98. package/dist/chunk-EMNEV6EN.js +139 -0
  99. package/dist/chunk-EMNEV6EN.js.map +1 -0
  100. package/dist/chunk-ETKTERDA.js +51 -0
  101. package/dist/chunk-ETKTERDA.js.map +1 -0
  102. package/dist/chunk-FFAGYBAB.js +64 -0
  103. package/dist/chunk-FFAGYBAB.js.map +1 -0
  104. package/dist/chunk-FVNVGFTT.js +218 -0
  105. package/dist/chunk-FVNVGFTT.js.map +1 -0
  106. package/dist/chunk-FXQYWO4P.js +57 -0
  107. package/dist/chunk-FXQYWO4P.js.map +1 -0
  108. package/dist/chunk-G4DOK5DQ.js +64 -0
  109. package/dist/chunk-G4DOK5DQ.js.map +1 -0
  110. package/dist/chunk-G6ZTIOUH.js +54 -0
  111. package/dist/chunk-G6ZTIOUH.js.map +1 -0
  112. package/dist/chunk-GN7UAKYU.js +145 -0
  113. package/dist/chunk-GN7UAKYU.js.map +1 -0
  114. package/dist/chunk-GTB6HEJR.js +218 -0
  115. package/dist/chunk-GTB6HEJR.js.map +1 -0
  116. package/dist/chunk-JO5OXSQV.js +363 -0
  117. package/dist/chunk-JO5OXSQV.js.map +1 -0
  118. package/dist/chunk-JOUSZBPX.js +196 -0
  119. package/dist/chunk-JOUSZBPX.js.map +1 -0
  120. package/dist/chunk-JOXWMJKW.js +64 -0
  121. package/dist/chunk-JOXWMJKW.js.map +1 -0
  122. package/dist/chunk-JQU3CE4K.js +174 -0
  123. package/dist/chunk-JQU3CE4K.js.map +1 -0
  124. package/dist/chunk-K7NSOSIE.js +1 -0
  125. package/dist/chunk-K7NSOSIE.js.map +1 -0
  126. package/dist/chunk-KD3SPRXH.js +37 -0
  127. package/dist/chunk-KD3SPRXH.js.map +1 -0
  128. package/dist/chunk-KEKNMQJK.js +69 -0
  129. package/dist/chunk-KEKNMQJK.js.map +1 -0
  130. package/dist/chunk-KGPXD5VO.js +228 -0
  131. package/dist/chunk-KGPXD5VO.js.map +1 -0
  132. package/dist/chunk-KMNAZCXO.js +117 -0
  133. package/dist/chunk-KMNAZCXO.js.map +1 -0
  134. package/dist/chunk-KPE4JB42.js +218 -0
  135. package/dist/chunk-KPE4JB42.js.map +1 -0
  136. package/dist/chunk-MFAW7E6L.js +69 -0
  137. package/dist/chunk-MFAW7E6L.js.map +1 -0
  138. package/dist/chunk-MLOC57ZN.js +64 -0
  139. package/dist/chunk-MLOC57ZN.js.map +1 -0
  140. package/dist/chunk-MRW2RO32.js +163 -0
  141. package/dist/chunk-MRW2RO32.js.map +1 -0
  142. package/dist/chunk-MYELL2V2.js +63 -0
  143. package/dist/chunk-MYELL2V2.js.map +1 -0
  144. package/dist/chunk-N7WM36NN.js +64 -0
  145. package/dist/chunk-N7WM36NN.js.map +1 -0
  146. package/dist/chunk-NMOPWSEY.js +145 -0
  147. package/dist/chunk-NMOPWSEY.js.map +1 -0
  148. package/dist/chunk-NWCLGWD7.js +218 -0
  149. package/dist/chunk-NWCLGWD7.js.map +1 -0
  150. package/dist/chunk-ONUWABWT.js +169 -0
  151. package/dist/chunk-ONUWABWT.js.map +1 -0
  152. package/dist/chunk-PTCXWBAB.js +218 -0
  153. package/dist/chunk-PTCXWBAB.js.map +1 -0
  154. package/dist/chunk-PXSZVAKR.js +68 -0
  155. package/dist/chunk-PXSZVAKR.js.map +1 -0
  156. package/dist/chunk-PZXLZLQH.js +64 -0
  157. package/dist/chunk-PZXLZLQH.js.map +1 -0
  158. package/dist/chunk-QOA6EEKP.js +89 -0
  159. package/dist/chunk-QOA6EEKP.js.map +1 -0
  160. package/dist/chunk-R3VOZZ5O.js +63 -0
  161. package/dist/chunk-R3VOZZ5O.js.map +1 -0
  162. package/dist/chunk-S3ITGMDG.js +218 -0
  163. package/dist/chunk-S3ITGMDG.js.map +1 -0
  164. package/dist/chunk-SFYV52JB.js +151 -0
  165. package/dist/chunk-SFYV52JB.js.map +1 -0
  166. package/dist/chunk-SLV7LKTR.js +51 -0
  167. package/dist/chunk-SLV7LKTR.js.map +1 -0
  168. package/dist/chunk-TJQUUR4N.js +54 -0
  169. package/dist/chunk-TJQUUR4N.js.map +1 -0
  170. package/dist/chunk-TTVJOFG5.js +30 -0
  171. package/dist/chunk-TTVJOFG5.js.map +1 -0
  172. package/dist/chunk-TYQOHHL5.js +63 -0
  173. package/dist/chunk-TYQOHHL5.js.map +1 -0
  174. package/dist/chunk-VRY3HFX6.js +45 -0
  175. package/dist/chunk-VRY3HFX6.js.map +1 -0
  176. package/dist/chunk-WU6EJCDT.js +196 -0
  177. package/dist/chunk-WU6EJCDT.js.map +1 -0
  178. package/dist/chunk-X6YSDRES.js +165 -0
  179. package/dist/chunk-X6YSDRES.js.map +1 -0
  180. package/dist/chunk-XU2LW3CT.js +43 -0
  181. package/dist/chunk-XU2LW3CT.js.map +1 -0
  182. package/dist/chunk-XUTNPV7E.js +218 -0
  183. package/dist/chunk-XUTNPV7E.js.map +1 -0
  184. package/dist/chunk-YWEWWXKM.js +51 -0
  185. package/dist/chunk-YWEWWXKM.js.map +1 -0
  186. package/dist/chunk-YYWEFK4H.js +39 -0
  187. package/dist/chunk-YYWEFK4H.js.map +1 -0
  188. package/dist/chunk-Z5JV7JGZ.js +58 -0
  189. package/dist/chunk-Z5JV7JGZ.js.map +1 -0
  190. package/dist/chunk-ZMXFJ3AZ.js +196 -0
  191. package/dist/chunk-ZMXFJ3AZ.js.map +1 -0
  192. package/dist/chunk-ZP5VSS77.js +89 -0
  193. package/dist/chunk-ZP5VSS77.js.map +1 -0
  194. package/dist/context/index.js +5 -5
  195. package/dist/index.cjs +310 -248
  196. package/dist/index.cjs.map +1 -1
  197. package/dist/index.d.cts +2 -0
  198. package/dist/index.d.ts +2 -0
  199. package/dist/index.js +155 -145
  200. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +18 -18
  201. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.js +4 -4
  202. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +11 -11
  203. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.js +2 -2
  204. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-header.js +3 -3
  205. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-layout.js +2 -2
  206. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +6 -6
  207. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +5 -5
  208. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +5 -5
  209. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +5 -5
  210. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.js +4 -4
  211. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +21 -21
  212. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +6 -6
  213. package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.js +3 -3
  214. package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +23 -23
  215. package/dist/molecules/curriculumV2/CurriculumContents/index.js +26 -26
  216. package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.js +2 -2
  217. package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.js +4 -4
  218. package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +8 -8
  219. package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +6 -6
  220. package/dist/molecules/curriculumV2/curriculum-sub-nav.js +4 -4
  221. package/dist/molecules/curriculumV2/curriculum-v2-layout.js +2 -2
  222. package/dist/molecules/curriculumV2/index.js +34 -34
  223. package/dist/molecules/date-picker/date-picker-button.js +6 -6
  224. package/dist/molecules/date-picker/index.js +5 -5
  225. package/dist/molecules/description-json-render.cjs +722 -0
  226. package/dist/molecules/description-json-render.cjs.map +1 -0
  227. package/dist/molecules/description-json-render.d.cts +27 -0
  228. package/dist/molecules/description-json-render.d.ts +27 -0
  229. package/dist/molecules/description-json-render.js +30 -0
  230. package/dist/molecules/description-json-render.js.map +1 -0
  231. package/dist/molecules/download-card.js +2 -2
  232. package/dist/molecules/dynamic-field.cjs +71 -68
  233. package/dist/molecules/dynamic-field.cjs.map +1 -1
  234. package/dist/molecules/dynamic-field.js +6 -5
  235. package/dist/molecules/dynamic-form.cjs +32 -29
  236. package/dist/molecules/dynamic-form.cjs.map +1 -1
  237. package/dist/molecules/dynamic-form.js +7 -6
  238. package/dist/molecules/expand-table/index.js +5 -5
  239. package/dist/molecules/force-refresh.js +2 -2
  240. package/dist/molecules/ghost-post.js +4 -4
  241. package/dist/molecules/index.cjs +67 -9
  242. package/dist/molecules/index.cjs.map +1 -1
  243. package/dist/molecules/index.d.cts +1 -0
  244. package/dist/molecules/index.d.ts +1 -0
  245. package/dist/molecules/index.js +76 -71
  246. package/dist/molecules/learning-post.js +6 -6
  247. package/dist/molecules/navigation.js +3 -3
  248. package/dist/molecules/one-on-one-guide-list.js +3 -3
  249. package/dist/molecules/stepper.js +4 -4
  250. package/dist/molecules/tag-selector.js +5 -5
  251. package/dist/molecules/time-select.cjs +519 -5
  252. package/dist/molecules/time-select.cjs.map +1 -1
  253. package/dist/molecules/time-select.js +18 -2
  254. package/dist/utils/getCalloutIconComponent.cjs +580 -0
  255. package/dist/utils/getCalloutIconComponent.cjs.map +1 -0
  256. package/dist/utils/getCalloutIconComponent.d.cts +11 -0
  257. package/dist/utils/getCalloutIconComponent.d.ts +11 -0
  258. package/dist/utils/getCalloutIconComponent.js +25 -0
  259. package/dist/utils/getCalloutIconComponent.js.map +1 -0
  260. package/dist/utils/index.cjs +535 -0
  261. package/dist/utils/index.cjs.map +1 -1
  262. package/dist/utils/index.d.cts +2 -0
  263. package/dist/utils/index.d.ts +2 -0
  264. package/dist/utils/index.js +24 -3
  265. package/package.json +3 -3
  266. package/src/molecules/description-json-render.tsx +85 -0
  267. package/src/molecules/dynamic-field.tsx +11 -9
  268. package/src/molecules/dynamic-form.tsx +1 -1
  269. package/src/molecules/index.ts +2 -1
  270. package/src/utils/getCalloutIconComponent.ts +39 -0
  271. package/src/utils/index.ts +1 -0
@@ -0,0 +1,51 @@
1
+ import {
2
+ getCalloutIconComponent
3
+ } from "./chunk-3INEXJIV.js";
4
+ import {
5
+ List
6
+ } from "./chunk-JIJLOKVN.js";
7
+ import {
8
+ Box
9
+ } from "./chunk-4Y5BEXVN.js";
10
+ import {
11
+ Typo
12
+ } from "./chunk-PMJIFLDT.js";
13
+ import {
14
+ Callout
15
+ } from "./chunk-B6XJN6EC.js";
16
+
17
+ // src/molecules/description-json-render.tsx
18
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
19
+ function DescriptionJsonRender(props) {
20
+ const { value } = props;
21
+ return /* @__PURE__ */ jsx(Fragment, { children: value.values.map((block, index) => {
22
+ if (block.type === "bullet-list") {
23
+ return (
24
+ // eslint-disable-next-line react/no-array-index-key -- 블록 타입과 인덱스를 키로 사용
25
+ /* @__PURE__ */ jsx(Box, { mb: "2", pl: "4", children: /* @__PURE__ */ jsx(List.Root, { preSpace: "small", children: block.value.map((v, i) => (
26
+ // eslint-disable-next-line react/no-array-index-key -- 블록 타입과 인덱스를 키로 사용
27
+ /* @__PURE__ */ jsx(List.Item, { children: v }, `${index}-${i}`)
28
+ )) }) }, `${block.type}-${index}`)
29
+ );
30
+ }
31
+ if (block.type === "callout") {
32
+ const Icon = getCalloutIconComponent(block.icon);
33
+ return (
34
+ // eslint-disable-next-line react/no-array-index-key -- 블록 타입과 인덱스를 키로 사용
35
+ /* @__PURE__ */ jsx(Box, { mb: "2", children: /* @__PURE__ */ jsxs(Callout.Root, { children: [
36
+ /* @__PURE__ */ jsx(Callout.Icon, { children: /* @__PURE__ */ jsx(Icon, {}) }),
37
+ /* @__PURE__ */ jsx(Callout.Text, { children: block.value })
38
+ ] }) }, `${block.type}-${index}`)
39
+ );
40
+ }
41
+ return (
42
+ // eslint-disable-next-line react/no-array-index-key -- 블록 타입과 인덱스를 키로 사용
43
+ /* @__PURE__ */ jsx(Typo, { mb: "2", weight: "regular", children: block.value }, `${block.type}-${index}`)
44
+ );
45
+ }) });
46
+ }
47
+
48
+ export {
49
+ DescriptionJsonRender
50
+ };
51
+ //# sourceMappingURL=chunk-A2DBM6WR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/molecules/description-json-render.tsx"],"sourcesContent":["import React from 'react';\nimport { Box } from '@/atoms/box';\nimport { Callout } from '@/atoms/call-out';\nimport { List } from '@/atoms/list';\nimport { Typo } from '@/atoms/typo';\nimport { getCalloutIconComponent } from '@/utils/getCalloutIconComponent';\n\nexport type DescriptionBlockType = 'callout' | 'typo' | 'bullet-list';\n\nexport interface DescriptionCalloutBlock {\n type: 'callout';\n icon: string;\n value: string;\n}\n\nexport interface DescriptionTypoBlock {\n type: 'typo';\n value: string;\n}\n\nexport interface DescriptionBulletListBlock {\n type: 'bullet-list';\n value: string[];\n}\n\nexport type DescriptionBlock =\n | DescriptionCalloutBlock\n | DescriptionTypoBlock\n | DescriptionBulletListBlock;\n\nexport interface Description {\n version: number;\n values: DescriptionBlock[];\n}\n\nexport interface DescriptionJsonRenderProps {\n value: Description;\n}\n\nexport function DescriptionJsonRender(\n props: DescriptionJsonRenderProps\n): React.ReactElement {\n const { value } = props;\n return (\n <>\n {value.values.map((block, index) => {\n if (block.type === 'bullet-list') {\n return (\n // eslint-disable-next-line react/no-array-index-key -- 블록 타입과 인덱스를 키로 사용\n <Box key={`${block.type}-${index}`} mb=\"2\" pl=\"4\">\n <List.Root preSpace=\"small\">\n {block.value.map((v, i) => (\n // eslint-disable-next-line react/no-array-index-key -- 블록 타입과 인덱스를 키로 사용\n <List.Item key={`${index}-${i}`}>{v}</List.Item>\n ))}\n </List.Root>\n </Box>\n );\n }\n\n if (block.type === 'callout') {\n const Icon = getCalloutIconComponent(block.icon);\n return (\n // eslint-disable-next-line react/no-array-index-key -- 블록 타입과 인덱스를 키로 사용\n <Box key={`${block.type}-${index}`} mb=\"2\">\n <Callout.Root>\n <Callout.Icon>\n <Icon />\n </Callout.Icon>\n <Callout.Text>{block.value}</Callout.Text>\n </Callout.Root>\n </Box>\n );\n }\n\n return (\n // eslint-disable-next-line react/no-array-index-key -- 블록 타입과 인덱스를 키로 사용\n <Typo key={`${block.type}-${index}`} mb=\"2\" weight=\"regular\">\n {block.value}\n </Typo>\n );\n })}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA4CI,mBASc,KAYJ,YArBV;AALG,SAAS,sBACd,OACoB;AACpB,QAAM,EAAE,MAAM,IAAI;AAClB,SACE,gCACG,gBAAM,OAAO,IAAI,CAAC,OAAO,UAAU;AAClC,QAAI,MAAM,SAAS,eAAe;AAChC;AAAA;AAAA,QAEE,oBAAC,OAAmC,IAAG,KAAI,IAAG,KAC5C,8BAAC,KAAK,MAAL,EAAU,UAAS,SACjB,gBAAM,MAAM,IAAI,CAAC,GAAG;AAAA;AAAA,UAEnB,oBAAC,KAAK,MAAL,EAAiC,eAAlB,GAAG,KAAK,IAAI,CAAC,EAAO;AAAA,SACrC,GACH,KANQ,GAAG,MAAM,IAAI,IAAI,KAAK,EAOhC;AAAA;AAAA,IAEJ;AAEA,QAAI,MAAM,SAAS,WAAW;AAC5B,YAAM,OAAO,wBAAwB,MAAM,IAAI;AAC/C;AAAA;AAAA,QAEE,oBAAC,OAAmC,IAAG,KACrC,+BAAC,QAAQ,MAAR,EACC;AAAA,8BAAC,QAAQ,MAAR,EACC,8BAAC,QAAK,GACR;AAAA,UACA,oBAAC,QAAQ,MAAR,EAAc,gBAAM,OAAM;AAAA,WAC7B,KANQ,GAAG,MAAM,IAAI,IAAI,KAAK,EAOhC;AAAA;AAAA,IAEJ;AAEA;AAAA;AAAA,MAEE,oBAAC,QAAoC,IAAG,KAAI,QAAO,WAChD,gBAAM,SADE,GAAG,MAAM,IAAI,IAAI,KAAK,EAEjC;AAAA;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
@@ -0,0 +1,101 @@
1
+ import {
2
+ ReviewQuestionContentHeader
3
+ } from "./chunk-XU2LW3CT.js";
4
+ import {
5
+ RadioButtonCard
6
+ } from "./chunk-CSKNBWPB.js";
7
+ import {
8
+ Grid
9
+ } from "./chunk-EGEQY3KT.js";
10
+ import {
11
+ Card
12
+ } from "./chunk-RP2RGCAW.js";
13
+ import {
14
+ Box
15
+ } from "./chunk-4Y5BEXVN.js";
16
+ import {
17
+ Flex
18
+ } from "./chunk-25HMMI7R.js";
19
+ import {
20
+ Button
21
+ } from "./chunk-ZVDAEY5Q.js";
22
+ import {
23
+ Typo
24
+ } from "./chunk-PMJIFLDT.js";
25
+
26
+ // src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.tsx
27
+ import { useCallback, useMemo, useState } from "react";
28
+ import { jsx, jsxs } from "react/jsx-runtime";
29
+ var correctAnswerStyle = {
30
+ backgroundColor: "var(--green-a2)"
31
+ };
32
+ function ReviewQuestionRadio(props) {
33
+ const { question, answer, onChange } = props;
34
+ const [isCheckAnswer, setIsCheckAnswer] = useState(false);
35
+ const checkAnswer = useCallback(() => {
36
+ setIsCheckAnswer(true);
37
+ }, []);
38
+ const isCorrect = isCheckAnswer && Number(answer) === question.correctAnswer;
39
+ const isWrong = isCheckAnswer && Number(answer) !== question.correctAnswer;
40
+ const radioColor = useMemo(() => {
41
+ if (isCorrect) return "green";
42
+ if (isWrong) return "red";
43
+ return void 0;
44
+ }, [isCorrect, isWrong]);
45
+ return /* @__PURE__ */ jsxs(Grid, { height: "100%", rows: "auto 1fr", width: "100%", children: [
46
+ /* @__PURE__ */ jsx(Card, { mb: "4", size: "2", children: /* @__PURE__ */ jsx(
47
+ ReviewQuestionContentHeader,
48
+ {
49
+ icon: question.icon,
50
+ question: question.question,
51
+ title: question.title,
52
+ type: question.type
53
+ }
54
+ ) }),
55
+ /* @__PURE__ */ jsxs(Grid, { height: "100%", rows: "1fr auto", width: "100%", children: [
56
+ /* @__PURE__ */ jsx(Box, { position: "relative", children: /* @__PURE__ */ jsx(
57
+ RadioButtonCard.Root,
58
+ {
59
+ color: radioColor,
60
+ onValueChange: onChange,
61
+ style: {
62
+ width: "100%",
63
+ height: "100%",
64
+ overflowY: "auto",
65
+ position: "absolute"
66
+ },
67
+ value: answer,
68
+ children: /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "2", width: "100%", children: question.options.map((option, i) => {
69
+ const isThisOptionCorrect = isCheckAnswer && i === question.correctAnswer;
70
+ const isThisOptionSelected = isCheckAnswer && i === Number(answer);
71
+ const isThisOptionWrong = isCheckAnswer && isThisOptionSelected && i !== question.correctAnswer;
72
+ const style = (() => {
73
+ if (isThisOptionCorrect) return correctAnswerStyle;
74
+ return {};
75
+ })();
76
+ return /* @__PURE__ */ jsx(
77
+ RadioButtonCard.Item,
78
+ {
79
+ style,
80
+ value: i.toString(),
81
+ children: /* @__PURE__ */ jsxs(Box, { children: [
82
+ /* @__PURE__ */ jsx(Typo, { as: "p", children: option.label }),
83
+ isThisOptionCorrect ? /* @__PURE__ */ jsx(Typo, { color: "green", children: "\uC815\uB2F5\uC785\uB2C8\uB2E4" }) : null,
84
+ isThisOptionWrong ? /* @__PURE__ */ jsx(Typo, { color: "red", children: "\uC815\uB2F5\uC774 \uC544\uB2D9\uB2C8\uB2E4" }) : null
85
+ ] })
86
+ },
87
+ `${option.label}-${i}`
88
+ );
89
+ }) })
90
+ }
91
+ ) }),
92
+ /* @__PURE__ */ jsx(Flex, { justify: "end", mt: "2", children: /* @__PURE__ */ jsx(Button, { onClick: checkAnswer, children: "\uC815\uB2F5 \uD655\uC778" }) })
93
+ ] })
94
+ ] });
95
+ }
96
+ var review_question_radio_default = ReviewQuestionRadio;
97
+
98
+ export {
99
+ review_question_radio_default
100
+ };
101
+ //# sourceMappingURL=chunk-AB5USZGJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { Box } from '@/atoms/box';\nimport { Button } from '@/atoms/button';\nimport { Card } from '@/atoms/card';\nimport { Flex } from '@/atoms/flex';\nimport { Grid } from '@/atoms/grid';\nimport { Typo } from '@/atoms/typo';\nimport { type CurriculumReviewQuestionRadio } from '@/types/curriculumContents.type'; \nimport { RadioButtonCard } from \"../../../../radio-button-card\";\nimport { ReviewQuestionContentHeader } from './review-comp';\n\ninterface ReviewQuestionRadioProps {\n question: CurriculumReviewQuestionRadio;\n answer: string;\n error?: string;\n onChange: (value: string) => void;\n}\n\nconst correctAnswerStyle: React.CSSProperties = {\n backgroundColor: 'var(--green-a2)',\n};\n\nfunction ReviewQuestionRadio(props: ReviewQuestionRadioProps): React.ReactNode {\n const { question, answer, onChange } = props;\n const [isCheckAnswer, setIsCheckAnswer] = useState(false);\n\n const checkAnswer = useCallback(() => {\n setIsCheckAnswer(true);\n }, []);\n\n const isCorrect = isCheckAnswer && Number(answer) === question.correctAnswer;\n const isWrong = isCheckAnswer && Number(answer) !== question.correctAnswer;\n const radioColor = useMemo(() => {\n if (isCorrect) return 'green';\n if (isWrong) return 'red';\n return undefined;\n }, [isCorrect, isWrong]);\n\n return (\n <Grid height=\"100%\" rows=\"auto 1fr\" width=\"100%\">\n <Card mb=\"4\" size=\"2\">\n <ReviewQuestionContentHeader\n icon={question.icon}\n question={question.question}\n title={question.title}\n type={question.type}\n />\n </Card>\n\n <Grid height=\"100%\" rows=\"1fr auto\" width=\"100%\">\n <Box position=\"relative\">\n <RadioButtonCard.Root\n color={radioColor}\n onValueChange={onChange}\n style={{\n width: '100%',\n height: '100%',\n overflowY: 'auto',\n position: 'absolute',\n }}\n value={answer}\n >\n <Flex direction=\"column\" gap=\"2\" width=\"100%\">\n {question.options.map((option, i) => {\n const isThisOptionCorrect =\n isCheckAnswer && i === question.correctAnswer;\n const isThisOptionSelected =\n isCheckAnswer && i === Number(answer);\n const isThisOptionWrong =\n isCheckAnswer &&\n isThisOptionSelected &&\n i !== question.correctAnswer;\n const style = (() => {\n if (isThisOptionCorrect) return correctAnswerStyle;\n return {};\n })();\n\n return (\n <RadioButtonCard.Item\n // eslint-disable-next-line react/no-array-index-key -- 조합 키로 중복 회피\n key={`${option.label}-${i}`}\n style={style}\n value={i.toString()}\n >\n <Box>\n <Typo as=\"p\">{option.label}</Typo>\n {isThisOptionCorrect ? (\n <Typo color=\"green\">정답입니다</Typo>\n ) : null}\n {isThisOptionWrong ? (\n <Typo color=\"red\">정답이 아닙니다</Typo>\n ) : null}\n </Box>\n </RadioButtonCard.Item>\n );\n })}\n </Flex>\n </RadioButtonCard.Root>\n </Box>\n <Flex justify=\"end\" mt=\"2\">\n <Button onClick={checkAnswer}>정답 확인</Button>\n </Flex>\n </Grid>\n </Grid>\n );\n}\n\nexport default ReviewQuestionRadio;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,aAAa,SAAS,gBAAgB;AAyC9C,cA2CY,YA3CZ;AAvBR,IAAM,qBAA0C;AAAA,EAC9C,iBAAiB;AACnB;AAEA,SAAS,oBAAoB,OAAkD;AAC7E,QAAM,EAAE,UAAU,QAAQ,SAAS,IAAI;AACvC,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAS,KAAK;AAExD,QAAM,cAAc,YAAY,MAAM;AACpC,qBAAiB,IAAI;AAAA,EACvB,GAAG,CAAC,CAAC;AAEL,QAAM,YAAY,iBAAiB,OAAO,MAAM,MAAM,SAAS;AAC/D,QAAM,UAAU,iBAAiB,OAAO,MAAM,MAAM,SAAS;AAC7D,QAAM,aAAa,QAAQ,MAAM;AAC/B,QAAI,UAAW,QAAO;AACtB,QAAI,QAAS,QAAO;AACpB,WAAO;AAAA,EACT,GAAG,CAAC,WAAW,OAAO,CAAC;AAEvB,SACE,qBAAC,QAAK,QAAO,QAAO,MAAK,YAAW,OAAM,QACxC;AAAA,wBAAC,QAAK,IAAG,KAAI,MAAK,KAChB;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,SAAS;AAAA,QACf,UAAU,SAAS;AAAA,QACnB,OAAO,SAAS;AAAA,QAChB,MAAM,SAAS;AAAA;AAAA,IACjB,GACF;AAAA,IAEA,qBAAC,QAAK,QAAO,QAAO,MAAK,YAAW,OAAM,QACxC;AAAA,0BAAC,OAAI,UAAS,YACZ;AAAA,QAAC,gBAAgB;AAAA,QAAhB;AAAA,UACC,OAAO;AAAA,UACP,eAAe;AAAA,UACf,OAAO;AAAA,YACL,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,WAAW;AAAA,YACX,UAAU;AAAA,UACZ;AAAA,UACA,OAAO;AAAA,UAEP,8BAAC,QAAK,WAAU,UAAS,KAAI,KAAI,OAAM,QACpC,mBAAS,QAAQ,IAAI,CAAC,QAAQ,MAAM;AACnC,kBAAM,sBACJ,iBAAiB,MAAM,SAAS;AAClC,kBAAM,uBACJ,iBAAiB,MAAM,OAAO,MAAM;AACtC,kBAAM,oBACJ,iBACA,wBACA,MAAM,SAAS;AACjB,kBAAM,SAAS,MAAM;AACnB,kBAAI,oBAAqB,QAAO;AAChC,qBAAO,CAAC;AAAA,YACV,GAAG;AAEH,mBACE;AAAA,cAAC,gBAAgB;AAAA,cAAhB;AAAA,gBAGC;AAAA,gBACA,OAAO,EAAE,SAAS;AAAA,gBAElB,+BAAC,OACC;AAAA,sCAAC,QAAK,IAAG,KAAK,iBAAO,OAAM;AAAA,kBAC1B,sBACC,oBAAC,QAAK,OAAM,SAAQ,4CAAK,IACvB;AAAA,kBACH,oBACC,oBAAC,QAAK,OAAM,OAAM,yDAAQ,IACxB;AAAA,mBACN;AAAA;AAAA,cAZK,GAAG,OAAO,KAAK,IAAI,CAAC;AAAA,YAa3B;AAAA,UAEJ,CAAC,GACH;AAAA;AAAA,MACF,GACF;AAAA,MACA,oBAAC,QAAK,SAAQ,OAAM,IAAG,KACrB,8BAAC,UAAO,SAAS,aAAa,uCAAK,GACrC;AAAA,OACF;AAAA,KACF;AAEJ;AAEA,IAAO,gCAAQ;","names":[]}
@@ -0,0 +1,74 @@
1
+ import {
2
+ infoList,
3
+ renderDataListItem,
4
+ renderItem,
5
+ sessionList
6
+ } from "./chunk-JWAQUXGB.js";
7
+ import {
8
+ Separator
9
+ } from "./chunk-HYITAA4J.js";
10
+ import {
11
+ Grid
12
+ } from "./chunk-EGEQY3KT.js";
13
+ import {
14
+ DataList
15
+ } from "./chunk-VTJZMOSP.js";
16
+ import {
17
+ Card
18
+ } from "./chunk-RP2RGCAW.js";
19
+ import {
20
+ Box
21
+ } from "./chunk-4Y5BEXVN.js";
22
+ import {
23
+ Flex
24
+ } from "./chunk-25HMMI7R.js";
25
+ import {
26
+ Heading
27
+ } from "./chunk-BESTU2AY.js";
28
+ import {
29
+ Typo
30
+ } from "./chunk-PMJIFLDT.js";
31
+
32
+ // src/app/platform/userInfos/coaching-customer-info/medium.tsx
33
+ import { jsx, jsxs } from "react/jsx-runtime";
34
+ function CoachingCustomerInfoMedium({
35
+ customer,
36
+ session,
37
+ children,
38
+ badge,
39
+ onClickCopy
40
+ }) {
41
+ return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "5", children: [
42
+ /* @__PURE__ */ jsxs(Box, { children: [
43
+ /* @__PURE__ */ jsxs(Flex, { align: "center", justify: "between", mb: "1", width: "100%", children: [
44
+ /* @__PURE__ */ jsx(Heading, { variant: "heading2", children: (customer == null ? void 0 : customer.username) || "\uC774\uB984 \uC5C6\uC74C" }),
45
+ badge
46
+ ] }),
47
+ /* @__PURE__ */ jsx(Heading, { truncate: true, variant: "heading4", weight: "regular", children: customer == null ? void 0 : customer.company })
48
+ ] }),
49
+ children,
50
+ /* @__PURE__ */ jsx(Card, { size: "2", children: /* @__PURE__ */ jsx(DataList.Root, { orientation: "vertical", children: sessionList.map(
51
+ (el) => renderDataListItem({
52
+ info: el,
53
+ data: session,
54
+ onClickCopy
55
+ })
56
+ ) }) }),
57
+ /* @__PURE__ */ jsxs(Grid, { align: "center", columns: "auto 1fr", gap: "3", children: [
58
+ /* @__PURE__ */ jsx(Heading, { variant: "heading5", children: "\uACE0\uAC1D \uC815\uBCF4" }),
59
+ /* @__PURE__ */ jsx(Separator, { size: "4" })
60
+ ] }),
61
+ /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "4", children: infoList.map((el) => {
62
+ return /* @__PURE__ */ jsx(Typo, { children: renderItem({
63
+ info: el,
64
+ data: customer,
65
+ onClickCopy
66
+ }) }, el.label);
67
+ }) })
68
+ ] });
69
+ }
70
+
71
+ export {
72
+ CoachingCustomerInfoMedium
73
+ };
74
+ //# sourceMappingURL=chunk-AJWRR5KG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/app/platform/userInfos/coaching-customer-info/medium.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Box,\n Card,\n DataList,\n Flex,\n Grid,\n Heading,\n Separator,\n Typo,\n} from '../../../../atoms';\nimport type { CoachingCustomerInfoProps } from '../utils';\nimport {\n infoList,\n renderDataListItem,\n renderItem,\n sessionList,\n} from '../utils';\n\nexport function CoachingCustomerInfoMedium({\n customer,\n session,\n children,\n badge,\n onClickCopy,\n}: CoachingCustomerInfoProps): React.ReactNode {\n return (\n <Flex direction=\"column\" gap=\"5\">\n {/* 이름, 사명 */}\n <Box>\n <Flex align=\"center\" justify=\"between\" mb=\"1\" width=\"100%\">\n <Heading variant=\"heading2\">\n {customer?.username || '이름 없음'}\n </Heading>\n {badge}\n </Flex>\n <Heading truncate variant=\"heading4\" weight=\"regular\">\n {customer?.company}\n </Heading>\n </Box>\n\n {children}\n\n {/* 세션 정보 */}\n <Card size=\"2\">\n <DataList.Root orientation=\"vertical\">\n {sessionList.map((el) =>\n renderDataListItem({\n info: el,\n data: session,\n onClickCopy,\n })\n )}\n </DataList.Root>\n </Card>\n\n {/* 회원 정보 */}\n <Grid align=\"center\" columns=\"auto 1fr\" gap=\"3\">\n <Heading variant=\"heading5\">고객 정보</Heading>\n <Separator size=\"4\" />\n </Grid>\n <Flex direction=\"column\" gap=\"4\">\n {infoList.map((el) => {\n return (\n <Typo key={el.label}>\n {renderItem({\n info: el,\n data: customer,\n onClickCopy,\n })}\n </Typo>\n );\n })}\n </Flex>\n </Flex>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BQ,SACE,KADF;AAXD,SAAS,2BAA2B;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA+C;AAC7C,SACE,qBAAC,QAAK,WAAU,UAAS,KAAI,KAE3B;AAAA,yBAAC,OACC;AAAA,2BAAC,QAAK,OAAM,UAAS,SAAQ,WAAU,IAAG,KAAI,OAAM,QAClD;AAAA,4BAAC,WAAQ,SAAQ,YACd,gDAAU,aAAY,6BACzB;AAAA,QACC;AAAA,SACH;AAAA,MACA,oBAAC,WAAQ,UAAQ,MAAC,SAAQ,YAAW,QAAO,WACzC,+CAAU,SACb;AAAA,OACF;AAAA,IAEC;AAAA,IAGD,oBAAC,QAAK,MAAK,KACT,8BAAC,SAAS,MAAT,EAAc,aAAY,YACxB,sBAAY;AAAA,MAAI,CAAC,OAChB,mBAAmB;AAAA,QACjB,MAAM;AAAA,QACN,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,IACH,GACF,GACF;AAAA,IAGA,qBAAC,QAAK,OAAM,UAAS,SAAQ,YAAW,KAAI,KAC1C;AAAA,0BAAC,WAAQ,SAAQ,YAAW,uCAAK;AAAA,MACjC,oBAAC,aAAU,MAAK,KAAI;AAAA,OACtB;AAAA,IACA,oBAAC,QAAK,WAAU,UAAS,KAAI,KAC1B,mBAAS,IAAI,CAAC,OAAO;AACpB,aACE,oBAAC,QACE,qBAAW;AAAA,QACV,MAAM;AAAA,QACN,MAAM;AAAA,QACN;AAAA,MACF,CAAC,KALQ,GAAG,KAMd;AAAA,IAEJ,CAAC,GACH;AAAA,KACF;AAEJ;","names":[]}
@@ -0,0 +1,139 @@
1
+ import {
2
+ TextArea
3
+ } from "./chunk-5XYPLDI5.js";
4
+ import {
5
+ TextField
6
+ } from "./chunk-6NPTJBFE.js";
7
+ import {
8
+ Select
9
+ } from "./chunk-X2GMDZ7M.js";
10
+ import {
11
+ RadioGroup
12
+ } from "./chunk-6DJOIRMF.js";
13
+ import {
14
+ CheckboxGroup
15
+ } from "./chunk-W7X7KSJP.js";
16
+ import {
17
+ Checkbox
18
+ } from "./chunk-VYCYVN3L.js";
19
+ import {
20
+ useDynamicForm
21
+ } from "./chunk-NCSMSA3X.js";
22
+ import {
23
+ __spreadProps,
24
+ __spreadValues
25
+ } from "./chunk-CRTRMMJ7.js";
26
+
27
+ // src/molecules/dynamic-field.tsx
28
+ import { jsx, jsxs } from "react/jsx-runtime";
29
+ function DynamicFormField({
30
+ field
31
+ }) {
32
+ const {
33
+ getFieldValue,
34
+ getFieldError,
35
+ getFieldTouched,
36
+ setFieldValue,
37
+ handleChange,
38
+ handleBlur,
39
+ readonly
40
+ } = useDynamicForm();
41
+ const { name, type } = field;
42
+ const value = getFieldValue(name);
43
+ const error = getFieldError(name);
44
+ const touched = getFieldTouched(name);
45
+ const hasError = Boolean(error && touched);
46
+ const commonProps = {
47
+ name,
48
+ value: String(value || ""),
49
+ onChange: readonly ? void 0 : handleChange,
50
+ onBlur: readonly ? void 0 : handleBlur,
51
+ error: hasError,
52
+ disabled: readonly
53
+ };
54
+ switch (type) {
55
+ case "short_text":
56
+ case "email":
57
+ return /* @__PURE__ */ jsx(
58
+ TextField.Root,
59
+ __spreadProps(__spreadValues({}, commonProps), {
60
+ placeholder: field.placeholder,
61
+ type: type === "short_text" ? "text" : type
62
+ })
63
+ );
64
+ case "number":
65
+ return /* @__PURE__ */ jsx(
66
+ TextField.Root,
67
+ __spreadProps(__spreadValues({}, commonProps), {
68
+ inputMode: "numeric",
69
+ pattern: "[0-9]*",
70
+ placeholder: field.placeholder,
71
+ type: "number"
72
+ })
73
+ );
74
+ case "long_text":
75
+ return /* @__PURE__ */ jsx(TextArea, __spreadProps(__spreadValues({}, commonProps), { placeholder: field.placeholder, rows: 4 }));
76
+ case "dropdown":
77
+ return /* @__PURE__ */ jsxs(
78
+ Select.Root,
79
+ {
80
+ onValueChange: readonly ? void 0 : (newValue) => {
81
+ void setFieldValue(name, newValue);
82
+ },
83
+ value,
84
+ disabled: readonly,
85
+ children: [
86
+ /* @__PURE__ */ jsx(Select.Trigger, { placeholder: field.placeholder }),
87
+ /* @__PURE__ */ jsx(Select.Content, { children: field.options.map((option) => /* @__PURE__ */ jsx(Select.Item, { value: String(option.value), children: option.label }, option.value)) })
88
+ ]
89
+ }
90
+ );
91
+ case "choice":
92
+ return /* @__PURE__ */ jsx(
93
+ RadioGroup.Root,
94
+ {
95
+ onValueChange: readonly ? void 0 : (newValue) => {
96
+ void setFieldValue(name, newValue);
97
+ },
98
+ orientation: field.orientation,
99
+ value: String(value || ""),
100
+ disabled: readonly,
101
+ children: field.options.map((option) => /* @__PURE__ */ jsx(RadioGroup.Item, { value: String(option.value), children: option.label }, option.value))
102
+ }
103
+ );
104
+ case "choices":
105
+ return /* @__PURE__ */ jsx(
106
+ CheckboxGroup.Root,
107
+ {
108
+ onValueChange: readonly ? void 0 : (newValue) => {
109
+ void setFieldValue(name, newValue);
110
+ },
111
+ orientation: field.orientation,
112
+ value: Array.isArray(value) ? value.map(String) : [],
113
+ disabled: readonly,
114
+ children: field.options.map((option) => /* @__PURE__ */ jsx(CheckboxGroup.Item, { value: String(option.value), children: option.label }, option.value))
115
+ }
116
+ );
117
+ case "yes_no":
118
+ return /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "8px" }, children: [
119
+ /* @__PURE__ */ jsx(
120
+ Checkbox,
121
+ {
122
+ checked: Boolean(value),
123
+ onCheckedChange: readonly ? void 0 : (checked) => {
124
+ void setFieldValue(name, checked);
125
+ },
126
+ disabled: readonly
127
+ }
128
+ ),
129
+ field.description ? /* @__PURE__ */ jsx("div", { style: { fontSize: "14px", color: "#666", lineHeight: "1.4" }, children: field.description }) : null
130
+ ] });
131
+ default:
132
+ return null;
133
+ }
134
+ }
135
+
136
+ export {
137
+ DynamicFormField
138
+ };
139
+ //# sourceMappingURL=chunk-ALFE4BOS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/molecules/dynamic-field.tsx"],"sourcesContent":["\nimport { useDynamicForm } from '../context/dynamic-form-context';\nimport { TextField } from '../atoms/text-field';\nimport { TextArea } from '../atoms/text-area';\nimport { Select } from '../atoms/select';\nimport { CheckboxGroup } from '../atoms/check-box-group';\nimport { RadioGroup } from '../atoms/radio-group';\nimport { Checkbox } from '../atoms/check-box';\nimport type { DynamicFormFieldSchema } from '../types/dynamic-form-schema-generated';\n\ninterface DynamicFormFieldRendererProps {\n field: DynamicFormFieldSchema;\n}\n\nexport function DynamicFormField({\n field,\n}: DynamicFormFieldRendererProps): React.ReactElement | null {\n const {\n getFieldValue,\n getFieldError,\n getFieldTouched,\n setFieldValue,\n handleChange,\n handleBlur,\n readonly,\n } = useDynamicForm();\n const { name, type } = field;\n\n const value = getFieldValue(name);\n const error = getFieldError(name);\n const touched = getFieldTouched(name);\n const hasError = Boolean(error && touched);\n\n const commonProps = {\n name,\n value: String(value || ''),\n onChange: readonly ? undefined : handleChange,\n onBlur: readonly ? undefined : handleBlur,\n error: hasError,\n disabled: readonly,\n };\n\n switch (type) {\n case 'short_text':\n case 'email':\n return (\n <TextField.Root \n {...commonProps} \n placeholder={field.placeholder}\n type={type === 'short_text' ? 'text' : type}\n />\n );\n case 'number':\n return (\n <TextField.Root\n {...commonProps}\n inputMode=\"numeric\"\n pattern=\"[0-9]*\"\n placeholder={field.placeholder}\n type=\"number\"\n />\n );\n case 'long_text':\n return <TextArea {...commonProps} placeholder={field.placeholder} rows={4} />;\n\n case 'dropdown':\n return (\n <Select.Root\n onValueChange={readonly ? undefined : (newValue: string) => {\n void setFieldValue(name, newValue);\n }}\n value={value as string}\n disabled={readonly}\n >\n <Select.Trigger placeholder={field.placeholder} />\n <Select.Content>\n {field.options.map((option) => (\n <Select.Item key={option.value} value={String(option.value)}>\n {option.label}\n </Select.Item>\n ))}\n </Select.Content>\n </Select.Root>\n );\n\n case 'choice':\n return (\n <RadioGroup.Root\n onValueChange={readonly ? undefined : (newValue: string) => {\n void setFieldValue(name, newValue);\n }}\n orientation={field.orientation}\n value={String(value || '')}\n disabled={readonly}\n >\n {field.options.map((option) => (\n <RadioGroup.Item key={option.value} value={String(option.value)}>\n {option.label}\n </RadioGroup.Item>\n ))}\n </RadioGroup.Root>\n );\n\n case 'choices':\n return (\n <CheckboxGroup.Root\n onValueChange={readonly ? undefined : (newValue: string[]) => {\n void setFieldValue(name, newValue);\n }}\n orientation={field.orientation}\n value={Array.isArray(value) ? value.map(String) : []}\n disabled={readonly}\n >\n {field.options.map((option) => (\n <CheckboxGroup.Item key={option.value} value={String(option.value)}>\n {option.label}\n </CheckboxGroup.Item>\n ))}\n </CheckboxGroup.Root>\n );\n\n case 'yes_no':\n return (\n <div style={{ display: 'flex', alignItems: 'flex-start', gap: '8px' }}>\n <Checkbox\n checked={Boolean(value)}\n onCheckedChange={readonly ? undefined : (checked: boolean) => {\n void setFieldValue(name, checked);\n }}\n disabled={readonly}\n />\n {field.description ? (\n <div style={{ fontSize: '14px', color: '#666', lineHeight: '1.4' }}>\n {field.description}\n </div>\n ) : null}\n </div>\n );\n\n default:\n return null;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CQ,cAqBA,YArBA;AAhCD,SAAS,iBAAiB;AAAA,EAC/B;AACF,GAA6D;AAC3D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,eAAe;AACnB,QAAM,EAAE,MAAM,KAAK,IAAI;AAEvB,QAAM,QAAQ,cAAc,IAAI;AAChC,QAAM,QAAQ,cAAc,IAAI;AAChC,QAAM,UAAU,gBAAgB,IAAI;AACpC,QAAM,WAAW,QAAQ,SAAS,OAAO;AAEzC,QAAM,cAAc;AAAA,IAClB;AAAA,IACA,OAAO,OAAO,SAAS,EAAE;AAAA,IACzB,UAAU,WAAW,SAAY;AAAA,IACjC,QAAQ,WAAW,SAAY;AAAA,IAC/B,OAAO;AAAA,IACP,UAAU;AAAA,EACZ;AAEA,UAAQ,MAAM;AAAA,IACZ,KAAK;AAAA,IACL,KAAK;AACH,aACE;AAAA,QAAC,UAAU;AAAA,QAAV,iCACK,cADL;AAAA,UAEC,aAAa,MAAM;AAAA,UACnB,MAAM,SAAS,eAAe,SAAS;AAAA;AAAA,MACzC;AAAA,IAEJ,KAAK;AACH,aACE;AAAA,QAAC,UAAU;AAAA,QAAV,iCACK,cADL;AAAA,UAEC,WAAU;AAAA,UACV,SAAQ;AAAA,UACR,aAAa,MAAM;AAAA,UACnB,MAAK;AAAA;AAAA,MACP;AAAA,IAEJ,KAAK;AACH,aAAO,oBAAC,2CAAa,cAAb,EAA0B,aAAa,MAAM,aAAa,MAAM,IAAG;AAAA,IAE7E,KAAK;AACH,aACE;AAAA,QAAC,OAAO;AAAA,QAAP;AAAA,UACC,eAAe,WAAW,SAAY,CAAC,aAAqB;AAC1D,iBAAK,cAAc,MAAM,QAAQ;AAAA,UACnC;AAAA,UACA;AAAA,UACA,UAAU;AAAA,UAEV;AAAA,gCAAC,OAAO,SAAP,EAAe,aAAa,MAAM,aAAa;AAAA,YAChD,oBAAC,OAAO,SAAP,EACE,gBAAM,QAAQ,IAAI,CAAC,WAClB,oBAAC,OAAO,MAAP,EAA+B,OAAO,OAAO,OAAO,KAAK,GACvD,iBAAO,SADQ,OAAO,KAEzB,CACD,GACH;AAAA;AAAA;AAAA,MACF;AAAA,IAGJ,KAAK;AACH,aACE;AAAA,QAAC,WAAW;AAAA,QAAX;AAAA,UACC,eAAe,WAAW,SAAY,CAAC,aAAqB;AAC1D,iBAAK,cAAc,MAAM,QAAQ;AAAA,UACnC;AAAA,UACA,aAAa,MAAM;AAAA,UACnB,OAAO,OAAO,SAAS,EAAE;AAAA,UACzB,UAAU;AAAA,UAET,gBAAM,QAAQ,IAAI,CAAC,WAClB,oBAAC,WAAW,MAAX,EAAmC,OAAO,OAAO,OAAO,KAAK,GAC3D,iBAAO,SADY,OAAO,KAE7B,CACD;AAAA;AAAA,MACH;AAAA,IAGJ,KAAK;AACH,aACE;AAAA,QAAC,cAAc;AAAA,QAAd;AAAA,UACC,eAAe,WAAW,SAAY,CAAC,aAAuB;AAC5D,iBAAK,cAAc,MAAM,QAAQ;AAAA,UACnC;AAAA,UACA,aAAa,MAAM;AAAA,UACnB,OAAO,MAAM,QAAQ,KAAK,IAAI,MAAM,IAAI,MAAM,IAAI,CAAC;AAAA,UACnD,UAAU;AAAA,UAET,gBAAM,QAAQ,IAAI,CAAC,WAClB,oBAAC,cAAc,MAAd,EAAsC,OAAO,OAAO,OAAO,KAAK,GAC9D,iBAAO,SADe,OAAO,KAEhC,CACD;AAAA;AAAA,MACH;AAAA,IAGJ,KAAK;AACH,aACE,qBAAC,SAAI,OAAO,EAAE,SAAS,QAAQ,YAAY,cAAc,KAAK,MAAM,GAClE;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,SAAS,QAAQ,KAAK;AAAA,YACtB,iBAAiB,WAAW,SAAY,CAAC,YAAqB;AAC5D,mBAAK,cAAc,MAAM,OAAO;AAAA,YAClC;AAAA,YACA,UAAU;AAAA;AAAA,QACZ;AAAA,QACC,MAAM,cACL,oBAAC,SAAI,OAAO,EAAE,UAAU,QAAQ,OAAO,QAAQ,YAAY,MAAM,GAC9D,gBAAM,aACT,IACE;AAAA,SACN;AAAA,IAGJ;AACE,aAAO;AAAA,EACX;AACF;","names":[]}
@@ -0,0 +1,89 @@
1
+ import {
2
+ start_review_default
3
+ } from "./chunk-KXCFAFL3.js";
4
+ import {
5
+ ReviewQuestion_default
6
+ } from "./chunk-SW3F2AU5.js";
7
+ import {
8
+ complete_review_default
9
+ } from "./chunk-W747CDDK.js";
10
+ import {
11
+ CurriculumReviewProvider,
12
+ useCurriculumReviewContext
13
+ } from "./chunk-GMKRNFH5.js";
14
+
15
+ // src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.tsx
16
+ import { jsx } from "react/jsx-runtime";
17
+ function CurriculumReviewStepsInner() {
18
+ const {
19
+ formik,
20
+ step,
21
+ handleStart,
22
+ handleNext,
23
+ handlePrev,
24
+ onClickReviewMyAnswer,
25
+ handleSubmit,
26
+ currentQuestion,
27
+ currentAnswer,
28
+ currentError,
29
+ reviewContents,
30
+ handleAnswerChange
31
+ } = useCurriculumReviewContext();
32
+ const { questions } = reviewContents;
33
+ if (step === 0) {
34
+ return /* @__PURE__ */ jsx(start_review_default, { onStart: handleStart });
35
+ }
36
+ if (step > 0 && step <= questions.length && currentQuestion) {
37
+ return /* @__PURE__ */ jsx(
38
+ ReviewQuestion_default,
39
+ {
40
+ answer: currentAnswer,
41
+ error: currentError,
42
+ index: step - 1,
43
+ isLast: step === questions.length,
44
+ isLoading: formik.isSubmitting,
45
+ isNextDisabled: currentError !== void 0,
46
+ onChange: handleAnswerChange,
47
+ onNext: handleNext,
48
+ onPrev: handlePrev,
49
+ onSubmit: handleSubmit,
50
+ question: currentQuestion,
51
+ total: questions.length
52
+ }
53
+ );
54
+ }
55
+ return /* @__PURE__ */ jsx(complete_review_default, { onClickReviewMyAnswer });
56
+ }
57
+ function CurriculumReviewSteps({
58
+ contents,
59
+ title,
60
+ onClickEndReview,
61
+ onSubmit,
62
+ defaultValues,
63
+ curriculum,
64
+ onReviewValueChange,
65
+ mode,
66
+ done
67
+ }) {
68
+ return /* @__PURE__ */ jsx(
69
+ CurriculumReviewProvider,
70
+ {
71
+ curriculum,
72
+ defaultValues,
73
+ done,
74
+ mode,
75
+ onClickEndReview,
76
+ onReviewValueChange,
77
+ onSubmit,
78
+ reviewContents: contents,
79
+ sectionTitle: title,
80
+ children: /* @__PURE__ */ jsx(CurriculumReviewStepsInner, {})
81
+ }
82
+ );
83
+ }
84
+ var CurriculumReviewSteps_default = CurriculumReviewSteps;
85
+
86
+ export {
87
+ CurriculumReviewSteps_default
88
+ };
89
+ //# sourceMappingURL=chunk-AULDM6SL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.tsx"],"sourcesContent":["import React from 'react';\nimport { type CurriculumReviewContents } from '@/types/curriculumContents.type';\nimport type { Curriculum } from '@/types'; \nimport {\n CurriculumReviewProvider,\n useCurriculumReviewContext,\n} from './curriculum-review-context';\nimport StartReview from './start-review';\nimport CompleteReview from './complete-review';\nimport ReviewQuestion from './ReviewQuestion';\n \nfunction CurriculumReviewStepsInner(): React.ReactNode {\n const {\n formik,\n step,\n handleStart,\n handleNext,\n handlePrev,\n onClickReviewMyAnswer,\n handleSubmit,\n currentQuestion,\n currentAnswer,\n currentError,\n reviewContents,\n handleAnswerChange,\n } = useCurriculumReviewContext();\n const { questions } = reviewContents;\n\n if (step === 0) {\n return <StartReview onStart={handleStart} />;\n }\n if (step > 0 && step <= questions.length && currentQuestion) {\n return (\n <ReviewQuestion\n answer={currentAnswer}\n error={currentError}\n index={step - 1}\n isLast={step === questions.length}\n isLoading={formik.isSubmitting}\n isNextDisabled={currentError !== undefined}\n onChange={handleAnswerChange}\n onNext={handleNext}\n onPrev={handlePrev}\n onSubmit={handleSubmit}\n question={currentQuestion}\n total={questions.length}\n />\n );\n }\n return <CompleteReview onClickReviewMyAnswer={onClickReviewMyAnswer} />;\n}\n\ninterface CurriculumReviewStepsProps {\n contents: CurriculumReviewContents;\n title: string | undefined;\n onClickEndReview: () => void;\n onSubmit: (values: Record<string, string>) => Promise<boolean>;\n defaultValues?: Record<string, string>;\n curriculum: Curriculum;\n onReviewValueChange: ({\n reviewId,\n answer,\n }: {\n reviewId: string;\n answer: Record<string, string>;\n }) => void;\n mode: 'edit' | 'create';\n done: boolean; \n}\n\nfunction CurriculumReviewSteps({\n contents,\n title,\n onClickEndReview,\n onSubmit,\n defaultValues,\n curriculum,\n onReviewValueChange,\n mode,\n done,\n}: CurriculumReviewStepsProps): React.ReactNode { \n\n return (\n <CurriculumReviewProvider\n curriculum={curriculum}\n defaultValues={defaultValues}\n done={done}\n mode={mode}\n onClickEndReview={onClickEndReview}\n onReviewValueChange={onReviewValueChange}\n onSubmit={onSubmit}\n reviewContents={contents}\n sectionTitle={title}\n >\n <CurriculumReviewStepsInner />\n </CurriculumReviewProvider>\n );\n}\n\nexport default CurriculumReviewSteps;\n"],"mappings":";;;;;;;;;;;;;;;AA6BW;AAlBX,SAAS,6BAA8C;AACrD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,2BAA2B;AAC/B,QAAM,EAAE,UAAU,IAAI;AAEtB,MAAI,SAAS,GAAG;AACd,WAAO,oBAAC,wBAAY,SAAS,aAAa;AAAA,EAC5C;AACA,MAAI,OAAO,KAAK,QAAQ,UAAU,UAAU,iBAAiB;AAC3D,WACE;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,OAAO,OAAO;AAAA,QACd,QAAQ,SAAS,UAAU;AAAA,QAC3B,WAAW,OAAO;AAAA,QAClB,gBAAgB,iBAAiB;AAAA,QACjC,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,UAAU;AAAA,QACV,UAAU;AAAA,QACV,OAAO,UAAU;AAAA;AAAA,IACnB;AAAA,EAEJ;AACA,SAAO,oBAAC,2BAAe,uBAA8C;AACvE;AAoBA,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAgD;AAE9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,gBAAgB;AAAA,MAChB,cAAc;AAAA,MAEd,8BAAC,8BAA2B;AAAA;AAAA,EAC9B;AAEJ;AAEA,IAAO,gCAAQ;","names":[]}