@tipp/ui 2.3.14 → 2.3.15

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 (151) 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 +98 -96
  4. package/dist/app/platform/coach-question-list.js +29 -29
  5. package/dist/app/platform/contents-card.js +29 -29
  6. package/dist/app/platform/curriculum-card.js +6 -6
  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 +74 -72
  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 +75 -73
  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 +74 -72
  16. package/dist/app/platform/goal-manage-card-read.js +29 -29
  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 +74 -72
  20. package/dist/app/platform/report-card.js +29 -29
  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 +75 -73
  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 +77 -75
  27. package/dist/app/platform/session-review-simple-read.js +29 -29
  28. package/dist/app/platform/userInfos/coaching-customer-info/index.js +34 -34
  29. package/dist/app/platform/userInfos/coaching-customer-info/large.js +29 -29
  30. package/dist/app/platform/userInfos/coaching-customer-info/medium.js +29 -29
  31. package/dist/app/platform/userInfos/coaching-customer-info/small.js +29 -29
  32. package/dist/app/platform/userInfos/session-user-info-detail.js +29 -29
  33. package/dist/app/platform/userInfos/utils.js +28 -28
  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-2GWB6C4M.js +63 -0
  41. package/dist/chunk-2GWB6C4M.js.map +1 -0
  42. package/dist/chunk-3INEXJIV.js +37 -0
  43. package/dist/chunk-3INEXJIV.js.map +1 -0
  44. package/dist/chunk-3UOA73MU.js +196 -0
  45. package/dist/chunk-3UOA73MU.js.map +1 -0
  46. package/dist/chunk-4F2XOUIR.js +51 -0
  47. package/dist/chunk-4F2XOUIR.js.map +1 -0
  48. package/dist/chunk-6DAL2GRI.js +196 -0
  49. package/dist/chunk-6DAL2GRI.js.map +1 -0
  50. package/dist/chunk-7XUN3OQT.js +1 -0
  51. package/dist/chunk-7XUN3OQT.js.map +1 -0
  52. package/dist/chunk-A2DBM6WR.js +51 -0
  53. package/dist/chunk-A2DBM6WR.js.map +1 -0
  54. package/dist/chunk-AULDM6SL.js +89 -0
  55. package/dist/chunk-AULDM6SL.js.map +1 -0
  56. package/dist/chunk-CMFHPI3J.js +51 -0
  57. package/dist/chunk-CMFHPI3J.js.map +1 -0
  58. package/dist/chunk-FFAGYBAB.js +64 -0
  59. package/dist/chunk-FFAGYBAB.js.map +1 -0
  60. package/dist/chunk-G6ZTIOUH.js +54 -0
  61. package/dist/chunk-G6ZTIOUH.js.map +1 -0
  62. package/dist/chunk-K7NSOSIE.js +1 -0
  63. package/dist/chunk-K7NSOSIE.js.map +1 -0
  64. package/dist/chunk-MFAW7E6L.js +69 -0
  65. package/dist/chunk-MFAW7E6L.js.map +1 -0
  66. package/dist/chunk-N7WM36NN.js +64 -0
  67. package/dist/chunk-N7WM36NN.js.map +1 -0
  68. package/dist/chunk-PZXLZLQH.js +64 -0
  69. package/dist/chunk-PZXLZLQH.js.map +1 -0
  70. package/dist/chunk-QOA6EEKP.js +89 -0
  71. package/dist/chunk-QOA6EEKP.js.map +1 -0
  72. package/dist/chunk-SLV7LKTR.js +51 -0
  73. package/dist/chunk-SLV7LKTR.js.map +1 -0
  74. package/dist/chunk-TTVJOFG5.js +30 -0
  75. package/dist/chunk-TTVJOFG5.js.map +1 -0
  76. package/dist/chunk-WU6EJCDT.js +196 -0
  77. package/dist/chunk-WU6EJCDT.js.map +1 -0
  78. package/dist/chunk-ZP5VSS77.js +89 -0
  79. package/dist/chunk-ZP5VSS77.js.map +1 -0
  80. package/dist/context/index.js +5 -5
  81. package/dist/index.cjs +301 -239
  82. package/dist/index.cjs.map +1 -1
  83. package/dist/index.d.cts +2 -0
  84. package/dist/index.d.ts +2 -0
  85. package/dist/index.js +164 -154
  86. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +16 -16
  87. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.js +4 -4
  88. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +9 -9
  89. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.js +2 -2
  90. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-header.js +3 -3
  91. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-layout.js +2 -2
  92. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +5 -5
  93. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +5 -5
  94. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +5 -5
  95. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +5 -5
  96. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.js +4 -4
  97. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +20 -20
  98. package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +6 -6
  99. package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.js +3 -3
  100. package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +22 -22
  101. package/dist/molecules/curriculumV2/CurriculumContents/index.js +25 -25
  102. package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.js +2 -2
  103. package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.js +4 -4
  104. package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +9 -9
  105. package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +6 -6
  106. package/dist/molecules/curriculumV2/curriculum-sub-nav.js +4 -4
  107. package/dist/molecules/curriculumV2/curriculum-v2-layout.js +2 -2
  108. package/dist/molecules/curriculumV2/index.js +37 -37
  109. package/dist/molecules/date-picker/date-picker-button.js +6 -6
  110. package/dist/molecules/date-picker/index.js +5 -5
  111. package/dist/molecules/description-json-render.cjs +722 -0
  112. package/dist/molecules/description-json-render.cjs.map +1 -0
  113. package/dist/molecules/description-json-render.d.cts +27 -0
  114. package/dist/molecules/description-json-render.d.ts +27 -0
  115. package/dist/molecules/description-json-render.js +30 -0
  116. package/dist/molecules/description-json-render.js.map +1 -0
  117. package/dist/molecules/download-card.js +2 -2
  118. package/dist/molecules/dynamic-field.js +4 -4
  119. package/dist/molecules/dynamic-form.js +5 -5
  120. package/dist/molecules/expand-table/index.js +4 -4
  121. package/dist/molecules/force-refresh.js +2 -2
  122. package/dist/molecules/ghost-post.js +4 -4
  123. package/dist/molecules/index.cjs +58 -0
  124. package/dist/molecules/index.cjs.map +1 -1
  125. package/dist/molecules/index.d.cts +1 -0
  126. package/dist/molecules/index.d.ts +1 -0
  127. package/dist/molecules/index.js +80 -75
  128. package/dist/molecules/learning-post.js +5 -5
  129. package/dist/molecules/navigation.js +3 -3
  130. package/dist/molecules/one-on-one-guide-list.js +3 -3
  131. package/dist/molecules/stepper.js +4 -4
  132. package/dist/molecules/tag-selector.js +5 -5
  133. package/dist/molecules/time-select.cjs +519 -5
  134. package/dist/molecules/time-select.cjs.map +1 -1
  135. package/dist/molecules/time-select.js +18 -2
  136. package/dist/utils/getCalloutIconComponent.cjs +580 -0
  137. package/dist/utils/getCalloutIconComponent.cjs.map +1 -0
  138. package/dist/utils/getCalloutIconComponent.d.cts +11 -0
  139. package/dist/utils/getCalloutIconComponent.d.ts +11 -0
  140. package/dist/utils/getCalloutIconComponent.js +25 -0
  141. package/dist/utils/getCalloutIconComponent.js.map +1 -0
  142. package/dist/utils/index.cjs +535 -0
  143. package/dist/utils/index.cjs.map +1 -1
  144. package/dist/utils/index.d.cts +2 -0
  145. package/dist/utils/index.d.ts +2 -0
  146. package/dist/utils/index.js +24 -3
  147. package/package.json +3 -3
  148. package/src/molecules/description-json-render.tsx +85 -0
  149. package/src/molecules/index.ts +2 -1
  150. package/src/utils/getCalloutIconComponent.ts +39 -0
  151. package/src/utils/index.ts +1 -0
@@ -1,8 +1,24 @@
1
1
  import "../chunk-HBF6IIVZ.js";
2
+ import {
3
+ Form,
4
+ FormItem
5
+ } from "../chunk-2OMSNCRH.js";
6
+ import {
7
+ TextArea
8
+ } from "../chunk-5XYPLDI5.js";
9
+ import {
10
+ TextField
11
+ } from "../chunk-6NPTJBFE.js";
2
12
  import {
3
13
  ToastContainer,
4
14
  toast
5
15
  } from "../chunk-EEKOTWBE.js";
16
+ import {
17
+ Select
18
+ } from "../chunk-X2GMDZ7M.js";
19
+ import {
20
+ Separator
21
+ } from "../chunk-HYITAA4J.js";
6
22
  import {
7
23
  Skeleton
8
24
  } from "../chunk-5H3YPCZK.js";
@@ -22,11 +38,11 @@ import {
22
38
  Tabs
23
39
  } from "../chunk-5ZITU5L7.js";
24
40
  import {
25
- TextArea
26
- } from "../chunk-5XYPLDI5.js";
41
+ Progress
42
+ } from "../chunk-365QMK4D.js";
27
43
  import {
28
- TextField
29
- } from "../chunk-6NPTJBFE.js";
44
+ Quote
45
+ } from "../chunk-YO3BQW6S.js";
30
46
  import {
31
47
  RadioCards
32
48
  } from "../chunk-6IVCARWS.js";
@@ -45,12 +61,6 @@ import {
45
61
  import {
46
62
  SegmentedControl
47
63
  } from "../chunk-TVDKGMBI.js";
48
- import {
49
- Select
50
- } from "../chunk-X2GMDZ7M.js";
51
- import {
52
- Separator
53
- } from "../chunk-HYITAA4J.js";
54
64
  import {
55
65
  Inset
56
66
  } from "../chunk-XQOL7UBI.js";
@@ -63,31 +73,41 @@ import {
63
73
  import {
64
74
  List,
65
75
  useList
66
- } from "../chunk-WV2HN6H4.js";
76
+ } from "../chunk-JIJLOKVN.js";
67
77
  import {
68
78
  Pagination
69
- } from "../chunk-SBJOKO35.js";
79
+ } from "../chunk-FG3WT6OL.js";
70
80
  import {
71
81
  Popover
72
82
  } from "../chunk-5AVBYDPB.js";
