@dotss/tictoccroc 0.4.2 → 0.6.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.
Files changed (205) hide show
  1. package/dist/Calendar-BOLCHnjh.js +97 -0
  2. package/dist/TimePicker-BwACyeBR.js +120 -0
  3. package/dist/convertMdToHtml-Bmk0brLK.js +1431 -0
  4. package/dist/index.mjs +105 -200
  5. package/dist/parent/b2b/components/ActionButtons/ActionButtons.mjs +26 -29
  6. package/dist/parent/b2b/components/ActionButtons/index.mjs +5 -4
  7. package/dist/parent/b2b/components/BottomNotes/BottomNotes.mjs +37 -35
  8. package/dist/parent/b2b/components/BottomNotes/index.mjs +5 -4
  9. package/dist/parent/b2b/components/EmployeeNumberField/EmployeeNumberField.mjs +12 -15
  10. package/dist/parent/b2b/components/EmployeeNumberField/index.mjs +5 -4
  11. package/dist/parent/b2b/components/NameField/NameField.mjs +12 -7
  12. package/dist/parent/b2b/components/NameField/index.mjs +5 -4
  13. package/dist/parent/b2b/components/PhoneNumberField/PhoneNumberField.mjs +27 -30
  14. package/dist/parent/b2b/components/PhoneNumberField/PhoneNumberField.utils.mjs +7 -8
  15. package/dist/parent/b2b/components/PhoneNumberField/index.mjs +6 -7
  16. package/dist/parent/b2b/components/Title/Title.mjs +22 -16
  17. package/dist/parent/b2b/components/Title/index.mjs +4 -3
  18. package/dist/parent/b2b/components/TopLogo/TopLogo.mjs +55 -93
  19. package/dist/parent/b2b/components/TopLogo/index.mjs +5 -4
  20. package/dist/parent/b2b/components/index.mjs +9 -19
  21. package/dist/parent/b2b/utils/convertMdToHtml/convertMdToHtml.mjs +2 -1143
  22. package/dist/parent/b2b/utils/index.mjs +2 -4
  23. package/dist/parent/notification/components/NotificationCard/NotificationCard.mjs +90 -108
  24. package/dist/parent/notification/components/NotificationCard/index.mjs +5 -4
  25. package/dist/parent/notification/components/index.mjs +2 -4
  26. package/dist/parent/notification/utils/index.mjs +2 -4
  27. package/dist/parent/notification/utils/sanitize/sanitize.mjs +6 -6
  28. package/dist/purify.es-D3W4zDrg.js +549 -0
  29. package/dist/shared/components/Calendar/Calendar.mjs +2 -80
  30. package/dist/shared/components/Calendar/index.mjs +5 -4
  31. package/dist/shared/components/Carousel/Carousel.mjs +184 -210
  32. package/dist/shared/components/Carousel/CarouselSlide/CarouselSlide.mjs +10 -7
  33. package/dist/shared/components/Carousel/CarouselSlide/index.mjs +5 -4
  34. package/dist/shared/components/Carousel/index.mjs +6 -6
  35. package/dist/shared/components/ChatKit/BotMessage/BotMessage.mjs +151 -183
  36. package/dist/shared/components/ChatKit/BotMessage/BotMessage.utils.mjs +30 -50
  37. package/dist/shared/components/ChatKit/BotMessage/index.mjs +6 -8
  38. package/dist/shared/components/ChatKit/InputBar/InputBar.fallback.mjs +64 -84
  39. package/dist/shared/components/ChatKit/InputBar/InputBar.mjs +105 -130
  40. package/dist/shared/components/ChatKit/InputBar/index.mjs +6 -6
  41. package/dist/shared/components/ChatKit/Message/Message.fallback.mjs +50 -66
  42. package/dist/shared/components/ChatKit/Message/Message.mjs +178 -276
  43. package/dist/shared/components/ChatKit/Message/Message.utils.mjs +20 -31
  44. package/dist/shared/components/ChatKit/Message/index.mjs +7 -9
  45. package/dist/shared/components/ChatKit/Seperator/Seperator.mjs +31 -27
  46. package/dist/shared/components/ChatKit/Seperator/index.mjs +4 -3
  47. package/dist/shared/components/ChatKit/SystemMessage/(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet.mjs +183 -153
  48. package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.mjs +83 -108
  49. package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.utils.mjs +5 -5
  50. package/dist/shared/components/ChatKit/SystemMessage/index.mjs +7 -8
  51. package/dist/shared/components/ChatKit/UnreadMessagePill/UnreadMessagePill.mjs +49 -54
  52. package/dist/shared/components/ChatKit/UnreadMessagePill/index.mjs +5 -4
  53. package/dist/shared/components/ChatKit/index.mjs +13 -29
  54. package/dist/shared/components/Image/Image.d.ts +2 -0
  55. package/dist/shared/components/Image/Image.error.mjs +34 -40
  56. package/dist/shared/components/Image/Image.mjs +247 -289
  57. package/dist/shared/components/Image/index.mjs +6 -6
  58. package/dist/shared/components/LoadingAnnouncer/LoadingAnnouncer.mjs +19 -18
  59. package/dist/shared/components/LoadingAnnouncer/index.mjs +5 -4
  60. package/dist/shared/components/Masonry/Masonry.mjs +240 -276
  61. package/dist/shared/components/Masonry/Masonry.utils.mjs +62 -81
  62. package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.mjs +111 -144
  63. package/dist/shared/components/Masonry/MasonryBlock/index.mjs +5 -4
  64. package/dist/shared/components/Masonry/index.mjs +6 -6
  65. package/dist/shared/components/MediaDialog/MediaBlock/MediaBlock.mjs +54 -69
  66. package/dist/shared/components/MediaDialog/MediaBlock/index.mjs +5 -4
  67. package/dist/shared/components/MediaDialog/MediaDialog.mjs +216 -330
  68. package/dist/shared/components/MediaDialog/MediaDialogContent/MediaDialogContent.mjs +18 -21
  69. package/dist/shared/components/MediaDialog/MediaDialogContent/index.mjs +5 -4
  70. package/dist/shared/components/MediaDialog/MediaDialogFooter/MediaDialogFooter.mjs +22 -27
  71. package/dist/shared/components/MediaDialog/MediaDialogFooter/index.mjs +5 -4
  72. package/dist/shared/components/MediaDialog/MediaDialogToolbar/MediaDialogToolbar.mjs +15 -21
  73. package/dist/shared/components/MediaDialog/MediaDialogToolbar/index.mjs +5 -4
  74. package/dist/shared/components/MediaDialog/index.mjs +9 -12
  75. package/dist/shared/components/Roller/Roller.mjs +99 -132
  76. package/dist/shared/components/Roller/RollerBlock/RollerBlock.mjs +9 -6
  77. package/dist/shared/components/Roller/RollerBlock/index.mjs +5 -4
  78. package/dist/shared/components/Roller/index.mjs +6 -6
  79. package/dist/shared/components/Scheduler/ScheduleBlock/ScheduleBlock.mjs +22 -30
  80. package/dist/shared/components/Scheduler/ScheduleBlock/index.mjs +5 -4
  81. package/dist/shared/components/Scheduler/ScheduleEvent/ScheduleEvent.mjs +25 -35
  82. package/dist/shared/components/Scheduler/ScheduleEvent/index.mjs +5 -4
  83. package/dist/shared/components/Scheduler/Scheduler.mjs +472 -567
  84. package/dist/shared/components/Scheduler/Scheduler.utils.mjs +78 -101
  85. package/dist/shared/components/Scheduler/index.mjs +8 -10
  86. package/dist/shared/components/Swiper/Swiper.mjs +238 -283
  87. package/dist/shared/components/Swiper/Swiper.utils.mjs +19 -24
  88. package/dist/shared/components/Swiper/SwiperBlock/SwiperBlock.mjs +14 -17
  89. package/dist/shared/components/Swiper/SwiperBlock/index.mjs +5 -4
  90. package/dist/shared/components/Swiper/index.mjs +6 -6
  91. package/dist/shared/components/TextField/TextField.mjs +44 -55
  92. package/dist/shared/components/TextField/index.mjs +5 -4
  93. package/dist/shared/components/TimePicker/TimePicker.mjs +2 -120
  94. package/dist/shared/components/TimePicker/index.mjs +5 -4
  95. package/dist/shared/components/index.mjs +36 -75
  96. package/dist/shared/hooks/index.mjs +4 -8
  97. package/dist/shared/hooks/useCombineRef/index.mjs +5 -4
  98. package/dist/shared/hooks/useCombineRef/useCombineRef.mjs +7 -7
  99. package/dist/shared/hooks/useInView/index.mjs +5 -4
  100. package/dist/shared/hooks/useInView/useInView.d.ts +2 -1
  101. package/dist/shared/hooks/useInView/useInView.mjs +37 -47
  102. package/dist/shared/hooks/useIsomorphicLayoutEffect/index.mjs +5 -4
  103. package/dist/shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs +6 -6
  104. package/dist/shared/typings/common.mjs +6 -4
  105. package/dist/shared/typings/index.mjs +2 -4
  106. package/dist/shared/utils/ageToBirthDate/ageToBirthDate.mjs +17 -9
  107. package/dist/shared/utils/ageToBirthDate/index.mjs +5 -4
  108. package/dist/shared/utils/birthDateToAge/birthDateToAge.mjs +9 -10
  109. package/dist/shared/utils/birthDateToAge/index.mjs +4 -3
  110. package/dist/shared/utils/combineRef/combineRef.mjs +20 -23
  111. package/dist/shared/utils/combineRef/index.mjs +5 -4
  112. package/dist/shared/utils/dayFlagToDay/dayFlagToDay.mjs +15 -23
  113. package/dist/shared/utils/dayFlagToDay/index.mjs +5 -4
  114. package/dist/shared/utils/getCareTypeLabel/getCareTypeLabel.mjs +13 -20
  115. package/dist/shared/utils/getCareTypeLabel/index.mjs +5 -4
  116. package/dist/shared/utils/getDateRange/getDateRange.mjs +15 -20
  117. package/dist/shared/utils/getDateRange/index.mjs +5 -4
  118. package/dist/shared/utils/getImageUrl/getImageUrl.mjs +7 -17
  119. package/dist/shared/utils/getImageUrl/index.mjs +5 -6
  120. package/dist/shared/utils/getTimeRange/getTimeRange.mjs +19 -21
  121. package/dist/shared/utils/getTimeRange/index.mjs +5 -4
  122. package/dist/shared/utils/getVimeoId/getVimeoId.mjs +11 -11
  123. package/dist/shared/utils/getVimeoId/index.mjs +5 -4
  124. package/dist/shared/utils/index.mjs +18 -36
  125. package/dist/shared/utils/isAndroid/index.mjs +5 -4
  126. package/dist/shared/utils/isAndroid/isAndroid.mjs +5 -5
  127. package/dist/shared/utils/isApp/index.mjs +5 -4
  128. package/dist/shared/utils/isApp/isApp.mjs +4 -4
  129. package/dist/shared/utils/isDesktop/index.mjs +5 -4
  130. package/dist/shared/utils/isDesktop/isDesktop.mjs +15 -15
  131. package/dist/shared/utils/isIos/index.mjs +5 -4
  132. package/dist/shared/utils/isIos/isIos.mjs +5 -5
  133. package/dist/shared/utils/isServer/index.mjs +4 -3
  134. package/dist/shared/utils/isServer/isServer.mjs +4 -4
  135. package/dist/shared/utils/objectToQueryString/index.mjs +5 -4
  136. package/dist/shared/utils/objectToQueryString/objectToQueryString.mjs +7 -8
  137. package/dist/shared/utils/parseQueryString/index.mjs +4 -3
  138. package/dist/shared/utils/parseQueryString/parseQueryString.mjs +5 -5
  139. package/dist/shared/utils/share/index.mjs +5 -4
  140. package/dist/shared/utils/share/share.mjs +12 -14
  141. package/dist/teacher/home/components/BannerAccount/BannerAccount.fallback.mjs +19 -11
  142. package/dist/teacher/home/components/BannerAccount/BannerAccount.mjs +83 -99
  143. package/dist/teacher/home/components/BannerAccount/index.mjs +6 -7
  144. package/dist/teacher/home/components/Carousel1Account/Carousel1Account.fallback.mjs +127 -67
  145. package/dist/teacher/home/components/Carousel1Account/Carousel1Account.mjs +68 -82
  146. package/dist/teacher/home/components/Carousel1Account/index.mjs +6 -7
  147. package/dist/teacher/home/components/Carousel2Account/Carousel2Account.fallback.mjs +112 -94
  148. package/dist/teacher/home/components/Carousel2Account/Carousel2Account.mjs +79 -85
  149. package/dist/teacher/home/components/Carousel2Account/index.mjs +6 -7
  150. package/dist/teacher/home/components/TextAccount/TextAccount.fallback.mjs +119 -108
  151. package/dist/teacher/home/components/TextAccount/TextAccount.mjs +91 -111
  152. package/dist/teacher/home/components/TextAccount/index.mjs +6 -7
  153. package/dist/teacher/home/components/index.mjs +9 -18
  154. package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.mjs +345 -442
  155. package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/index.mjs +5 -5
  156. package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.mjs +106 -109
  157. package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.utils.mjs +54 -58
  158. package/dist/teacher/profile/components/AbilityCollection/index.mjs +7 -8
  159. package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.mjs +73 -104
  160. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs +81 -95
  161. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/index.mjs +4 -3
  162. package/dist/teacher/profile/components/ActivityGallery/index.mjs +6 -6
  163. package/dist/teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs +148 -194
  164. package/dist/teacher/profile/components/AvailableScheduleSection/index.mjs +5 -4
  165. package/dist/teacher/profile/components/CareNoteSection/CareNote/CareNote.mjs +61 -53
  166. package/dist/teacher/profile/components/CareNoteSection/CareNote/index.mjs +5 -4
  167. package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.mjs +72 -81
  168. package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.utils.mjs +17 -12
  169. package/dist/teacher/profile/components/CareNoteSection/index.mjs +6 -6
  170. package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs +108 -134
  171. package/dist/teacher/profile/components/CareerSection/CareerItem/index.mjs +5 -4
  172. package/dist/teacher/profile/components/CareerSection/CareerSection.mjs +133 -176
  173. package/dist/teacher/profile/components/CareerSection/index.mjs +6 -6
  174. package/dist/teacher/profile/components/CertificateSection/CertificateItem/CertificateItem.mjs +82 -88
  175. package/dist/teacher/profile/components/CertificateSection/CertificateItem/index.mjs +4 -3
  176. package/dist/teacher/profile/components/CertificateSection/CertificateSection.mjs +112 -141
  177. package/dist/teacher/profile/components/CertificateSection/index.mjs +6 -6
  178. package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs +96 -111
  179. package/dist/teacher/profile/components/EducationSection/EducationItem/index.mjs +5 -4
  180. package/dist/teacher/profile/components/EducationSection/EducationSection.mjs +112 -141
  181. package/dist/teacher/profile/components/EducationSection/index.mjs +6 -6
  182. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.mjs +107 -102
  183. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/index.mjs +5 -4
  184. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs +85 -81
  185. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.utils.mjs +17 -12
  186. package/dist/teacher/profile/components/ParentReviewSection/index.mjs +7 -8
  187. package/dist/teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs +43 -36
  188. package/dist/teacher/profile/components/PreferredActivityKeywordGroup/index.mjs +4 -3
  189. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs +44 -31
  190. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.d.ts +3 -0
  191. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs +12 -12
  192. package/dist/teacher/profile/components/PreferredAgeGroup/index.mjs +5 -5
  193. package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.mjs +348 -433
  194. package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.utils.mjs +7 -7
  195. package/dist/teacher/profile/components/ProfileSummary/index.mjs +5 -4
  196. package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs +80 -105
  197. package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/index.mjs +5 -4
  198. package/dist/teacher/profile/components/StatBadgeCollection/StatBadgeCollection.mjs +34 -27
  199. package/dist/teacher/profile/components/StatBadgeCollection/index.mjs +6 -6
  200. package/dist/teacher/profile/components/index.mjs +24 -48
  201. package/dist/teacher/profile/utils/index.mjs +2 -4
  202. package/dist/teacher/profile/utils/sortItems/index.mjs +5 -4
  203. package/dist/teacher/profile/utils/sortItems/sortItems.mjs +48 -48
  204. package/package.json +1 -1
  205. package/dist/purify.es-BGaRrCfO.js +0 -553
@@ -1,434 +1,349 @@
1
- import { jsxs as i, jsx as e, Fragment as C } from "react/jsx-runtime";
2
- import { useState as I, useRef as F, useEffect as J } from "react";
3
- import { Flexbox as r, Typography as t, Icon as d, Label as B, Button as A } from "@dotss/ui";
4
- import G from "@dotss/ui/core/useTheme";
5
- import K from "dayjs";
6
- import O from "../../../../shared/components/Image/Image.mjs";
7
- import { getLastActiveText as W } from "./ProfileSummary.utils.mjs";
8
- function Y({
9
- avatar: n,
10
- introduction: l,
11
- name: u,
12
- grade: S,
13
- activeHours: f = 0,
14
- rating: h = 0,
15
- reviewCount: p = 0,
16
- adornment: L,
17
- lastActiveAt: x,
18
- action: k
19
- }) {
20
- const {
21
- palette: { background: y, brand: w, etc: D },
22
- spacing: a
23
- } = G(), [m, v] = I(!1), [z, T] = I(!1), b = F(null), E = f > 0 || p > 0, c = x ? K(x) : null, R = c ? W(c) : null, j = (o) => {
24
- var s, g;
25
- switch (o.key) {
26
- case "Enter":
27
- o.preventDefault(), (s = n.onClick) == null || s.call(n, o);
28
- break;
29
- case " ":
30
- o.preventDefault(), (g = n.onClick) == null || g.call(n, o);
31
- break;
32
- }
33
- }, M = () => v((o) => !o);
34
- return J(() => {
35
- const o = () => {
36
- if (!b.current) return;
37
- const s = b.current, g = parseInt(window.getComputedStyle(s).lineHeight), $ = s.scrollHeight, H = Math.ceil($ / g);
38
- T(H > 4);
39
- };
40
- return o(), window.addEventListener("resize", o), () => {
41
- window.removeEventListener("resize", o);
42
- };
43
- }, [l.aboutMe]), /* @__PURE__ */ i(
44
- r,
45
- {
46
- tag: "section",
47
- flexDirection: "column",
48
- gap: 4,
49
- "aria-label": "선생님 프로필 요약 정보",
50
- inlineCSS: {
51
- width: "100%"
52
- },
53
- children: [
54
- /* @__PURE__ */ i(r, { alignItems: "center", gap: 4, children: [
55
- /* @__PURE__ */ i(r, { flexDirection: "column", gap: 2, alignItems: "center", justifyContent: "center", children: [
56
- /* @__PURE__ */ i(
57
- r,
58
- {
59
- role: typeof n.onClick == "function" ? "button" : void 0,
60
- tabIndex: typeof n.onClick == "function" ? 0 : -1,
61
- onKeyDown: j,
62
- onClick: n.onClick,
63
- alignItems: "center",
64
- justifyContent: "center",
65
- flexDirection: "column",
66
- gap: 2,
67
- inlineCSS: {
68
- position: "relative",
69
- cursor: typeof n.onClick == "function" ? "pointer" : void 0
70
- },
71
- children: [
72
- n.src && /* @__PURE__ */ e(
73
- O,
74
- {
75
- width: 88,
76
- height: 88,
77
- src: n.src,
78
- alt: `${u} 선생님 프로필 이미지`,
79
- fit: "cover",
80
- borderRadius: 100,
81
- role: "presentation",
82
- style: {
83
- objectFit: "cover"
84
- }
85
- }
86
- ),
87
- n.adornment,
88
- !n.src && !n.placeholder && /* @__PURE__ */ i(
89
- r,
90
- {
91
- role: "status",
92
- flexDirection: "column",
93
- alignItems: "center",
94
- justifyContent: "center",
95
- inlineCSS: {
96
- width: 88,
97
- height: 88,
98
- backgroundColor: y.primary,
99
- borderRadius: 100
100
- },
101
- children: [
102
- /* @__PURE__ */ e(
103
- t,
104
- {
105
- tag: "p",
106
- variant: "c3M",
107
- color: "grey.70",
108
- "aria-label": "등록된 프로필 사진이 없어요.",
109
- children: "프로필 사진"
110
- }
111
- ),
112
- /* @__PURE__ */ e(t, { tag: "span", variant: "c5R", color: "etc.red", "aria-hidden": !0, children: "(필수)" })
113
- ]
114
- }
115
- ),
116
- !n.src && n.placeholder && n.placeholder,
117
- /* @__PURE__ */ e(
118
- r,
119
- {
120
- "aria-hidden": !0,
121
- inlineCSS: {
122
- position: "absolute",
123
- top: 0,
124
- left: 0,
125
- width: "100%",
126
- height: "100%",
127
- border: "1px solid rgba(0, 0, 0, 0.05)",
128
- borderRadius: 100
129
- }
130
- }
131
- ),
132
- n.status === "REJECTED" && /* @__PURE__ */ i(C, { children: [
133
- /* @__PURE__ */ e(
134
- r,
135
- {
136
- alignItems: "center",
137
- justifyContent: "center",
138
- inlineCSS: {
139
- position: "absolute",
140
- top: 0,
141
- left: 0,
142
- width: "100%",
143
- height: "100%",
144
- opacity: 0.8,
145
- borderRadius: 100,
146
- backgroundColor: y.primary,
147
- zIndex: 1
148
- }
149
- }
150
- ),
151
- /* @__PURE__ */ e(
152
- d,
153
- {
154
- name: "AlertFill",
155
- size: "xSmall",
156
- color: "etc.red",
157
- inlineCSS: {
158
- position: "absolute",
159
- top: "50%",
160
- left: "50%",
161
- transform: "translate(-50%, -50%)",
162
- zIndex: 1
163
- }
164
- }
165
- ),
166
- /* @__PURE__ */ e(t, { role: "status", visuallyHidden: !0, children: "프로필 사진이 반려되었어요. 다시 등록해주세요." })
167
- ] })
168
- ]
169
- }
170
- ),
171
- (c == null ? void 0 : c.isValid()) && /* @__PURE__ */ e(
172
- t,
173
- {
174
- tag: "p",
175
- variant: "c3M",
176
- color: "grey.50",
177
- inlineCSS: {
178
- visibility: R ? void 0 : "hidden"
179
- },
180
- children: R || "활동 정보 없음"
181
- }
182
- )
183
- ] }),
184
- /* @__PURE__ */ i(r, { flexDirection: "column", justifyContent: "flex-start", gap: 3, flexGrow: 1, children: [
185
- /* @__PURE__ */ i(r, { alignItems: "center", gap: 2, flexWrap: "wrap", children: [
186
- S && /* @__PURE__ */ e(B, { variant: "outlined", size: "small", color: "blue", "aria-label": `${S} 등급`, children: S }),
187
- /* @__PURE__ */ i(
188
- t,
189
- {
190
- tag: "p",
191
- variant: "h2B",
192
- "aria-label": `${u} 선생님`,
193
- inlineCSS: {
194
- flexGrow: 1,
195
- "& > span": {
196
- marginLeft: a.content(1),
197
- fontWeight: 400
198
- }
199
- },
200
- children: [
201
- u,
202
- /* @__PURE__ */ e("span", { "aria-hidden": !0, children: "선생님" })
203
- ]
204
- }
205
- ),
206
- /* @__PURE__ */ e(
207
- r,
208
- {
209
- alignItems: "center",
210
- inlineCSS: {
211
- maxHeight: 30
212
- },
213
- children: L
214
- }
215
- )
216
- ] }),
217
- /* @__PURE__ */ i(
218
- r,
219
- {
220
- pl: 4,
221
- pr: 4,
222
- pt: 2,
223
- pb: 2,
224
- justifyContent: "space-around",
225
- alignItems: "center",
226
- gap: 5,
227
- "aria-hidden": !E,
228
- inlineCSS: {
229
- borderRadius: 8,
230
- backgroundColor: y.primary,
231
- visibility: E ? void 0 : "hidden"
232
- },
233
- children: [
234
- /* @__PURE__ */ i(
235
- r,
236
- {
237
- alignItems: "center",
238
- role: "group",
239
- "aria-label": `누적 수업 ${f}시간`,
240
- inlineCSS: {
241
- whiteSpace: "nowrap"
242
- },
243
- children: [
244
- /* @__PURE__ */ e(d, { name: "TimeLine", size: "xSmall", color: "grey.70" }),
245
- /* @__PURE__ */ e(
246
- t,
247
- {
248
- tag: "p",
249
- variant: "h4B",
250
- inlineCSS: {
251
- marginLeft: a.content(1),
252
- color: w.primary.text
253
- },
254
- children: f.toLocaleString()
255
- }
256
- ),
257
- /* @__PURE__ */ e(
258
- t,
259
- {
260
- tag: "span",
261
- variant: "b5R",
262
- color: "grey.70",
263
- inlineCSS: {
264
- marginLeft: a.content(0.5)
265
- },
266
- children: "시간"
267
- }
268
- )
269
- ]
270
- }
271
- ),
272
- /* @__PURE__ */ i(
273
- r,
274
- {
275
- alignItems: "center",
276
- role: "group",
277
- "aria-label": h > 0 ? `평점 ${h}, 리뷰 ${p}개` : `평점 집계중, 리뷰 ${p}개`,
278
- inlineCSS: {
279
- whiteSpace: "nowrap"
280
- },
281
- children: [
282
- /* @__PURE__ */ e(d, { name: "ReviewLine", size: "xSmall", color: "grey.70" }),
283
- h > 0 ? /* @__PURE__ */ i(C, { children: [
284
- /* @__PURE__ */ e(
285
- t,
286
- {
287
- tag: "p",
288
- variant: "h4B",
289
- inlineCSS: {
290
- marginLeft: a.content(1),
291
- color: w.primary.text
292
- },
293
- children: h.toLocaleString()
294
- }
295
- ),
296
- /* @__PURE__ */ i(
297
- t,
298
- {
299
- tag: "span",
300
- variant: "b5R",
301
- color: "grey.70",
302
- inlineCSS: {
303
- marginLeft: a.content(0.5)
304
- },
305
- children: [
306
- "(",
307
- p.toLocaleString(),
308
- ")"
309
- ]
310
- }
311
- )
312
- ] }) : /* @__PURE__ */ e(
313
- t,
314
- {
315
- tag: "p",
316
- variant: "h4R",
317
- color: "grey.70",
318
- inlineCSS: {
319
- marginLeft: a.content(1)
320
- },
321
- children: "집계중"
322
- }
323
- )
324
- ]
325
- }
326
- )
327
- ]
328
- }
329
- )
330
- ] })
331
- ] }),
332
- /* @__PURE__ */ i(
333
- r,
334
- {
335
- flexDirection: "column",
336
- inlineCSS: {
337
- position: "relative"
338
- },
339
- children: [
340
- (!l.summary || !l.aboutMe) && !l.placeholder && /* @__PURE__ */ i(
341
- t,
342
- {
343
- tag: "p",
344
- variant: "b4R",
345
- color: "grey.70",
346
- "aria-label": "작성된 프로필 소개가 없어요.",
347
- inlineCSS: {
348
- "& > span": {
349
- color: D.red
350
- }
351
- },
352
- children: [
353
- /* @__PURE__ */ e("span", { "aria-hidden": !0, children: "(필수)" }),
354
- " 프로필 소개를 작성하세요."
355
- ]
356
- }
357
- ),
358
- (!l.summary || !l.aboutMe) && l.placeholder && l.placeholder,
359
- l.summary && l.aboutMe && /* @__PURE__ */ i(C, { children: [
360
- l.status === "REJECTED" && /* @__PURE__ */ e(t, { role: "status", visuallyHidden: !0, children: "프로필 소개가 반려되었어요. 다시 작성해주세요." }),
361
- /* @__PURE__ */ i(
362
- t,
363
- {
364
- tag: "dl",
365
- variant: "b4M",
366
- color: l.status === "REJECTED" ? "grey.30" : void 0,
367
- inlineCSS: {
368
- display: "flex",
369
- alignItems: "center"
370
- },
371
- children: [
372
- l.status === "REJECTED" && /* @__PURE__ */ e(
373
- d,
374
- {
375
- name: "AlertFill",
376
- size: "xSmall",
377
- color: "etc.red",
378
- inlineCSS: {
379
- marginRight: a.content(1)
380
- }
381
- }
382
- ),
383
- /* @__PURE__ */ e(r, { tag: "dt", visuallyHidden: !0, children: "한 줄 소개" }),
384
- /* @__PURE__ */ e("dd", { children: l.summary })
385
- ]
386
- }
387
- ),
388
- /* @__PURE__ */ i(
389
- t,
390
- {
391
- ref: b,
392
- id: "about-me",
393
- tag: "dl",
394
- variant: "b4R",
395
- color: l.status === "REJECTED" ? "grey.30" : "grey.70",
396
- lineClamp: m ? void 0 : 4,
397
- inlineCSS: {
398
- marginTop: a.content(2),
399
- whiteSpace: "pre-wrap"
400
- },
401
- children: [
402
- /* @__PURE__ */ e(r, { tag: "dt", visuallyHidden: !0, children: "자기소개" }),
403
- /* @__PURE__ */ e("dd", { children: l.aboutMe })
404
- ]
405
- }
406
- )
407
- ] }),
408
- z && /* @__PURE__ */ e(
409
- A,
410
- {
411
- variant: "text",
412
- size: "xSmall",
413
- color: "secondary",
414
- endAdornment: /* @__PURE__ */ e(d, { name: m ? "ChevronUpLine" : "ChevronDownLine" }),
415
- onClick: M,
416
- "aria-expanded": m,
417
- "aria-controls": "about-me",
418
- inlineCSS: {
419
- marginLeft: "auto"
420
- },
421
- children: m ? "접기" : "더 보기"
422
- }
423
- )
424
- ]
425
- }
426
- ),
427
- k
428
- ]
429
- }
430
- );
1
+ import e from "../../../../shared/components/Image/index.mjs";
2
+ import { getLastActiveText as t } from "./ProfileSummary.utils.mjs";
3
+ import { useEffect as n, useRef as r, useState as i } from "react";
4
+ import { Button as a, Flexbox as o, Icon as s, Label as c, Typography as l } from "@dotss/ui";
5
+ import u from "@dotss/ui/core/useTheme";
6
+ import d from "dayjs";
7
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
8
+ //#region teacher/profile/components/ProfileSummary/ProfileSummary.tsx
9
+ function h({ avatar: h, introduction: g, name: _, grade: v, activeHours: y = 0, rating: b = 0, reviewCount: x = 0, adornment: S, lastActiveAt: C, action: w }) {
10
+ let { palette: { background: T, brand: E, etc: D }, spacing: O } = u(), [k, A] = i(!1), [j, M] = i(!1), N = r(null), P = y > 0 || x > 0, F = C ? d(C) : null, I = F ? t(F) : null;
11
+ return n(() => {
12
+ let e = () => {
13
+ if (!N.current) return;
14
+ let e = N.current, t = parseInt(window.getComputedStyle(e).lineHeight), n = e.scrollHeight;
15
+ M(Math.ceil(n / t) > 4);
16
+ };
17
+ return e(), window.addEventListener("resize", e), () => {
18
+ window.removeEventListener("resize", e);
19
+ };
20
+ }, [g.aboutMe]), /* @__PURE__ */ m(o, {
21
+ tag: "section",
22
+ flexDirection: "column",
23
+ gap: 4,
24
+ "aria-label": "선생님 프로필 요약 정보",
25
+ inlineCSS: { width: "100%" },
26
+ children: [
27
+ /* @__PURE__ */ m(o, {
28
+ alignItems: "center",
29
+ gap: 4,
30
+ children: [/* @__PURE__ */ m(o, {
31
+ flexDirection: "column",
32
+ gap: 2,
33
+ alignItems: "center",
34
+ justifyContent: "center",
35
+ children: [/* @__PURE__ */ m(o, {
36
+ role: typeof h.onClick == "function" ? "button" : void 0,
37
+ tabIndex: typeof h.onClick == "function" ? 0 : -1,
38
+ onKeyDown: (e) => {
39
+ switch (e.key) {
40
+ case "Enter":
41
+ e.preventDefault(), h.onClick?.(e);
42
+ break;
43
+ case " ":
44
+ e.preventDefault(), h.onClick?.(e);
45
+ break;
46
+ }
47
+ },
48
+ onClick: h.onClick,
49
+ alignItems: "center",
50
+ justifyContent: "center",
51
+ flexDirection: "column",
52
+ gap: 2,
53
+ inlineCSS: {
54
+ position: "relative",
55
+ cursor: typeof h.onClick == "function" ? "pointer" : void 0
56
+ },
57
+ children: [
58
+ h.src && /* @__PURE__ */ p(e, {
59
+ width: 88,
60
+ height: 88,
61
+ src: h.src,
62
+ alt: `${_} 선생님 프로필 이미지`,
63
+ fit: "cover",
64
+ borderRadius: 100,
65
+ role: "presentation",
66
+ style: { objectFit: "cover" }
67
+ }),
68
+ h.adornment,
69
+ !h.src && !h.placeholder && /* @__PURE__ */ m(o, {
70
+ role: "status",
71
+ flexDirection: "column",
72
+ alignItems: "center",
73
+ justifyContent: "center",
74
+ inlineCSS: {
75
+ width: 88,
76
+ height: 88,
77
+ backgroundColor: T.primary,
78
+ borderRadius: 100
79
+ },
80
+ children: [/* @__PURE__ */ p(l, {
81
+ tag: "p",
82
+ variant: "c3M",
83
+ color: "grey.70",
84
+ "aria-label": "등록된 프로필 사진이 없어요.",
85
+ children: "프로필 사진"
86
+ }), /* @__PURE__ */ p(l, {
87
+ tag: "span",
88
+ variant: "c5R",
89
+ color: "etc.red",
90
+ "aria-hidden": !0,
91
+ children: "(필수)"
92
+ })]
93
+ }),
94
+ !h.src && h.placeholder && h.placeholder,
95
+ /* @__PURE__ */ p(o, {
96
+ "aria-hidden": !0,
97
+ inlineCSS: {
98
+ position: "absolute",
99
+ top: 0,
100
+ left: 0,
101
+ width: "100%",
102
+ height: "100%",
103
+ border: "1px solid rgba(0, 0, 0, 0.05)",
104
+ borderRadius: 100
105
+ }
106
+ }),
107
+ h.status === "REJECTED" && /* @__PURE__ */ m(f, { children: [
108
+ /* @__PURE__ */ p(o, {
109
+ alignItems: "center",
110
+ justifyContent: "center",
111
+ inlineCSS: {
112
+ position: "absolute",
113
+ top: 0,
114
+ left: 0,
115
+ width: "100%",
116
+ height: "100%",
117
+ opacity: .8,
118
+ borderRadius: 100,
119
+ backgroundColor: T.primary,
120
+ zIndex: 1
121
+ }
122
+ }),
123
+ /* @__PURE__ */ p(s, {
124
+ name: "AlertFill",
125
+ size: "xSmall",
126
+ color: "etc.red",
127
+ inlineCSS: {
128
+ position: "absolute",
129
+ top: "50%",
130
+ left: "50%",
131
+ transform: "translate(-50%, -50%)",
132
+ zIndex: 1
133
+ }
134
+ }),
135
+ /* @__PURE__ */ p(l, {
136
+ role: "status",
137
+ visuallyHidden: !0,
138
+ children: "프로필 사진이 반려되었어요. 다시 등록해주세요."
139
+ })
140
+ ] })
141
+ ]
142
+ }), F?.isValid() && /* @__PURE__ */ p(l, {
143
+ tag: "p",
144
+ variant: "c3M",
145
+ color: "grey.50",
146
+ inlineCSS: { visibility: I ? void 0 : "hidden" },
147
+ children: I || "활동 정보 없음"
148
+ })]
149
+ }), /* @__PURE__ */ m(o, {
150
+ flexDirection: "column",
151
+ justifyContent: "flex-start",
152
+ gap: 3,
153
+ flexGrow: 1,
154
+ children: [/* @__PURE__ */ m(o, {
155
+ alignItems: "center",
156
+ gap: 2,
157
+ flexWrap: "wrap",
158
+ children: [
159
+ v && /* @__PURE__ */ p(c, {
160
+ variant: "outlined",
161
+ size: "small",
162
+ color: "blue",
163
+ "aria-label": `${v} 등급`,
164
+ children: v
165
+ }),
166
+ /* @__PURE__ */ m(l, {
167
+ tag: "p",
168
+ variant: "h2B",
169
+ "aria-label": `${_} 선생님`,
170
+ inlineCSS: {
171
+ flexGrow: 1,
172
+ "& > span": {
173
+ marginLeft: O.content(1),
174
+ fontWeight: 400
175
+ }
176
+ },
177
+ children: [_, /* @__PURE__ */ p("span", {
178
+ "aria-hidden": !0,
179
+ children: "선생님"
180
+ })]
181
+ }),
182
+ /* @__PURE__ */ p(o, {
183
+ alignItems: "center",
184
+ inlineCSS: { maxHeight: 30 },
185
+ children: S
186
+ })
187
+ ]
188
+ }), /* @__PURE__ */ m(o, {
189
+ pl: 4,
190
+ pr: 4,
191
+ pt: 2,
192
+ pb: 2,
193
+ justifyContent: "space-around",
194
+ alignItems: "center",
195
+ gap: 5,
196
+ "aria-hidden": !P,
197
+ inlineCSS: {
198
+ borderRadius: 8,
199
+ backgroundColor: T.primary,
200
+ visibility: P ? void 0 : "hidden"
201
+ },
202
+ children: [/* @__PURE__ */ m(o, {
203
+ alignItems: "center",
204
+ role: "group",
205
+ "aria-label": `누적 수업 ${y}시간`,
206
+ inlineCSS: { whiteSpace: "nowrap" },
207
+ children: [
208
+ /* @__PURE__ */ p(s, {
209
+ name: "TimeLine",
210
+ size: "xSmall",
211
+ color: "grey.70"
212
+ }),
213
+ /* @__PURE__ */ p(l, {
214
+ tag: "p",
215
+ variant: "h4B",
216
+ inlineCSS: {
217
+ marginLeft: O.content(1),
218
+ color: E.primary.text
219
+ },
220
+ children: y.toLocaleString()
221
+ }),
222
+ /* @__PURE__ */ p(l, {
223
+ tag: "span",
224
+ variant: "b5R",
225
+ color: "grey.70",
226
+ inlineCSS: { marginLeft: O.content(.5) },
227
+ children: "시간"
228
+ })
229
+ ]
230
+ }), /* @__PURE__ */ m(o, {
231
+ alignItems: "center",
232
+ role: "group",
233
+ "aria-label": b > 0 ? `평점 ${b}, 리뷰 ${x}개` : `평점 집계중, 리뷰 ${x}개`,
234
+ inlineCSS: { whiteSpace: "nowrap" },
235
+ children: [/* @__PURE__ */ p(s, {
236
+ name: "ReviewLine",
237
+ size: "xSmall",
238
+ color: "grey.70"
239
+ }), b > 0 ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(l, {
240
+ tag: "p",
241
+ variant: "h4B",
242
+ inlineCSS: {
243
+ marginLeft: O.content(1),
244
+ color: E.primary.text
245
+ },
246
+ children: b.toLocaleString()
247
+ }), /* @__PURE__ */ m(l, {
248
+ tag: "span",
249
+ variant: "b5R",
250
+ color: "grey.70",
251
+ inlineCSS: { marginLeft: O.content(.5) },
252
+ children: [
253
+ "(",
254
+ x.toLocaleString(),
255
+ ")"
256
+ ]
257
+ })] }) : /* @__PURE__ */ p(l, {
258
+ tag: "p",
259
+ variant: "h4R",
260
+ color: "grey.70",
261
+ inlineCSS: { marginLeft: O.content(1) },
262
+ children: "집계중"
263
+ })]
264
+ })]
265
+ })]
266
+ })]
267
+ }),
268
+ /* @__PURE__ */ m(o, {
269
+ flexDirection: "column",
270
+ inlineCSS: { position: "relative" },
271
+ children: [
272
+ (!g.summary || !g.aboutMe) && !g.placeholder && /* @__PURE__ */ m(l, {
273
+ tag: "p",
274
+ variant: "b4R",
275
+ color: "grey.70",
276
+ "aria-label": "작성된 프로필 소개가 없어요.",
277
+ inlineCSS: { "& > span": { color: D.red } },
278
+ children: [/* @__PURE__ */ p("span", {
279
+ "aria-hidden": !0,
280
+ children: "(필수)"
281
+ }), " 프로필 소개를 작성하세요."]
282
+ }),
283
+ (!g.summary || !g.aboutMe) && g.placeholder && g.placeholder,
284
+ g.summary && g.aboutMe && /* @__PURE__ */ m(f, { children: [
285
+ g.status === "REJECTED" && /* @__PURE__ */ p(l, {
286
+ role: "status",
287
+ visuallyHidden: !0,
288
+ children: "프로필 소개가 반려되었어요. 다시 작성해주세요."
289
+ }),
290
+ /* @__PURE__ */ m(l, {
291
+ tag: "dl",
292
+ variant: "b4M",
293
+ color: g.status === "REJECTED" ? "grey.30" : void 0,
294
+ inlineCSS: {
295
+ display: "flex",
296
+ alignItems: "center"
297
+ },
298
+ children: [
299
+ g.status === "REJECTED" && /* @__PURE__ */ p(s, {
300
+ name: "AlertFill",
301
+ size: "xSmall",
302
+ color: "etc.red",
303
+ inlineCSS: { marginRight: O.content(1) }
304
+ }),
305
+ /* @__PURE__ */ p(o, {
306
+ tag: "dt",
307
+ visuallyHidden: !0,
308
+ children: "한 줄 소개"
309
+ }),
310
+ /* @__PURE__ */ p("dd", { children: g.summary })
311
+ ]
312
+ }),
313
+ /* @__PURE__ */ m(l, {
314
+ ref: N,
315
+ id: "about-me",
316
+ tag: "dl",
317
+ variant: "b4R",
318
+ color: g.status === "REJECTED" ? "grey.30" : "grey.70",
319
+ lineClamp: k ? void 0 : 4,
320
+ inlineCSS: {
321
+ marginTop: O.content(2),
322
+ whiteSpace: "pre-wrap"
323
+ },
324
+ children: [/* @__PURE__ */ p(o, {
325
+ tag: "dt",
326
+ visuallyHidden: !0,
327
+ children: "자기소개"
328
+ }), /* @__PURE__ */ p("dd", { children: g.aboutMe })]
329
+ })
330
+ ] }),
331
+ j && /* @__PURE__ */ p(a, {
332
+ variant: "text",
333
+ size: "xSmall",
334
+ color: "secondary",
335
+ endAdornment: /* @__PURE__ */ p(s, { name: k ? "ChevronUpLine" : "ChevronDownLine" }),
336
+ onClick: () => A((e) => !e),
337
+ "aria-expanded": k,
338
+ "aria-controls": "about-me",
339
+ inlineCSS: { marginLeft: "auto" },
340
+ children: k ? "접기" : "더 보기"
341
+ })
342
+ ]
343
+ }),
344
+ w
345
+ ]
346
+ });
431
347
  }
432
- export {
433
- Y as default
434
- };
348
+ //#endregion
349
+ export { h as default };