@dotss/tictoccroc 0.4.1 → 0.5.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.d.ts +3 -1
  24. package/dist/parent/notification/components/NotificationCard/NotificationCard.mjs +90 -105
  25. package/dist/parent/notification/components/NotificationCard/index.mjs +5 -4
  26. package/dist/parent/notification/components/index.mjs +2 -4
  27. package/dist/parent/notification/utils/index.mjs +2 -4
  28. package/dist/parent/notification/utils/sanitize/sanitize.mjs +6 -6
  29. package/dist/purify.es-D3W4zDrg.js +549 -0
  30. package/dist/shared/components/Calendar/Calendar.mjs +2 -80
  31. package/dist/shared/components/Calendar/index.mjs +5 -4
  32. package/dist/shared/components/Carousel/Carousel.mjs +184 -210
  33. package/dist/shared/components/Carousel/CarouselSlide/CarouselSlide.mjs +10 -7
  34. package/dist/shared/components/Carousel/CarouselSlide/index.mjs +5 -4
  35. package/dist/shared/components/Carousel/index.mjs +6 -6
  36. package/dist/shared/components/ChatKit/BotMessage/BotMessage.mjs +151 -183
  37. package/dist/shared/components/ChatKit/BotMessage/BotMessage.utils.mjs +30 -50
  38. package/dist/shared/components/ChatKit/BotMessage/index.mjs +6 -8
  39. package/dist/shared/components/ChatKit/InputBar/InputBar.fallback.mjs +64 -84
  40. package/dist/shared/components/ChatKit/InputBar/InputBar.mjs +105 -130
  41. package/dist/shared/components/ChatKit/InputBar/index.mjs +6 -6
  42. package/dist/shared/components/ChatKit/Message/Message.fallback.mjs +50 -66
  43. package/dist/shared/components/ChatKit/Message/Message.mjs +178 -276
  44. package/dist/shared/components/ChatKit/Message/Message.utils.mjs +20 -31
  45. package/dist/shared/components/ChatKit/Message/index.mjs +7 -9
  46. package/dist/shared/components/ChatKit/Seperator/Seperator.mjs +31 -27
  47. package/dist/shared/components/ChatKit/Seperator/index.mjs +4 -3
  48. package/dist/shared/components/ChatKit/SystemMessage/(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet.mjs +183 -153
  49. package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.mjs +83 -108
  50. package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.utils.mjs +5 -5
  51. package/dist/shared/components/ChatKit/SystemMessage/index.mjs +7 -8
  52. package/dist/shared/components/ChatKit/UnreadMessagePill/UnreadMessagePill.mjs +49 -54
  53. package/dist/shared/components/ChatKit/UnreadMessagePill/index.mjs +5 -4
  54. package/dist/shared/components/ChatKit/index.mjs +13 -29
  55. package/dist/shared/components/Image/Image.d.ts +2 -0
  56. package/dist/shared/components/Image/Image.error.mjs +34 -40
  57. package/dist/shared/components/Image/Image.mjs +247 -289
  58. package/dist/shared/components/Image/index.mjs +6 -6
  59. package/dist/shared/components/LoadingAnnouncer/LoadingAnnouncer.mjs +19 -18
  60. package/dist/shared/components/LoadingAnnouncer/index.mjs +5 -4
  61. package/dist/shared/components/Masonry/Masonry.mjs +240 -276
  62. package/dist/shared/components/Masonry/Masonry.utils.mjs +62 -81
  63. package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.mjs +111 -144
  64. package/dist/shared/components/Masonry/MasonryBlock/index.mjs +5 -4
  65. package/dist/shared/components/Masonry/index.mjs +6 -6
  66. package/dist/shared/components/MediaDialog/MediaBlock/MediaBlock.mjs +54 -69
  67. package/dist/shared/components/MediaDialog/MediaBlock/index.mjs +5 -4
  68. package/dist/shared/components/MediaDialog/MediaDialog.mjs +216 -330
  69. package/dist/shared/components/MediaDialog/MediaDialogContent/MediaDialogContent.mjs +18 -21
  70. package/dist/shared/components/MediaDialog/MediaDialogContent/index.mjs +5 -4
  71. package/dist/shared/components/MediaDialog/MediaDialogFooter/MediaDialogFooter.mjs +22 -27
  72. package/dist/shared/components/MediaDialog/MediaDialogFooter/index.mjs +5 -4
  73. package/dist/shared/components/MediaDialog/MediaDialogToolbar/MediaDialogToolbar.mjs +15 -21
  74. package/dist/shared/components/MediaDialog/MediaDialogToolbar/index.mjs +5 -4
  75. package/dist/shared/components/MediaDialog/index.mjs +9 -12
  76. package/dist/shared/components/Roller/Roller.mjs +99 -132
  77. package/dist/shared/components/Roller/RollerBlock/RollerBlock.mjs +9 -6
  78. package/dist/shared/components/Roller/RollerBlock/index.mjs +5 -4
  79. package/dist/shared/components/Roller/index.mjs +6 -6
  80. package/dist/shared/components/Scheduler/ScheduleBlock/ScheduleBlock.mjs +22 -30
  81. package/dist/shared/components/Scheduler/ScheduleBlock/index.mjs +5 -4
  82. package/dist/shared/components/Scheduler/ScheduleEvent/ScheduleEvent.mjs +25 -35
  83. package/dist/shared/components/Scheduler/ScheduleEvent/index.mjs +5 -4
  84. package/dist/shared/components/Scheduler/Scheduler.mjs +472 -567
  85. package/dist/shared/components/Scheduler/Scheduler.utils.mjs +78 -101
  86. package/dist/shared/components/Scheduler/index.mjs +8 -10
  87. package/dist/shared/components/Swiper/Swiper.mjs +238 -283
  88. package/dist/shared/components/Swiper/Swiper.utils.mjs +19 -24
  89. package/dist/shared/components/Swiper/SwiperBlock/SwiperBlock.mjs +14 -17
  90. package/dist/shared/components/Swiper/SwiperBlock/index.mjs +5 -4
  91. package/dist/shared/components/Swiper/index.mjs +6 -6
  92. package/dist/shared/components/TextField/TextField.mjs +44 -55
  93. package/dist/shared/components/TextField/index.mjs +5 -4
  94. package/dist/shared/components/TimePicker/TimePicker.mjs +2 -120
  95. package/dist/shared/components/TimePicker/index.mjs +5 -4
  96. package/dist/shared/components/index.mjs +36 -75
  97. package/dist/shared/hooks/index.mjs +4 -8
  98. package/dist/shared/hooks/useCombineRef/index.mjs +5 -4
  99. package/dist/shared/hooks/useCombineRef/useCombineRef.mjs +7 -7
  100. package/dist/shared/hooks/useInView/index.mjs +5 -4
  101. package/dist/shared/hooks/useInView/useInView.d.ts +2 -1
  102. package/dist/shared/hooks/useInView/useInView.mjs +37 -47
  103. package/dist/shared/hooks/useIsomorphicLayoutEffect/index.mjs +5 -4
  104. package/dist/shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs +6 -6
  105. package/dist/shared/typings/common.mjs +6 -4
  106. package/dist/shared/typings/index.mjs +2 -4
  107. package/dist/shared/utils/ageToBirthDate/ageToBirthDate.mjs +17 -9
  108. package/dist/shared/utils/ageToBirthDate/index.mjs +5 -4
  109. package/dist/shared/utils/birthDateToAge/birthDateToAge.mjs +9 -10
  110. package/dist/shared/utils/birthDateToAge/index.mjs +4 -3
  111. package/dist/shared/utils/combineRef/combineRef.mjs +20 -23
  112. package/dist/shared/utils/combineRef/index.mjs +5 -4
  113. package/dist/shared/utils/dayFlagToDay/dayFlagToDay.mjs +15 -23
  114. package/dist/shared/utils/dayFlagToDay/index.mjs +5 -4
  115. package/dist/shared/utils/getCareTypeLabel/getCareTypeLabel.mjs +13 -20
  116. package/dist/shared/utils/getCareTypeLabel/index.mjs +5 -4
  117. package/dist/shared/utils/getDateRange/getDateRange.mjs +15 -20
  118. package/dist/shared/utils/getDateRange/index.mjs +5 -4
  119. package/dist/shared/utils/getImageUrl/getImageUrl.mjs +7 -17
  120. package/dist/shared/utils/getImageUrl/index.mjs +5 -6
  121. package/dist/shared/utils/getTimeRange/getTimeRange.mjs +19 -21
  122. package/dist/shared/utils/getTimeRange/index.mjs +5 -4
  123. package/dist/shared/utils/getVimeoId/getVimeoId.mjs +11 -11
  124. package/dist/shared/utils/getVimeoId/index.mjs +5 -4
  125. package/dist/shared/utils/index.mjs +18 -36
  126. package/dist/shared/utils/isAndroid/index.mjs +5 -4
  127. package/dist/shared/utils/isAndroid/isAndroid.mjs +5 -5
  128. package/dist/shared/utils/isApp/index.mjs +5 -4
  129. package/dist/shared/utils/isApp/isApp.mjs +4 -4
  130. package/dist/shared/utils/isDesktop/index.mjs +5 -4
  131. package/dist/shared/utils/isDesktop/isDesktop.mjs +15 -15
  132. package/dist/shared/utils/isIos/index.mjs +5 -4
  133. package/dist/shared/utils/isIos/isIos.mjs +5 -5
  134. package/dist/shared/utils/isServer/index.mjs +4 -3
  135. package/dist/shared/utils/isServer/isServer.mjs +4 -4
  136. package/dist/shared/utils/objectToQueryString/index.mjs +5 -4
  137. package/dist/shared/utils/objectToQueryString/objectToQueryString.mjs +7 -8
  138. package/dist/shared/utils/parseQueryString/index.mjs +4 -3
  139. package/dist/shared/utils/parseQueryString/parseQueryString.mjs +5 -5
  140. package/dist/shared/utils/share/index.mjs +5 -4
  141. package/dist/shared/utils/share/share.mjs +12 -14
  142. package/dist/teacher/home/components/BannerAccount/BannerAccount.fallback.mjs +19 -11
  143. package/dist/teacher/home/components/BannerAccount/BannerAccount.mjs +83 -99
  144. package/dist/teacher/home/components/BannerAccount/index.mjs +6 -7
  145. package/dist/teacher/home/components/Carousel1Account/Carousel1Account.fallback.mjs +127 -67
  146. package/dist/teacher/home/components/Carousel1Account/Carousel1Account.mjs +68 -82
  147. package/dist/teacher/home/components/Carousel1Account/index.mjs +6 -7
  148. package/dist/teacher/home/components/Carousel2Account/Carousel2Account.fallback.mjs +112 -94
  149. package/dist/teacher/home/components/Carousel2Account/Carousel2Account.mjs +79 -85
  150. package/dist/teacher/home/components/Carousel2Account/index.mjs +6 -7
  151. package/dist/teacher/home/components/TextAccount/TextAccount.fallback.mjs +119 -108
  152. package/dist/teacher/home/components/TextAccount/TextAccount.mjs +91 -111
  153. package/dist/teacher/home/components/TextAccount/index.mjs +6 -7
  154. package/dist/teacher/home/components/index.mjs +9 -18
  155. package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.mjs +345 -442
  156. package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/index.mjs +5 -5
  157. package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.mjs +106 -109
  158. package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.utils.mjs +54 -58
  159. package/dist/teacher/profile/components/AbilityCollection/index.mjs +7 -8
  160. package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.mjs +73 -104
  161. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs +81 -95
  162. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/index.mjs +4 -3
  163. package/dist/teacher/profile/components/ActivityGallery/index.mjs +6 -6
  164. package/dist/teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs +148 -194
  165. package/dist/teacher/profile/components/AvailableScheduleSection/index.mjs +5 -4
  166. package/dist/teacher/profile/components/CareNoteSection/CareNote/CareNote.mjs +61 -53
  167. package/dist/teacher/profile/components/CareNoteSection/CareNote/index.mjs +5 -4
  168. package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.mjs +72 -81
  169. package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.utils.mjs +17 -12
  170. package/dist/teacher/profile/components/CareNoteSection/index.mjs +6 -6
  171. package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs +108 -134
  172. package/dist/teacher/profile/components/CareerSection/CareerItem/index.mjs +5 -4
  173. package/dist/teacher/profile/components/CareerSection/CareerSection.mjs +133 -176
  174. package/dist/teacher/profile/components/CareerSection/index.mjs +6 -6
  175. package/dist/teacher/profile/components/CertificateSection/CertificateItem/CertificateItem.mjs +82 -88
  176. package/dist/teacher/profile/components/CertificateSection/CertificateItem/index.mjs +4 -3
  177. package/dist/teacher/profile/components/CertificateSection/CertificateSection.mjs +112 -141
  178. package/dist/teacher/profile/components/CertificateSection/index.mjs +6 -6
  179. package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs +96 -111
  180. package/dist/teacher/profile/components/EducationSection/EducationItem/index.mjs +5 -4
  181. package/dist/teacher/profile/components/EducationSection/EducationSection.mjs +112 -141
  182. package/dist/teacher/profile/components/EducationSection/index.mjs +6 -6
  183. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.mjs +107 -102
  184. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/index.mjs +5 -4
  185. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs +85 -81
  186. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.utils.mjs +17 -12
  187. package/dist/teacher/profile/components/ParentReviewSection/index.mjs +7 -8
  188. package/dist/teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs +43 -36
  189. package/dist/teacher/profile/components/PreferredActivityKeywordGroup/index.mjs +4 -3
  190. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs +44 -31
  191. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs +11 -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,177 +1,134 @@
1
- import { jsxs as i, jsx as n, Fragment as m } from "react/jsx-runtime";
2
- import { useState as S, Children as E, isValidElement as F } from "react";
3
- import { Flexbox as r, Typography as f, Tooltip as Y, Icon as p, Button as M } from "@dotss/ui";
4
- import T from "@dotss/ui/core/useTheme";
5
- import g from "dayjs";
6
- import W from "./CareerItem/CareerItem.mjs";
7
- function U({
8
- children: u,
9
- action: C,
10
- showTooltip: x = !1,
11
- enableToggle: s = !1,
12
- ...o
13
- }) {
14
- const { spacing: w } = T(), [I, b] = S(!1), [l, v] = S(!1), a = E.toArray(u).filter(F).filter((e) => e.type === W), j = a.length > 0, D = a.length > 3, y = a.map((e) => [e.props.startDate, e.props.endDate ?? g().format("YYYY-MM-DD")]).map(([e, t]) => [g(e), g(t)]).map(
15
- ([e, t]) => t.diff(e, "month") < 1 ? 1 : t.diff(e, "month")
16
- ), c = Math.floor(y.reduce((e, t) => e + t, 0) / 12), d = y.reduce((e, t) => e + t, 0) % 12, k = () => v((e) => !e), h = () => b((e) => !e), O = (e) => {
17
- (e.key === "Enter" || e.key === " ") && h();
18
- };
19
- return /* @__PURE__ */ i(
20
- r,
21
- {
22
- tag: "section",
23
- flexDirection: "column",
24
- alignItems: "flex-start",
25
- "aria-labelledby": "career-title",
26
- gap: 2,
27
- ...o,
28
- inlineCSS: {
29
- width: "100%",
30
- ...o == null ? void 0 : o.inlineCSS
31
- },
32
- children: [
33
- /* @__PURE__ */ i(
34
- r,
35
- {
36
- alignItems: "center",
37
- justifyContent: "space-between",
38
- gap: 2,
39
- inlineCSS: { width: "inherit" },
40
- children: [
41
- /* @__PURE__ */ i(
42
- r,
43
- {
44
- alignItems: "center",
45
- justifyContent: "center",
46
- gap: 1,
47
- inlineCSS: { position: "relative" },
48
- children: [
49
- /* @__PURE__ */ n(
50
- f,
51
- {
52
- id: "career-section-title",
53
- tag: "h2",
54
- variant: "h2B",
55
- "aria-label": "선생님 경력 안내",
56
- children: "경력"
57
- }
58
- ),
59
- x && /* @__PURE__ */ n(
60
- Y,
61
- {
62
- open: I,
63
- onClose: h,
64
- color: "secondary",
65
- id: "career-section-tooltip",
66
- bodyId: "career-section-tooltip-body",
67
- body: /* @__PURE__ */ i(
68
- f,
69
- {
70
- tag: "p",
71
- variant: "b4R",
72
- color: "grey.white",
73
- noWrap: !0,
74
- inlineCSS: {
75
- display: "flex",
76
- gap: w.content(1),
77
- "& svg": {
78
- width: "20px !important",
79
- height: "20px !important",
80
- flexShrink: 0
81
- }
82
- },
83
- children: [
84
- "째깍악어가 확인한 정보는",
85
- /* @__PURE__ */ n(p, { name: "CertifiedFill", size: "small", color: "tictoccroc-teacher.brand.green" }),
86
- "인증 마크가 붙어요!"
87
- ]
88
- }
89
- ),
90
- offset: { x: 100 },
91
- arrowOffset: { x: -100 },
92
- children: /* @__PURE__ */ n(
93
- p,
94
- {
95
- role: "button",
96
- tabIndex: 0,
97
- name: "TooltipFill",
98
- size: "small",
99
- color: "grey.50",
100
- onClick: h,
101
- onKeyDown: O,
102
- "aria-label": "추가 정보 안내",
103
- inlineCSS: {
104
- cursor: "pointer"
105
- }
106
- }
107
- )
108
- }
109
- )
110
- ]
111
- }
112
- ),
113
- (c > 0 || d > 0) && /* @__PURE__ */ i(f, { tag: "p", variant: "h4R", inlineCSS: { "& strong": { fontWeight: 700 } }, children: [
114
- "총 ",
115
- c > 0 && /* @__PURE__ */ i(m, { children: [
116
- /* @__PURE__ */ n("strong", { children: c }),
117
- "년"
118
- ] }),
119
- d > 0 && /* @__PURE__ */ i(m, { children: [
120
- c > 0 && /* @__PURE__ */ n(m, { children: " " }),
121
- /* @__PURE__ */ n("strong", { children: d }),
122
- "개월"
123
- ] })
124
- ] })
125
- ]
126
- }
127
- ),
128
- j && /* @__PURE__ */ n(
129
- r,
130
- {
131
- id: "career-section-career-items",
132
- tag: "ul",
133
- flexDirection: "column",
134
- inlineCSS: { width: "inherit" },
135
- children: a.slice(0, !s || l ? void 0 : 3)
136
- }
137
- ),
138
- s && D && /* @__PURE__ */ n(
139
- r,
140
- {
141
- alignItems: "center",
142
- justifyContent: "center",
143
- mt: 2,
144
- inlineCSS: { width: "inherit" },
145
- children: /* @__PURE__ */ n(
146
- M,
147
- {
148
- fullWidth: !0,
149
- variant: "text",
150
- color: "secondary",
151
- endAdornment: /* @__PURE__ */ n(p, { name: l ? "ChevronUpLine" : "ChevronDownLine" }),
152
- onClick: k,
153
- "aria-controls": "career-section-career-items",
154
- "aria-expanded": l,
155
- children: l ? "접기" : "더 보기"
156
- }
157
- )
158
- }
159
- ),
160
- !s && C && /* @__PURE__ */ n(
161
- r,
162
- {
163
- mt: 4,
164
- flexGrow: 1,
165
- alignItems: "center",
166
- justifyContent: "center",
167
- inlineCSS: { width: "inherit" },
168
- children: C
169
- }
170
- )
171
- ]
172
- }
173
- );
1
+ import e from "./CareerItem/index.mjs";
2
+ import { Children as t, isValidElement as n, useState as r } from "react";
3
+ import { Button as i, Flexbox as a, Icon as o, Tooltip as s, Typography as c } from "@dotss/ui";
4
+ import l from "@dotss/ui/core/useTheme";
5
+ import u from "dayjs";
6
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
7
+ //#region teacher/profile/components/CareerSection/CareerSection.tsx
8
+ function m({ children: m, action: h, showTooltip: g = !1, enableToggle: _ = !1, ...v }) {
9
+ let { spacing: y } = l(), [b, x] = r(!1), [S, C] = r(!1), w = t.toArray(m).filter(n).filter((t) => t.type === e), T = w.length > 0, E = w.length > 3, D = w.map((e) => [e.props.startDate, e.props.endDate ?? u().format("YYYY-MM-DD")]).map(([e, t]) => [u(e), u(t)]).map(([e, t]) => t.diff(e, "month") < 1 ? 1 : t.diff(e, "month")), O = Math.floor(D.reduce((e, t) => e + t, 0) / 12), k = D.reduce((e, t) => e + t, 0) % 12, A = () => C((e) => !e), j = () => x((e) => !e), M = (e) => {
10
+ (e.key === "Enter" || e.key === " ") && j();
11
+ };
12
+ return /* @__PURE__ */ p(a, {
13
+ tag: "section",
14
+ flexDirection: "column",
15
+ alignItems: "flex-start",
16
+ "aria-labelledby": "career-title",
17
+ gap: 2,
18
+ ...v,
19
+ inlineCSS: {
20
+ width: "100%",
21
+ ...v?.inlineCSS
22
+ },
23
+ children: [
24
+ /* @__PURE__ */ p(a, {
25
+ alignItems: "center",
26
+ justifyContent: "space-between",
27
+ gap: 2,
28
+ inlineCSS: { width: "inherit" },
29
+ children: [/* @__PURE__ */ p(a, {
30
+ alignItems: "center",
31
+ justifyContent: "center",
32
+ gap: 1,
33
+ inlineCSS: { position: "relative" },
34
+ children: [/* @__PURE__ */ f(c, {
35
+ id: "career-section-title",
36
+ tag: "h2",
37
+ variant: "h2B",
38
+ "aria-label": "선생님 경력 안내",
39
+ children: "경력"
40
+ }), g && /* @__PURE__ */ f(s, {
41
+ open: b,
42
+ onClose: j,
43
+ color: "secondary",
44
+ id: "career-section-tooltip",
45
+ bodyId: "career-section-tooltip-body",
46
+ body: /* @__PURE__ */ p(c, {
47
+ tag: "p",
48
+ variant: "b4R",
49
+ color: "grey.white",
50
+ noWrap: !0,
51
+ inlineCSS: {
52
+ display: "flex",
53
+ gap: y.content(1),
54
+ "& svg": {
55
+ width: "20px !important",
56
+ height: "20px !important",
57
+ flexShrink: 0
58
+ }
59
+ },
60
+ children: [
61
+ "째깍악어가 확인한 정보는",
62
+ /* @__PURE__ */ f(o, {
63
+ name: "CertifiedFill",
64
+ size: "small",
65
+ color: "tictoccroc-teacher.brand.green"
66
+ }),
67
+ "인증 마크가 붙어요!"
68
+ ]
69
+ }),
70
+ offset: { x: 100 },
71
+ arrowOffset: { x: -100 },
72
+ children: /* @__PURE__ */ f(o, {
73
+ role: "button",
74
+ tabIndex: 0,
75
+ name: "TooltipFill",
76
+ size: "small",
77
+ color: "grey.50",
78
+ onClick: j,
79
+ onKeyDown: M,
80
+ "aria-label": "추가 정보 안내",
81
+ inlineCSS: { cursor: "pointer" }
82
+ })
83
+ })]
84
+ }), (O > 0 || k > 0) && /* @__PURE__ */ p(c, {
85
+ tag: "p",
86
+ variant: "h4R",
87
+ inlineCSS: { "& strong": { fontWeight: 700 } },
88
+ children: [
89
+ "총\xA0",
90
+ O > 0 && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("strong", { children: O }), "년"] }),
91
+ k > 0 && /* @__PURE__ */ p(d, { children: [
92
+ O > 0 && /* @__PURE__ */ f(d, { children: "\xA0" }),
93
+ /* @__PURE__ */ f("strong", { children: k }),
94
+ "개월"
95
+ ] })
96
+ ]
97
+ })]
98
+ }),
99
+ T && /* @__PURE__ */ f(a, {
100
+ id: "career-section-career-items",
101
+ tag: "ul",
102
+ flexDirection: "column",
103
+ inlineCSS: { width: "inherit" },
104
+ children: w.slice(0, !_ || S ? void 0 : 3)
105
+ }),
106
+ _ && E && /* @__PURE__ */ f(a, {
107
+ alignItems: "center",
108
+ justifyContent: "center",
109
+ mt: 2,
110
+ inlineCSS: { width: "inherit" },
111
+ children: /* @__PURE__ */ f(i, {
112
+ fullWidth: !0,
113
+ variant: "text",
114
+ color: "secondary",
115
+ endAdornment: /* @__PURE__ */ f(o, { name: S ? "ChevronUpLine" : "ChevronDownLine" }),
116
+ onClick: A,
117
+ "aria-controls": "career-section-career-items",
118
+ "aria-expanded": S,
119
+ children: S ? "접기" : "더 보기"
120
+ })
121
+ }),
122
+ !_ && h && /* @__PURE__ */ f(a, {
123
+ mt: 4,
124
+ flexGrow: 1,
125
+ alignItems: "center",
126
+ justifyContent: "center",
127
+ inlineCSS: { width: "inherit" },
128
+ children: h
129
+ })
130
+ ]
131
+ });
174
132
  }