73
83
  import {
74
- Progress
75
- } from "../chunk-365QMK4D.js";
84
+ DropdownMenu
85
+ } from "../chunk-D4U2MCJG.js";
76
86
  import {
77
- Quote
78
- } from "../chunk-YO3BQW6S.js";
87
+ EllipsisTooltip
88
+ } from "../chunk-Y4U24VXI.js";
89
+ import {
90
+ Tooltip
91
+ } from "../chunk-3NUQAVE6.js";
92
+ import "../chunk-PT57HCAI.js";
79
93
  import {
80
94
  Em
81
95
  } from "../chunk-2DZ2Y3JI.js";
82
96
  import {
83
97
  FieldErrorWrapper
84
- } from "../chunk-VRJR534I.js";
98
+ } from "../chunk-ZOPYFDLO.js";
85
99
  import {
86
100
  Grid
87
101
  } from "../chunk-EGEQY3KT.js";
88
102
  import {
89
103
  HoverCard
90
104
  } from "../chunk-O3T3TM3V.js";
105
+ import {
106
+ CheckboxGroup
107
+ } from "../chunk-W7X7KSJP.js";
108
+ import {
109
+ Checkbox
110
+ } from "../chunk-VYCYVN3L.js";
91
111
  import {
92
112
  Code
93
113
  } from "../chunk-OHMOP5PV.js";
@@ -102,7 +122,10 @@ import {
102
122
  } from "../chunk-VTJZMOSP.js";
103
123
  import {
104
124
  Dialog
105
- } from "../chunk-JQ7VQ5SB.js";
125
+ } from "../chunk-AH4A53SZ.js";
126
+ import {
127
+ Heading
128
+ } from "../chunk-BESTU2AY.js";
106
129
  import {
107
130
  Content,
108
131
  Drawer,
@@ -116,17 +139,18 @@ import {
116
139
  } from "../chunk-XK6VEVOK.js";
117
140
  import "../chunk-HF6GNDPV.js";
118
141
  import {
119
- DropdownMenu
120
- } from "../chunk-D4U2MCJG.js";
121
- import {
122
- EllipsisTooltip
123
- } from "../chunk-Y4U24VXI.js";
142
+ Blockquote
143
+ } from "../chunk-YGL6SWKN.js";
124
144
  import {
125
- Tooltip
126
- } from "../chunk-3NUQAVE6.js";
145
+ Box
146
+ } from "../chunk-4Y5BEXVN.js";
127
147
  import {
128
148
  BulletText
129
- } from "../chunk-QRI6ARS6.js";
149
+ } from "../chunk-Z34HR7RE.js";
150
+ import {
151
+ Typo
152
+ } from "../chunk-PMJIFLDT.js";
153
+ import "../chunk-LDBWASUA.js";
130
154
  import {
131
155
  Flex
132
156
  } from "../chunk-25HMMI7R.js";
@@ -144,33 +168,6 @@ import {
144
168
  import {
145
169
  CheckboxCards
146
170
  } from "../chunk-MIMJ7LON.js";
147
- import {
148
- CheckboxGroup
149
- } from "../chunk-W7X7KSJP.js";
150
- import {
151
- Checkbox
152
- } from "../chunk-VYCYVN3L.js";
153
- import {
154
- AlertDialog
155
- } from "../chunk-J242TTFH.js";
156
- import {
157
- AspectRatio
158
- } from "../chunk-EAXUQEO5.js";
159
- import {
160
- AutoSizingInput
161
- } from "../chunk-6SYFG6YY.js";
162
- import {
163
- Avatar
164
- } from "../chunk-K36TPMKL.js";
165
- import {
166
- Badge
167
- } from "../chunk-U3BQT7ZO.js";
168
- import {
169
- Blockquote
170
- } from "../chunk-YGL6SWKN.js";
171
- import {
172
- Box
173
- } from "../chunk-4Y5BEXVN.js";
174
171
  import "../chunk-W5TPOFOO.js";
175
172
  import "../chunk-WJ34ZHTU.js";
176
173
  import "../chunk-ZQE7SP6P.js";
@@ -186,18 +183,21 @@ import "../chunk-YSYJCYHY.js";
186
183
  import "../chunk-5OM2H6RI.js";
187
184
  import "../chunk-ZUYCXCPW.js";
188
185
  import "../chunk-YVFNJE4E.js";
189
- import "../chunk-PT57HCAI.js";
190
186
  import {
191
- Form,
192
- FormItem
193
- } from "../chunk-2OMSNCRH.js";
187
+ AlertDialog
188
+ } from "../chunk-J242TTFH.js";
194
189
  import {
195
- Heading
196
- } from "../chunk-BESTU2AY.js";
190
+ AspectRatio
191
+ } from "../chunk-EAXUQEO5.js";
197
192
  import {
198
- Typo
199
- } from "../chunk-PMJIFLDT.js";
200
- import "../chunk-LDBWASUA.js";
193
+ AutoSizingInput
194
+ } from "../chunk-6SYFG6YY.js";
195
+ import {
196
+ Avatar
197
+ } from "../chunk-K36TPMKL.js";
198
+ import {
199
+ Badge
200
+ } from "../chunk-U3BQT7ZO.js";
201
201
  import "../chunk-CRTRMMJ7.js";
202
202
  export {
203
203
  AlertDialog,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  List,
3
3
  useList
4
- } from "../chunk-WV2HN6H4.js";
5
- import "../chunk-25HMMI7R.js";
4
+ } from "../chunk-JIJLOKVN.js";
6
5
  import "../chunk-PMJIFLDT.js";
7
6
  import "../chunk-LDBWASUA.js";
7
+ import "../chunk-25HMMI7R.js";
8
8
  import "../chunk-CRTRMMJ7.js";
9
9
  export {
10
10
  List,
@@ -1,8 +1,10 @@
1
1
  import {
2
2
  Pagination
3
- } from "../chunk-SBJOKO35.js";
3
+ } from "../chunk-FG3WT6OL.js";
4
4
  import "../chunk-XK6VEVOK.js";
5
5
  import "../chunk-HF6GNDPV.js";
6
+ import "../chunk-PMJIFLDT.js";
7
+ import "../chunk-LDBWASUA.js";
6
8
  import "../chunk-25HMMI7R.js";
7
9
  import "../chunk-W5TPOFOO.js";
8
10
  import "../chunk-WJ34ZHTU.js";
@@ -19,8 +21,6 @@ import "../chunk-YSYJCYHY.js";
19
21
  import "../chunk-5OM2H6RI.js";
20
22
  import "../chunk-ZUYCXCPW.js";
21
23
  import "../chunk-YVFNJE4E.js";
22
- import "../chunk-PMJIFLDT.js";
23
- import "../chunk-LDBWASUA.js";
24
24
  import "../chunk-CRTRMMJ7.js";
25
25
  export {
26
26
  Pagination
@@ -0,0 +1,63 @@
1
+ import {
2
+ review_question_layout_default
3
+ } from "./chunk-VK6INFSB.js";
4
+ import {
5
+ review_question_body_default
6
+ } from "./chunk-MFAW7E6L.js";
7
+ import {
8
+ review_question_footer_default
9
+ } from "./chunk-PLXD7ZKF.js";
10
+ import {
11
+ review_question_header_default
12
+ } from "./chunk-SAEPW5JF.js";
13
+
14
+ // src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.tsx
15
+ import { jsx } from "react/jsx-runtime";
16
+ function ReviewQuestion({
17
+ question,
18
+ index,
19
+ total,
20
+ answer,
21
+ error,
22
+ onChange,
23
+ onNext,
24
+ onPrev,
25
+ isLast,
26
+ isNextDisabled,
27
+ onSubmit,
28
+ isLoading
29
+ }) {
30
+ return /* @__PURE__ */ jsx(
31
+ review_question_layout_default,
32
+ {
33
+ Body: /* @__PURE__ */ jsx(
34
+ review_question_body_default,
35
+ {
36
+ answer,
37
+ error,
38
+ onChange,
39
+ question
40
+ }
41
+ ),
42
+ Footer: /* @__PURE__ */ jsx(
43
+ review_question_footer_default,
44
+ {
45
+ index,
46
+ isLast,
47
+ isLoading,
48
+ isNextButtonDisabled: isNextDisabled,
49
+ onNext,
50
+ onPrev,
51
+ onSubmit
52
+ }
53
+ ),
54
+ Header: /* @__PURE__ */ jsx(review_question_header_default, { index, total })
55
+ }
56
+ );
57
+ }
58
+ var ReviewQuestion_default = ReviewQuestion;
59
+
60
+ export {
61
+ ReviewQuestion_default
62
+ };
63
+ //# sourceMappingURL=chunk-2GWB6C4M.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.tsx"],"sourcesContent":["import React from 'react';\nimport type { ReviewQuestionElement } from '@/types/curriculum.type';\nimport ReviewQuestionLayout from './review-question-layout';\nimport ReviewQuestionHeader from './review-question-header';\nimport ReviewQuestionFooter from './review-question-footer';\nimport ReviewQuestionBody from './review-question-body';\n\ninterface ReviewQuestionProps {\n question: ReviewQuestionElement;\n index: number;\n total: number;\n answer: string;\n error?: string;\n onChange: (value: string) => void;\n onNext: () => void;\n onPrev: () => void;\n isLast: boolean;\n isNextDisabled?: boolean;\n onSubmit: () => void;\n isLoading?: boolean;\n}\n\nfunction ReviewQuestion({\n question,\n index,\n total,\n answer,\n error,\n onChange,\n onNext,\n onPrev,\n isLast,\n isNextDisabled,\n onSubmit,\n isLoading,\n}: ReviewQuestionProps): React.ReactElement {\n \n return (\n <ReviewQuestionLayout\n Body={\n <ReviewQuestionBody\n answer={answer}\n error={error}\n onChange={onChange}\n question={question}\n />\n }\n Footer={\n <ReviewQuestionFooter\n index={index}\n isLast={isLast}\n isLoading={isLoading}\n isNextButtonDisabled={isNextDisabled}\n onNext={onNext}\n onPrev={onPrev}\n onSubmit={onSubmit}\n />\n }\n Header={<ReviewQuestionHeader index={index} total={total} />}\n />\n );\n}\n\nexport default ReviewQuestion;\n"],"mappings":";;;;;;;;;;;;;;AAwCQ;AAlBR,SAAS,eAAe;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA4C;AAE1C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MACE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA;AAAA,MACF;AAAA,MAEF,QACE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA,sBAAsB;AAAA,UACtB;AAAA,UACA;AAAA,UACA;AAAA;AAAA,MACF;AAAA,MAEF,QAAQ,oBAAC,kCAAqB,OAAc,OAAc;AAAA;AAAA,EAC5D;AAEJ;AAEA,IAAO,yBAAQ;","names":[]}
@@ -0,0 +1,37 @@
1
+ import {
2
+ CheckCircledIcon,
3
+ ExclamationTriangleIcon,
4
+ InfoCircledIcon,
5
+ QuestionMarkCircledIcon
6
+ } from "./chunk-W5TPOFOO.js";
7
+
8
+ // src/utils/getCalloutIconComponent.ts
9
+ var DEFAULT_ICON = InfoCircledIcon;
10
+ var AI_CALLOUT_ICON_OPTIONS = [
11
+ { label: "Info", value: "InfoCircledIcon", Component: InfoCircledIcon },
12
+ {
13
+ label: "Warning",
14
+ value: "ExclamationTriangleIcon",
15
+ Component: ExclamationTriangleIcon
16
+ },
17
+ { label: "Check", value: "CheckCircledIcon", Component: CheckCircledIcon },
18
+ {
19
+ label: "Question",
20
+ value: "QuestionMarkCircledIcon",
21
+ Component: QuestionMarkCircledIcon
22
+ }
23
+ ];
24
+ var iconByName = {};
25
+ for (const opt of AI_CALLOUT_ICON_OPTIONS) {
26
+ iconByName[opt.value] = opt.Component;
27
+ }
28
+ function getCalloutIconComponent(iconName) {
29
+ var _a;
30
+ return (_a = iconByName[iconName]) != null ? _a : DEFAULT_ICON;
31
+ }
32
+
33
+ export {
34
+ AI_CALLOUT_ICON_OPTIONS,
35
+ getCalloutIconComponent
36
+ };
37
+ //# sourceMappingURL=chunk-3INEXJIV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/getCalloutIconComponent.ts"],"sourcesContent":["\nimport {\n InfoCircledIcon,\n ExclamationTriangleIcon,\n CheckCircledIcon,\n QuestionMarkCircledIcon,\n} from '@/icon';\n\ntype SvgIconComponent = typeof InfoCircledIcon;\n\nconst DEFAULT_ICON: SvgIconComponent = InfoCircledIcon;\n\nexport const AI_CALLOUT_ICON_OPTIONS: {\n label: string;\n value: string;\n Component: SvgIconComponent;\n}[] = [\n { label: 'Info', value: 'InfoCircledIcon', Component: InfoCircledIcon },\n {\n label: 'Warning',\n value: 'ExclamationTriangleIcon',\n Component: ExclamationTriangleIcon,\n },\n { label: 'Check', value: 'CheckCircledIcon', Component: CheckCircledIcon },\n {\n label: 'Question',\n value: 'QuestionMarkCircledIcon',\n Component: QuestionMarkCircledIcon,\n },\n];\n\nconst iconByName: Record<string, SvgIconComponent> = {};\nfor (const opt of AI_CALLOUT_ICON_OPTIONS) {\n iconByName[opt.value] = opt.Component;\n}\n\nexport function getCalloutIconComponent(iconName: string): SvgIconComponent {\n return iconByName[iconName] ?? DEFAULT_ICON;\n}\n"],"mappings":";;;;;;;;AAUA,IAAM,eAAiC;AAEhC,IAAM,0BAIP;AAAA,EACJ,EAAE,OAAO,QAAQ,OAAO,mBAAmB,WAAW,gBAAgB;AAAA,EACtE;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AAAA,EACA,EAAE,OAAO,SAAS,OAAO,oBAAoB,WAAW,iBAAiB;AAAA,EACzE;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AACF;AAEA,IAAM,aAA+C,CAAC;AACtD,WAAW,OAAO,yBAAyB;AACzC,aAAW,IAAI,KAAK,IAAI,IAAI;AAC9B;AAEO,SAAS,wBAAwB,UAAoC;AApC5E;AAqCE,UAAO,gBAAW,QAAQ,MAAnB,YAAwB;AACjC;","names":[]}
@@ -0,0 +1,196 @@
1
+ import {
2
+ CurriculumReviewSteps_default
3
+ } from "./chunk-ZP5VSS77.js";
4
+ import {
5
+ useCurriculumContext
6
+ } from "./chunk-ZFWZAZPG.js";
7
+ import {
8
+ Dialog
9
+ } from "./chunk-AH4A53SZ.js";
10
+ import {
11
+ IconButton
12
+ } from "./chunk-XK6VEVOK.js";
13
+ import {
14
+ Box
15
+ } from "./chunk-4Y5BEXVN.js";
16
+ import {
17
+ Typo
18
+ } from "./chunk-PMJIFLDT.js";
19
+ import {
20
+ Flex
21
+ } from "./chunk-25HMMI7R.js";
22
+ import {
23
+ Button
24
+ } from "./chunk-ZVDAEY5Q.js";
25
+ import {
26
+ __spreadValues
27
+ } from "./chunk-CRTRMMJ7.js";
28
+
29
+ // src/molecules/curriculumV2/CurriculumContents/curriculum-review.tsx
30
+ import { useCallback, useMemo, useState } from "react";
31
+ import { Cross1Icon } from "@radix-ui/react-icons";
32
+ import { jsx, jsxs } from "react/jsx-runtime";
33
+ function CurriculumReview(props) {
34
+ const { item, sectionTitle } = props;
35
+ const { description, buttonTitle } = item;
36
+ const {
37
+ curriculum,
38
+ onReviewSubmit: _onReviewSubmit,
39
+ onReviewValueChange: _onReviewValueChange,
40
+ curriculumReviewAnswers,
41
+ tempCurriculumReviewAnswers,
42
+ curriculumCompleteMap
43
+ } = useCurriculumContext();
44
+ const [open, setOpen] = useState(false);
45
+ const [isChanged, setIsChanged] = useState(false);
46
+ const [closeDialogOpen, setCloseDialogOpen] = useState(false);
47
+ const onReviewValueChange = useCallback(
48
+ ({
49
+ reviewId,
50
+ answer
51
+ }) => {
52
+ if (curriculumReviewAnswers[reviewId] === answer[reviewId]) {
53
+ return;
54
+ }
55
+ setIsChanged(true);
56
+ _onReviewValueChange({ reviewId, answer });
57
+ },
58
+ [_onReviewValueChange, curriculumReviewAnswers]
59
+ );
60
+ const onReviewSubmit = useCallback(
61
+ (values) => {
62
+ return _onReviewSubmit({ reviewId: item.uuid, answer: values }).then(
63
+ (result) => {
64
+ setIsChanged(false);
65
+ return result;
66
+ }
67
+ );
68
+ },
69
+ [item.uuid, _onReviewSubmit]
70
+ );
71
+ const onClickEndReview = useCallback(() => {
72
+ setOpen(false);
73
+ }, []);
74
+ const onClickCloseDrawer = useCallback(() => {
75
+ if (isChanged) {
76
+ setCloseDialogOpen(true);
77
+ } else {
78
+ setOpen(false);
79
+ }
80
+ }, [isChanged]);
81
+ const mode = useMemo(() => {
82
+ return item.questions.every(
83
+ (question) => curriculumReviewAnswers[question.uuid] && curriculumReviewAnswers[question.uuid] !== ""
84
+ ) ? "edit" : "create";
85
+ }, [curriculumReviewAnswers, item.questions]);
86
+ const defaultValues = useMemo(() => {
87
+ const allAnswers = __spreadValues(__spreadValues({}, tempCurriculumReviewAnswers), curriculumReviewAnswers);
88
+ return item.questions.reduce((acc, question) => {
89
+ acc[question.uuid] = allAnswers[question.uuid] || "";
90
+ return acc;
91
+ }, {});
92
+ }, [curriculumReviewAnswers, item.questions, tempCurriculumReviewAnswers]);
93
+ const done = useMemo(() => {
94
+ return Boolean(curriculumCompleteMap[item.uuid]);
95
+ }, [curriculumCompleteMap, item.uuid]);
96
+ const bgColor = done ? "var(--color-panel-solid)" : void 0;
97
+ return /* @__PURE__ */ jsxs(Dialog.Root, { onOpenChange: setOpen, open, children: [
98
+ /* @__PURE__ */ jsxs(
99
+ Flex,
100
+ {
101
+ align: "center",
102
+ direction: "column",
103
+ height: "100%",
104
+ justify: "center",
105
+ px: "3",
106
+ py: "3",
107
+ style: {
108
+ backgroundImage: `url(https://tipp-coaching-live.s3.ap-northeast-2.amazonaws.com/images/curriculum_review_bg.png)`,
109
+ backgroundPosition: "center",
110
+ backgroundSize: "cover",
111
+ backgroundRepeat: "no-repeat"
112
+ },
113
+ width: "100%",
114
+ children: [
115
+ /* @__PURE__ */ jsx(Typo, { color: "gray", weight: "bold", children: curriculum.title }),
116
+ /* @__PURE__ */ jsx(Typo, { align: "center", as: "p", color: "gray", children: description }),
117
+ /* @__PURE__ */ jsx(Dialog.Trigger, { children: /* @__PURE__ */ jsx(
118
+ Button,
119
+ {
120
+ mt: "3",
121
+ style: { minWidth: 232, backgroundColor: bgColor },
122
+ variant: done ? "outline" : "solid",
123
+ children: /* @__PURE__ */ jsx(Typo, { truncate: true, children: done ? "\uB098\uC758 \uC751\uB2F5 \uB2E4\uC2DC\uBCF4\uAE30" : buttonTitle })
124
+ }
125
+ ) })
126
+ ]
127
+ }
128
+ ),
129
+ /* @__PURE__ */ jsx(
130
+ Dialog.Content,
131
+ {
132
+ height: "100%",
133
+ hideCloseButton: true,
134
+ style: { borderRadius: 0, padding: 0 },
135
+ title: "",
136
+ width: "100%",
137
+ children: /* @__PURE__ */ jsxs(
138
+ Flex,
139
+ {
140
+ align: "center",
141
+ height: "100%",
142
+ justify: "center",
143
+ pb: "3",
144
+ position: "relative",
145
+ width: "100%",
146
+ children: [
147
+ /* @__PURE__ */ jsx(
148
+ CurriculumReviewSteps_default,
149
+ {
150
+ contents: item,
151
+ curriculum,
152
+ defaultValues,
153
+ done,
154
+ mode,
155
+ onClickEndReview,
156
+ onReviewValueChange,
157
+ onSubmit: onReviewSubmit,
158
+ title: sectionTitle
159
+ }
160
+ ),
161
+ /* @__PURE__ */ jsx(Box, { position: "absolute", right: "16px", top: "16px", children: /* @__PURE__ */ jsxs(
162
+ IconButton,
163
+ {
164
+ color: "gray",
165
+ onClick: onClickCloseDrawer,
166
+ variant: "ghost",
167
+ children: [
168
+ /* @__PURE__ */ jsx(Box, { display: { initial: "none", md: "block" }, children: /* @__PURE__ */ jsx(Cross1Icon, { height: 20, width: 20 }) }),
169
+ /* @__PURE__ */ jsx(Box, { display: { initial: "block", md: "none" }, children: /* @__PURE__ */ jsx(Cross1Icon, { height: 16, width: 16 }) })
170
+ ]
171
+ }
172
+ ) }),
173
+ /* @__PURE__ */ jsx(Dialog.Root, { onOpenChange: setCloseDialogOpen, open: closeDialogOpen, children: /* @__PURE__ */ jsx(
174
+ Dialog.Content,
175
+ {
176
+ buttons: /* @__PURE__ */ jsxs(Flex, { gap: "3", justify: "end", children: [
177
+ /* @__PURE__ */ jsx(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { color: "gray", variant: "outline", children: "\uB3CC\uC544\uAC00\uAE30" }) }),
178
+ /* @__PURE__ */ jsx(Dialog.Close, { children: /* @__PURE__ */ jsx(Button, { color: "red", onClick: onClickEndReview, children: "\uB098\uAC00\uAE30" }) })
179
+ ] }),
180
+ title: "\uC791\uC131\uC744 \uC911\uB2E8\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",
181
+ children: /* @__PURE__ */ jsx(Typo, { children: "\uD398\uC774\uC9C0\uC5D0\uC11C \uBC97\uC5B4\uB098\uBA74 \uC791\uC131\uD55C \uB0B4\uC6A9\uC774 \uC800\uC7A5\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." })
182
+ }
183
+ ) })
184
+ ]
185
+ }
186
+ )
187
+ }
188
+ )
189
+ ] });
190
+ }
191
+ var curriculum_review_default = CurriculumReview;
192
+
193
+ export {
194
+ curriculum_review_default
195
+ };
196
+ //# sourceMappingURL=chunk-3UOA73MU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/molecules/curriculumV2/CurriculumContents/curriculum-review.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { Box } from '@/atoms/box';\nimport { Button } from '@/atoms/button';\nimport { Dialog } from '@/atoms/dialog';\nimport { Flex } from '@/atoms/flex';\nimport { IconButton } from '@/atoms/icon-button';\nimport { Typo } from '@/atoms/typo';\nimport { type CurriculumReviewContents } from '@/types/curriculumContents.type';\nimport { useCurriculumContext } from '../curriculum-context';\nimport CurriculumReviewSteps from './CurriculumReviewSteps';\n\ninterface CurriculumReviewProps {\n item: CurriculumReviewContents;\n sectionTitle: string | undefined;\n}\n\nfunction CurriculumReview(props: CurriculumReviewProps): React.ReactNode {\n const { item, sectionTitle } = props;\n const { description, buttonTitle } = item;\n const {\n curriculum,\n onReviewSubmit: _onReviewSubmit,\n onReviewValueChange: _onReviewValueChange,\n curriculumReviewAnswers,\n tempCurriculumReviewAnswers,\n curriculumCompleteMap,\n } = useCurriculumContext();\n const [open, setOpen] = useState(false);\n const [isChanged, setIsChanged] = useState(false);\n const [closeDialogOpen, setCloseDialogOpen] = useState(false);\n\n const onReviewValueChange = useCallback(\n ({\n reviewId,\n answer,\n }: {\n reviewId: string;\n answer: Record<string, string>;\n }) => {\n if (curriculumReviewAnswers[reviewId] === answer[reviewId]) {\n return;\n }\n\n setIsChanged(true);\n _onReviewValueChange({ reviewId, answer });\n },\n [_onReviewValueChange, curriculumReviewAnswers]\n );\n\n const onReviewSubmit = useCallback(\n (values: Record<string, string>) => {\n return _onReviewSubmit({ reviewId: item.uuid, answer: values }).then(\n (result) => {\n setIsChanged(false);\n return result;\n }\n );\n },\n [item.uuid, _onReviewSubmit]\n );\n\n const onClickEndReview = useCallback(() => {\n setOpen(false);\n }, []);\n\n const onClickCloseDrawer = useCallback(() => {\n if (isChanged) {\n setCloseDialogOpen(true);\n } else {\n setOpen(false);\n }\n }, [isChanged]);\n\n const mode = useMemo(() => {\n return item.questions.every(\n (question) =>\n curriculumReviewAnswers[question.uuid] &&\n curriculumReviewAnswers[question.uuid] !== ''\n )\n ? 'edit'\n : 'create';\n }, [curriculumReviewAnswers, item.questions]);\n\n const defaultValues = useMemo(() => {\n const allAnswers = {\n ...tempCurriculumReviewAnswers,\n ...curriculumReviewAnswers,\n };\n\n return item.questions.reduce<Record<string, string>>((acc, question) => {\n acc[question.uuid] = allAnswers[question.uuid] || '';\n return acc;\n }, {});\n }, [curriculumReviewAnswers, item.questions, tempCurriculumReviewAnswers]);\n\n const done = useMemo(() => {\n return Boolean(curriculumCompleteMap[item.uuid]);\n }, [curriculumCompleteMap, item.uuid]);\n\n const bgColor = done ? 'var(--color-panel-solid)' : undefined;\n\n return (\n <Dialog.Root onOpenChange={setOpen} open={open}>\n <Flex\n align=\"center\"\n direction=\"column\"\n height=\"100%\"\n justify=\"center\"\n px=\"3\"\n py=\"3\"\n style={{\n backgroundImage: `url(https://tipp-coaching-live.s3.ap-northeast-2.amazonaws.com/images/curriculum_review_bg.png)`,\n backgroundPosition: 'center',\n backgroundSize: 'cover',\n backgroundRepeat: 'no-repeat',\n }}\n width=\"100%\"\n >\n <Typo color=\"gray\" weight=\"bold\">\n {curriculum.title}\n </Typo>\n <Typo align=\"center\" as=\"p\" color=\"gray\">\n {description}\n </Typo>\n\n <Dialog.Trigger>\n <Button\n mt=\"3\"\n style={{ minWidth: 232, backgroundColor: bgColor }}\n variant={done ? 'outline' : 'solid'}\n >\n <Typo truncate>{done ? '나의 응답 다시보기' : buttonTitle}</Typo>\n </Button>\n </Dialog.Trigger>\n </Flex>\n <Dialog.Content\n height=\"100%\"\n hideCloseButton\n style={{ borderRadius: 0, padding: 0 }}\n title=\"\"\n width=\"100%\"\n >\n <Flex\n align=\"center\"\n height=\"100%\"\n justify=\"center\"\n pb=\"3\"\n position=\"relative\"\n width=\"100%\"\n >\n <CurriculumReviewSteps\n contents={item}\n curriculum={curriculum}\n defaultValues={defaultValues}\n done={done}\n mode={mode}\n onClickEndReview={onClickEndReview}\n onReviewValueChange={onReviewValueChange}\n onSubmit={onReviewSubmit}\n title={sectionTitle}\n />\n {/* 닫기 버튼 */}\n <Box position=\"absolute\" right=\"16px\" top=\"16px\">\n <IconButton\n color=\"gray\"\n onClick={onClickCloseDrawer}\n variant=\"ghost\"\n >\n <Box display={{ initial: 'none', md: 'block' }}>\n <Cross1Icon height={20} width={20} />\n </Box>\n <Box display={{ initial: 'block', md: 'none' }}>\n <Cross1Icon height={16} width={16} />\n </Box>\n </IconButton>\n </Box>\n\n {/* 진짜 닫겠습니까 모달 */}\n <Dialog.Root onOpenChange={setCloseDialogOpen} open={closeDialogOpen}>\n <Dialog.Content\n buttons={\n <Flex gap=\"3\" justify=\"end\">\n <Dialog.Close asChild>\n <Button color=\"gray\" variant=\"outline\">\n 돌아가기\n </Button>\n </Dialog.Close>\n <Dialog.Close>\n <Button color=\"red\" onClick={onClickEndReview}>\n 나가기\n </Button>\n </Dialog.Close>\n </Flex>\n }\n title=\"작성을 중단하시겠습니까?\"\n >\n <Typo>페이지에서 벗어나면 작성한 내용이 저장되지 않습니다.</Typo>\n </Dialog.Content>\n </Dialog.Root>\n </Flex>\n </Dialog.Content>\n </Dialog.Root>\n );\n}\n\nexport default CurriculumReview;\n"],"mappings":"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","names":[]}
@@ -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 { jsx, jsxs } from "react/jsx-runtime";
19
+ function DescriptionJsonRender(props) {
20
+ const { value } = props;
21
+ return /* @__PURE__ */ jsx(Box, { 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, { 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-4F2XOUIR.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 <Box>\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>\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 </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAqDkB,cAYJ,YAZI;AAdX,SAAS,sBACd,OACoB;AACpB,QAAM,EAAE,MAAM,IAAI;AAClB,SACE,oBAAC,OACE,gBAAM,OAAO,IAAI,CAAC,OAAO,UAAU;AAClC,QAAI,MAAM,SAAS,eAAe;AAChC;AAAA;AAAA,QAEE,oBAAC,OAAmC,IAAG,KAAI,IAAG,KAC5C,8BAAC,KAAK,MAAL,EACE,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":[]}