175
- export {
176
- U as default
177
- };
133
+ //#endregion
134
+ export { m as default };
@@ -1,6 +1,6 @@
1
- import r from "./CareerSection.mjs";
2
- import { default as o } from "./CareerItem/CareerItem.mjs";
3
- export {
4
- o as CareerItem,
5
- r as default
6
- };
1
+ import e from "./CareerItem/index.mjs";
2
+ import t from "./CareerSection.mjs";
3
+ //#region teacher/profile/components/CareerSection/index.ts
4
+ var n = t;
5
+ //#endregion
6
+ export { e as CareerItem, n as default };
@@ -1,89 +1,83 @@
1
- import { jsx as t, jsxs as r } from "react/jsx-runtime";
2
- import { Flexbox as a, Typography as g, Icon as c } from "@dotss/ui";
3
- import y from "@dotss/ui/core/useTheme";
4
- import { useCheckHoverPossible as u } from "@dotss/ui/hooks";
5
- function D({ name: b, acquisitionDate: h, status: o, id: l, ...e }) {
6
- const { isHoverPossible: s } = u(), {
7
- palette: { grey: m },
8
- spacing: d
9
- } = y(), i = typeof e.onClick == "function";
10
- return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ r(
11
- a,
12
- {
13
- role: "button",
14
- tabIndex: i ? 0 : -1,
15
- alignItems: "center",
16
- gap: 1,
17
- pt: 2,
18
- pb: 2,
19
- pl: 4,
20
- pr: 4,
21
- ml: -4,
22
- mr: -4,
23
- onKeyDown: (n) => {
24
- var f;
25
- (n.key === "Enter" || n.key === " ") && (n.preventDefault(), n.currentTarget.click()), (f = e.onKeyDown) == null || f.call(e, n);
26
- },
27
- "aria-labelledby": `certificate-item-name-${l}`,
28
- "aria-describedby": `certificate-item-desc-${l}`,
29
- ...e,
30
- inlineCSS: {
31
- cursor: i ? "pointer" : "default",
32
- ...i && {
33
- "&:active": {
34
- backgroundColor: m[10]
35
- }
36
- },
37
- ...i && s ? {
38
- "&:hover": {
39
- backgroundColor: m[10]
40
- }
41
- } : {},
42
- ...e == null ? void 0 : e.inlineCSS
43
- },
44
- children: [
45
- /* @__PURE__ */ r(a, { flexDirection: "column", gap: 1, flexGrow: 1, children: [
46
- /* @__PURE__ */ t(a, { alignItems: "center", gap: 1, children: /* @__PURE__ */ r(g, { id: `certificate-item-name-${l}`, tag: "p", variant: "b2M", children: [
47
- b,
48
- o === "VERIFIED" && /* @__PURE__ */ t(
49
- c,
50
- {
51
- name: "CertifiedFill",
52
- size: "small",
53
- color: "tictoccroc-teacher.brand.green",
54
- "aria-label": "인증된 자격증 마크",
55
- inlineCSS: {
56
- minWidth: 20,
57
- verticalAlign: "-5px",
58
- marginLeft: d.content(1)
59
- }
60
- }
61
- ),
62
- o === "REJECTED" && /* @__PURE__ */ t(
63
- c,
64
- {
65
- name: "AlertFill",
66
- size: "small",
67
- color: "etc.red",
68
- "aria-label": "인증되지 않은 자격증 마크",
69
- inlineCSS: {
70
- minWidth: 20,
71
- verticalAlign: "-5px",
72
- marginLeft: d.content(1)
73
- }
74
- }
75
- )
76
- ] }) }),
77
- /* @__PURE__ */ r(g, { id: `certificate-item-desc-${l}`, tag: "p", variant: "b5R", color: "grey.50", children: [
78
- h,
79
- " 취득"
80
- ] })
81
- ] }),
82
- i && /* @__PURE__ */ t(c, { name: "ChevronRightLine", size: "xSmall", color: "grey.50" })
83
- ]
84
- }
85
- ) });
1
+ import { Flexbox as e, Icon as t, Typography as n } from "@dotss/ui";
2
+ import r from "@dotss/ui/core/useTheme";
3
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
+ import { useCheckHoverPossible as o } from "@dotss/ui/hooks";
5
+ //#region teacher/profile/components/CertificateSection/CertificateItem/CertificateItem.tsx
6
+ function s({ name: s, acquisitionDate: c, status: l, id: u, ...d }) {
7
+ let { isHoverPossible: f } = o(), { palette: { grey: p }, spacing: m } = r(), h = typeof d.onClick == "function";
8
+ return /* @__PURE__ */ i("li", { children: /* @__PURE__ */ a(e, {
9
+ role: "button",
10
+ tabIndex: h ? 0 : -1,
11
+ alignItems: "center",
12
+ gap: 1,
13
+ pt: 2,
14
+ pb: 2,
15
+ pl: 4,
16
+ pr: 4,
17
+ ml: -4,
18
+ mr: -4,
19
+ onKeyDown: (e) => {
20
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click()), d.onKeyDown?.(e);
21
+ },
22
+ "aria-labelledby": `certificate-item-name-${u}`,
23
+ "aria-describedby": `certificate-item-desc-${u}`,
24
+ ...d,
25
+ inlineCSS: {
26
+ cursor: h ? "pointer" : "default",
27
+ ...h && { "&:active": { backgroundColor: p[10] } },
28
+ ...h && f ? { "&:hover": { backgroundColor: p[10] } } : {},
29
+ ...d?.inlineCSS
30
+ },
31
+ children: [/* @__PURE__ */ a(e, {
32
+ flexDirection: "column",
33
+ gap: 1,
34
+ flexGrow: 1,
35
+ children: [/* @__PURE__ */ i(e, {
36
+ alignItems: "center",
37
+ gap: 1,
38
+ children: /* @__PURE__ */ a(n, {
39
+ id: `certificate-item-name-${u}`,
40
+ tag: "p",
41
+ variant: "b2M",
42
+ children: [
43
+ s,
44
+ l === "VERIFIED" && /* @__PURE__ */ i(t, {
45
+ name: "CertifiedFill",
46
+ size: "small",
47
+ color: "tictoccroc-teacher.brand.green",
48
+ "aria-label": "인증된 자격증 마크",
49
+ inlineCSS: {
50
+ minWidth: 20,
51
+ verticalAlign: "-5px",
52
+ marginLeft: m.content(1)
53
+ }
54
+ }),
55
+ l === "REJECTED" && /* @__PURE__ */ i(t, {
56
+ name: "AlertFill",
57
+ size: "small",
58
+ color: "etc.red",
59
+ "aria-label": "인증되지 않은 자격증 마크",
60
+ inlineCSS: {
61
+ minWidth: 20,
62
+ verticalAlign: "-5px",
63
+ marginLeft: m.content(1)
64
+ }
65
+ })
66
+ ]
67
+ })
68
+ }), /* @__PURE__ */ a(n, {
69
+ id: `certificate-item-desc-${u}`,
70
+ tag: "p",
71
+ variant: "b5R",
72
+ color: "grey.50",
73
+ children: [c, " 취득"]
74
+ })]
75
+ }), h && /* @__PURE__ */ i(t, {
76
+ name: "ChevronRightLine",
77
+ size: "xSmall",
78
+ color: "grey.50"
79
+ })]
80
+ }) });
86
81
  }
87
- export {
88
- D as default
89
- };
82
+ //#endregion
83
+ export { s as default };
@@ -1,4 +1,5 @@
1
1
  import e from "./CertificateItem.mjs";
2
- export {
3
- e as default
4
- };
2
+ //#region teacher/profile/components/CertificateSection/CertificateItem/index.ts
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };