@dotss/tictoccroc 0.9.0 → 0.10.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 (28) hide show
  1. package/dist/shared/components/ChatKit/ImageMessage/ImageMessage.mjs +7 -6
  2. package/dist/shared/components/ChatKit/Message/Message.utils.mjs +15 -3
  3. package/dist/shared/components/ChatKit/Message/Message.utils.test.d.ts +1 -0
  4. package/dist/shared/components/Image/Image.mjs +113 -111
  5. package/dist/shared/components/Image/Image.utils.d.ts +7 -0
  6. package/dist/shared/components/Image/Image.utils.mjs +21 -0
  7. package/dist/shared/components/Image/Image.utils.test.d.ts +1 -0
  8. package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.d.ts +3 -1
  9. package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.mjs +25 -24
  10. package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.d.ts +2 -1
  11. package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.mjs +19 -18
  12. package/dist/teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.d.ts +1 -0
  13. package/dist/teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs +29 -28
  14. package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.d.ts +2 -0
  15. package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.mjs +53 -49
  16. package/dist/teacher/profile/components/CareerSection/CareerSection.d.ts +2 -1
  17. package/dist/teacher/profile/components/CareerSection/CareerSection.mjs +25 -24
  18. package/dist/teacher/profile/components/CertificateSection/CertificateSection.d.ts +2 -1
  19. package/dist/teacher/profile/components/CertificateSection/CertificateSection.mjs +21 -20
  20. package/dist/teacher/profile/components/EducationSection/EducationSection.d.ts +2 -1
  21. package/dist/teacher/profile/components/EducationSection/EducationSection.mjs +21 -20
  22. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.d.ts +2 -0
  23. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs +12 -11
  24. package/dist/teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.d.ts +2 -1
  25. package/dist/teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs +4 -3
  26. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.d.ts +2 -1
  27. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs +4 -3
  28. package/package.json +2 -2
@@ -62,22 +62,23 @@ function C({ id: y, assets: b, mine: C, status: w, regDatetime: T, unreadUserCou
62
62
  overflow: "hidden"
63
63
  },
64
64
  children: b.map((e, n) => {
65
- let i = b.length % h === 1 && n === b.length - 1, a = i ? g : v, o = e.state ?? "NORMAL", u = o === "NORMAL" ? void 0 : r(o);
65
+ let i = b.length % h === 1 && n === b.length - 1, a = i ? g : v, o = e.state ?? "NORMAL", u = o === "NORMAL" ? void 0 : r(o), d = !!j, _ = o === "NORMAL" ? `${n + 1}번째 사진` : `${n + 1}번째 사진, ${u}`;
66
66
  return /* @__PURE__ */ p(s, {
67
- tag: "button",
68
- type: "button",
67
+ tag: d ? "button" : "div",
68
+ type: d ? "button" : void 0,
69
+ role: d ? void 0 : "img",
69
70
  flexDirection: "column",
70
71
  justifyContent: "center",
71
72
  alignItems: "center",
72
73
  gap: 1,
73
- onClick: () => j?.(n),
74
- "aria-label": o === "NORMAL" ? `${n + 1}번째 사진 보기` : `${n + 1}번째 사진, ${u}`,
74
+ onClick: d ? () => j(n) : void 0,
75
+ "aria-label": d && o === "NORMAL" ? `${_} 보기` : _,
75
76
  inlineCSS: {
76
77
  gridColumn: i ? "1 / -1" : void 0,
77
78
  padding: 0,
78
79
  border: "none",
79
80
  background: z[20],
80
- cursor: "pointer"
81
+ cursor: d ? "pointer" : "default"
81
82
  },
82
83
  children: o === "NORMAL" ? /* @__PURE__ */ p(t, {
83
84
  src: e.source,
@@ -15,8 +15,20 @@ function t(e) {
15
15
  }))];
16
16
  });
17
17
  }
18
- function n({ mine: t, status: n, unreadUserCount: r, content: i, regDatetime: a }) {
19
- return `${t ? "나" : "상대방"}, ${i}, ${r && r > 0 ? "읽지 않음" : "읽음"}, ${n === "SUCCEEDED" ? "전송됨" : "전송 실패"}, ${e(a).format("YYYY년 MM월 DD일 A h:mm")}`;
18
+ var n = {
19
+ SUCCEEDED: "전송됨",
20
+ FAILED: "전송 실패",
21
+ PENDING: "전송 중"
22
+ };
23
+ function r({ mine: t, status: r, unreadUserCount: i, content: a, regDatetime: o }) {
24
+ let s = n[r];
25
+ return [
26
+ t ? "나" : "상대방",
27
+ a,
28
+ i && i > 0 ? "읽지 않음" : "읽음",
29
+ s,
30
+ e(o).format("YYYY년 MM월 DD일 A h:mm")
31
+ ].join(", ");
20
32
  }
21
33
  //#endregion
22
- export { n as getMessageLabel, t as markMessageGroupBoundaries };
34
+ export { r as getMessageLabel, t as markMessageGroupBoundaries };
@@ -2,134 +2,136 @@ import e from "../../hooks/useInView/index.mjs";
2
2
  import t from "../../hooks/useIsomorphicLayoutEffect/index.mjs";
3
3
  import n from "../../utils/getImageUrl/index.mjs";
4
4
  import r from "./Image.error.mjs";
5
- import { forwardRef as i, useEffect as a, useImperativeHandle as o, useRef as s, useState as c } from "react";
6
- import { Flexbox as l, Skeleton as u } from "@dotss/ui";
7
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
5
+ import { convertHeicToPng as ee, isHeicSource as i } from "./Image.utils.mjs";
6
+ import { forwardRef as a, useEffect as o, useImperativeHandle as s, useRef as c, useState as l } from "react";
7
+ import { Flexbox as u, Skeleton as d } from "@dotss/ui";
8
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
8
9
  //#region shared/components/Image/Image.tsx
9
- var m = i(({ src: i, width: m, height: h, fit: g = "cover", position: _ = "center", alt: v, scale: y = 2, onLoad: b, onLazyLoad: x, lazy: S = !1, borderRadius: C, disabledResizing: w = !1, withIntrinsicRatio: T = !1, enableBlurPlaceholder: E = !1, enableFallback: D = !1, enableErrorFallback: O = !0, renderErrorFallback: k, wrapperProps: A = {}, inViewOptions: j = {}, onError: M, ...N }, P) => {
10
- let F = s(null), I = s(!1), L = s(null);
11
- o(P, () => L.current);
12
- let { isInView: R } = e(F, {
10
+ var h = a(({ src: a, width: h, height: g, fit: _ = "cover", position: v = "center", alt: y, scale: b = 2, onLoad: x, onLazyLoad: S, lazy: C = !1, borderRadius: w, disabledResizing: T = !1, withIntrinsicRatio: E = !1, enableBlurPlaceholder: D = !1, enableFallback: O = !1, enableErrorFallback: k = !0, renderErrorFallback: A, wrapperProps: j = {}, inViewOptions: te = {}, onError: M, ...N }, P) => {
11
+ let F = c(null), I = c(!1), L = c(null), R = c(M);
12
+ R.current = M, s(P, () => L.current);
13
+ let { isInView: z } = e(F, {
13
14
  threshold: .4,
14
- ...j
15
- }), [z, B] = c(!1), [V, H] = c(!1), [U, W] = c(!1), [G, K] = c(!1), [q, J] = c(n({
15
+ ...te
16
+ }), [B, V] = l(!1), [H, U] = l(!1), [W, G] = l(!1), [K, ne] = l(!1), [q, J] = l(n({
16
17
  mode: "original",
17
- src: i,
18
- width: m,
19
- height: h,
20
- fit: g,
21
- position: _,
22
- scale: y,
23
- disabledResizing: w
24
- })), Y = i?.endsWith(".heic"), X = E ? n({
18
+ src: a,
19
+ width: h,
20
+ height: g,
21
+ fit: _,
22
+ position: v,
23
+ scale: b,
24
+ disabledResizing: T
25
+ })), Y = i(a), X = D ? n({
25
26
  mode: "blur",
26
- src: i,
27
- width: m,
28
- fit: g,
29
- position: _,
27
+ src: a,
28
+ width: h,
29
+ fit: _,
30
+ position: v,
30
31
  scale: 1 / 3,
31
- disabledResizing: w
32
+ disabledResizing: T
32
33
  }) : null, Z = (e) => {
33
- H(!0), W(!1), typeof b == "function" && b(e);
34
+ U(!0), G(!1), typeof x == "function" && x(e);
34
35
  }, Q = (e) => {
35
- typeof M == "function" && M(e.nativeEvent), W(!0), H(!1);
36
- }, $ = () => K(!0);
37
- return a(() => {
38
- if (S && F.current) {
36
+ Y && !q.startsWith("blob:") || (typeof M == "function" && M(e.nativeEvent), G(!0), U(!1));
37
+ }, $ = () => ne(!0);
38
+ return o(() => {
39
+ if (C && F.current) {
39
40
  let e = () => {
40
- R && B(!0);
41
+ z && V(!0);
41
42
  };
42
43
  return e(), window.appScreenContent?.addEventListener("scroll", e), window.addEventListener("resize", e), window.addEventListener("orientationchange", e), () => {
43
44
  window.appScreenContent?.removeEventListener("scroll", e), window.removeEventListener("resize", e), window.removeEventListener("orientationchange", e);
44
45
  };
45
46
  }
46
- }), a(() => {
47
- typeof x == "function" && z && !I.current && (I.current = !0, x());
48
- }, [x, z]), t(() => {
49
- let e = L.current, t = (e) => {
50
- window.fetch(i).then(async (t) => {
51
- let n = await t.blob(), r = (await import("heic2any")).default, i = await r({
52
- blob: n,
53
- toType: "image/png"
54
- });
55
- J(URL.createObjectURL(i)), e.onload = () => {
56
- e.style.opacity = "1", H(!0), W(!1), e.onload = null, e.onerror = null;
47
+ }), o(() => {
48
+ typeof S == "function" && B && !I.current && (I.current = !0, S());
49
+ }, [S, B]), t(() => {
50
+ let e = L.current, t = !1, n = (e) => {
51
+ ee(a).then((n) => {
52
+ t || (J(URL.createObjectURL(n)), e.onload = () => {
53
+ e.style.opacity = "1", U(!0), G(!1), e.onload = null, e.onerror = null;
57
54
  }, e.onerror = () => {
58
- W(!0), H(!1), e.onload = null, e.onerror = null;
59
- };
55
+ G(!0), U(!1), e.onload = null, e.onerror = null;
56
+ });
57
+ }).catch((e) => {
58
+ t || (G(!0), U(!1), typeof R.current == "function" && R.current(new ErrorEvent("error", {
59
+ error: e,
60
+ message: e.message
61
+ })));
60
62
  });
61
63
  };
62
- return e?.complete ? Y ? e.src.startsWith("blob:") || (e.style.transition = "opacity 0.3s", e.style.opacity = "0", t(e)) : e.naturalWidth > 0 ? (e.style.transition = "none", e.style.opacity = "1", H(!0)) : (e.style.opacity = "0", W(!0)) : e && (e.style.transition = "opacity 0.3s", e.style.opacity = "0", e.onload = () => {
63
- e.style.opacity = "1", H(!0), e.onload = null;
64
+ return e?.complete ? Y ? e.src.startsWith("blob:") || (e.style.transition = "opacity 0.3s", e.style.opacity = "0", n(e)) : e.naturalWidth > 0 ? (e.style.transition = "none", e.style.opacity = "1", U(!0)) : (e.style.opacity = "0", G(!0)) : e && (e.style.transition = "opacity 0.3s", e.style.opacity = "0", e.onload = () => {
65
+ e.style.opacity = "1", U(!0), e.onload = null;
64
66
  }, e.onerror = () => {
65
67
  if (!Y) {
66
- W(!0), e.onerror = null;
68
+ G(!0), e.onerror = null;
67
69
  return;
68
70
  }
69
- W(!1), e.style.transition = "opacity 0.3s", e.style.opacity = "0", t(e);
71
+ G(!1), e.style.transition = "opacity 0.3s", e.style.opacity = "0", n(e);
70
72
  }), () => {
71
- e && (e.onload = null, e.onerror = null);
73
+ t = !0, e && (e.onload = null, e.onerror = null);
72
74
  };
73
75
  }, [
74
- z,
75
- i,
76
+ B,
77
+ a,
76
78
  Y
77
- ]), a(() => {
79
+ ]), o(() => {
78
80
  J(n({
79
81
  mode: "original",
80
- src: i,
81
- width: m,
82
- height: h,
83
- fit: g,
84
- position: _,
85
- scale: y,
86
- disabledResizing: w
82
+ src: a,
83
+ width: h,
84
+ height: g,
85
+ fit: _,
86
+ position: v,
87
+ scale: b,
88
+ disabledResizing: T
87
89
  }));
88
90
  }, [
89
- i,
90
- m,
91
+ a,
91
92
  h,
92
93
  g,
93
94
  _,
94
- y,
95
- w
96
- ]), S ? /* @__PURE__ */ p(l, {
97
- ...A,
95
+ v,
96
+ b,
97
+ T
98
+ ]), C ? /* @__PURE__ */ m(u, {
99
+ ...j,
98
100
  ref: F,
99
- inlineCSS: T ? {
101
+ inlineCSS: E ? {
100
102
  position: "relative",
101
- paddingTop: `calc(100% / ${m} * ${h})`,
103
+ paddingTop: `calc(100% / ${h} * ${g})`,
102
104
  minWidth: "100%",
103
- borderRadius: C,
105
+ borderRadius: w,
104
106
  overflow: "hidden",
105
- ...A?.inlineCSS
107
+ ...j?.inlineCSS
106
108
  } : {
107
109
  position: "relative",
108
- width: m,
109
- minWidth: m,
110
- height: h,
111
- borderRadius: C,
110
+ width: h,
111
+ minWidth: h,
112
+ height: g,
113
+ borderRadius: w,
112
114
  overflow: "hidden",
113
- ...A?.inlineCSS
115
+ ...j?.inlineCSS
114
116
  },
115
117
  children: [
116
- D && /* @__PURE__ */ f(u, {
118
+ O && /* @__PURE__ */ p(d, {
117
119
  width: "100%",
118
120
  height: "100%",
119
- borderRadius: C || 0,
121
+ borderRadius: w || 0,
120
122
  inlineCSS: {
121
123
  position: "absolute",
122
124
  top: 0,
123
125
  left: 0,
124
- opacity: V || E && G ? 0 : 1,
126
+ opacity: H || D && K ? 0 : 1,
125
127
  transition: "opacity 0.3s"
126
128
  }
127
129
  }),
128
- E && X && z && /* @__PURE__ */ f("img", {
130
+ D && X && B && /* @__PURE__ */ p("img", {
129
131
  src: X,
130
132
  alt: "",
131
- width: m,
132
- height: h,
133
+ width: h,
134
+ height: g,
133
135
  onLoad: $,
134
136
  draggable: !1,
135
137
  style: {
@@ -139,21 +141,21 @@ var m = i(({ src: i, width: m, height: h, fit: g = "cover", position: _ = "cente
139
141
  width: "100%",
140
142
  height: "100%",
141
143
  filter: "blur(5px)",
142
- opacity: G && !V ? 1 : 0,
144
+ opacity: K && !H ? 1 : 0,
143
145
  transition: "opacity 0.3s",
144
- objectFit: g,
145
- objectPosition: _
146
+ objectFit: _,
147
+ objectPosition: v
146
148
  }
147
149
  }),
148
- z && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("img", {
150
+ B && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("img", {
149
151
  ref: L,
150
152
  src: q,
151
- alt: v,
152
- width: m,
153
- height: h,
153
+ alt: y,
154
+ width: h,
155
+ height: g,
154
156
  onLoad: Z,
155
157
  onError: Q,
156
- "aria-hidden": U,
158
+ "aria-hidden": W,
157
159
  draggable: !1,
158
160
  ...N,
159
161
  style: {
@@ -165,46 +167,46 @@ var m = i(({ src: i, width: m, height: h, fit: g = "cover", position: _ = "cente
165
167
  transition: "opacity 0.3s",
166
168
  ...N.style
167
169
  }
168
- }), O && U && (k?.() || /* @__PURE__ */ f(r, {}))] })
170
+ }), k && W && (A?.() || /* @__PURE__ */ p(r, {}))] })
169
171
  ]
170
- }) : /* @__PURE__ */ p(l, {
171
- ...A,
172
+ }) : /* @__PURE__ */ m(u, {
173
+ ...j,
172
174
  ref: F,
173
- inlineCSS: T ? {
175
+ inlineCSS: E ? {
174
176
  position: "relative",
175
- paddingTop: `calc(100% / ${m} * ${h})`,
177
+ paddingTop: `calc(100% / ${h} * ${g})`,
176
178
  minWidth: "100%",
177
179
  transition: "padding-top 0.2s",
178
- borderRadius: C,
180
+ borderRadius: w,
179
181
  overflow: "hidden",
180
- ...A?.inlineCSS
182
+ ...j?.inlineCSS
181
183
  } : {
182
184
  position: "relative",
183
- width: m,
184
- minWidth: m,
185
- height: h,
186
- borderRadius: C,
185
+ width: h,
186
+ minWidth: h,
187
+ height: g,
188
+ borderRadius: w,
187
189
  overflow: "hidden",
188
- ...A?.inlineCSS
190
+ ...j?.inlineCSS
189
191
  },
190
192
  children: [
191
- D && /* @__PURE__ */ f(u, {
193
+ O && /* @__PURE__ */ p(d, {
192
194
  width: "100%",
193
195
  height: "100%",
194
- borderRadius: C || 0,
196
+ borderRadius: w || 0,
195
197
  inlineCSS: {
196
198
  position: "absolute",
197
199
  top: 0,
198
200
  left: 0,
199
- opacity: V || E && G ? 0 : 1,
201
+ opacity: H || D && K ? 0 : 1,
200
202
  transition: "opacity 0.3s"
201
203
  }
202
204
  }),
203
- E && X && /* @__PURE__ */ f("img", {
205
+ D && X && /* @__PURE__ */ p("img", {
204
206
  src: X,
205
207
  alt: "",
206
- width: m,
207
- height: h,
208
+ width: h,
209
+ height: g,
208
210
  onLoad: $,
209
211
  draggable: !1,
210
212
  style: {
@@ -214,19 +216,19 @@ var m = i(({ src: i, width: m, height: h, fit: g = "cover", position: _ = "cente
214
216
  width: "100%",
215
217
  height: "100%",
216
218
  filter: "blur(5px)",
217
- opacity: G && !V ? 1 : 0,
219
+ opacity: K && !H ? 1 : 0,
218
220
  transition: "opacity 0.3s"
219
221
  }
220
222
  }),
221
- /* @__PURE__ */ f("img", {
223
+ /* @__PURE__ */ p("img", {
222
224
  ref: L,
223
225
  src: q,
224
- alt: v,
225
- width: m,
226
- height: h,
226
+ alt: y,
227
+ width: h,
228
+ height: g,
227
229
  onLoad: Z,
228
230
  onError: Q,
229
- "aria-hidden": U,
231
+ "aria-hidden": W,
230
232
  draggable: !1,
231
233
  ...N,
232
234
  style: {
@@ -239,9 +241,9 @@ var m = i(({ src: i, width: m, height: h, fit: g = "cover", position: _ = "cente
239
241
  ...N.style
240
242
  }
241
243
  }),
242
- O && U && (k?.() || /* @__PURE__ */ f(r, {}))
244
+ k && W && (A?.() || /* @__PURE__ */ p(r, {}))
243
245
  ]
244
246
  });
245
247
  });
246
248
  //#endregion
247
- export { m as default };
249
+ export { h as default };
@@ -0,0 +1,7 @@
1
+ export declare function isHeicSource(src?: string): boolean;
2
+ /**
3
+ * heic/heif 원본을 PNG Blob 으로 바꾼다. 같은 src 는 한 번만 변환하고 결과를 공유한다.
4
+ *
5
+ * 실패는 캐시에 남기지 않는다. 소비처의 다시 시도가 같은 src 로 다시 들어오기 때문이다.
6
+ */
7
+ export declare function convertHeicToPng(src: string): Promise<Blob>;
@@ -0,0 +1,21 @@
1
+ //#region shared/components/Image/Image.utils.ts
2
+ var e = [".heic", ".heif"];
3
+ function t(t) {
4
+ let n = t?.toLowerCase() ?? "";
5
+ return e.some((e) => n.endsWith(e));
6
+ }
7
+ var n = /* @__PURE__ */ new Map();
8
+ function r(e) {
9
+ let t = n.get(e);
10
+ if (t) return t;
11
+ let r = window.fetch(e).then((e) => e.blob()).then(async (e) => {
12
+ let { heicTo: t } = await import("heic-to");
13
+ return t({
14
+ blob: e,
15
+ type: "image/png"
16
+ });
17
+ });
18
+ return n.set(e, r), r.catch(() => n.delete(e)), r;
19
+ }
20
+ //#endregion
21
+ export { r as convertHeicToPng, t as isHeicSource };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,8 @@
1
+ import { ReactNode } from 'react';
1
2
  import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
2
3
  export interface AbilityCollectionProps extends FlexboxProps {
3
4
  enableToggle?: boolean;
5
+ description?: ReactNode;
4
6
  }
5
- declare function AbilityCollection({ children, enableToggle, ...props }: AbilityCollectionProps): import("@emotion/react/jsx-runtime").JSX.Element;
7
+ declare function AbilityCollection({ children, enableToggle, description, ...props }: AbilityCollectionProps): import("@emotion/react/jsx-runtime").JSX.Element;
6
8
  export default AbilityCollection;
@@ -4,28 +4,28 @@ import { Button as o, Flexbox as s, Icon as c, Typography as l } from "@dotss/ui
4
4
  import u from "@dotss/ui/core/useTheme";
5
5
  import { jsx as d, jsxs as f } from "react/jsx-runtime";
6
6
  //#region teacher/profile/components/AbilityCollection/AbilityCollection.tsx
7
- function p({ children: p, enableToggle: m = !1, ...h }) {
8
- let { spacing: g } = u(), [_, v] = a(!1), [y, b] = a(0), [x, S] = a(0), C = i(null), w = t.toArray(p).filter(r).filter((t) => t.type === e), T = () => v((e) => !e), E = (e) => (t) => {
7
+ function p({ children: p, enableToggle: m = !1, description: h, ...g }) {
8
+ let { spacing: _ } = u(), [v, y] = a(!1), [b, x] = a(0), [S, C] = a(0), w = i(null), T = t.toArray(p).filter(r).filter((t) => t.type === e), E = () => y((e) => !e), D = (e) => (t) => {
9
9
  let n = Number(t.currentTarget.getAttribute("data-row") || -1), r = Number(t.currentTarget.getAttribute("data-col") || -1);
10
- b(n), S(r), e?.(t);
11
- }, D = (e) => (t) => {
10
+ x(n), C(r), e?.(t);
11
+ }, O = (e) => (t) => {
12
12
  let n = Number(t.currentTarget.getAttribute("data-row") || -1), r = Number(t.currentTarget.getAttribute("data-col") || -1);
13
13
  switch (t.key) {
14
14
  case "ArrowUp":
15
15
  if (t.preventDefault(), n === 0) return;
16
- b(n - 1), C.current?.querySelector(`[data-row="${n - 1}"][data-col="${r}"]`)?.focus();
16
+ x(n - 1), w.current?.querySelector(`[data-row="${n - 1}"][data-col="${r}"]`)?.focus();
17
17
  break;
18
18
  case "ArrowDown":
19
- if (t.preventDefault(), n === 2 || n === 1 && m && !_) return;
20
- b(n + 1), C.current?.querySelector(`[data-row="${n + 1}"][data-col="${r}"]`)?.focus();
19
+ if (t.preventDefault(), n === 2 || n === 1 && m && !v) return;
20
+ x(n + 1), w.current?.querySelector(`[data-row="${n + 1}"][data-col="${r}"]`)?.focus();
21
21
  break;
22
22
  case "ArrowLeft":
23
23
  if (t.preventDefault(), r === 0) return;
24
- S(r - 1), C.current?.querySelector(`[data-row="${n}"][data-col="${r - 1}"]`)?.focus();
24
+ C(r - 1), w.current?.querySelector(`[data-row="${n}"][data-col="${r - 1}"]`)?.focus();
25
25
  break;
26
26
  case "ArrowRight":
27
27
  if (t.preventDefault(), r === 2) return;
28
- S(r + 1), C.current?.querySelector(`[data-row="${n}"][data-col="${r + 1}"]`)?.focus();
28
+ C(r + 1), w.current?.querySelector(`[data-row="${n}"][data-col="${r + 1}"]`)?.focus();
29
29
  break;
30
30
  case "Enter":
31
31
  case " ":
@@ -39,10 +39,10 @@ function p({ children: p, enableToggle: m = !1, ...h }) {
39
39
  flexDirection: "column",
40
40
  gap: 4,
41
41
  "aria-labelledby": "ability-collection-title",
42
- ...h,
42
+ ...g,
43
43
  inlineCSS: {
44
44
  width: "100%",
45
- ...h?.inlineCSS
45
+ ...g?.inlineCSS
46
46
  },
47
47
  children: [
48
48
  /* @__PURE__ */ d(l, {
@@ -51,8 +51,9 @@ function p({ children: p, enableToggle: m = !1, ...h }) {
51
51
  variant: "h2B",
52
52
  children: "능력치 배지"
53
53
  }),
54
+ h,
54
55
  /* @__PURE__ */ d(s, {
55
- ref: C,
56
+ ref: w,
56
57
  id: "ability-badge-grid",
57
58
  role: "grid",
58
59
  gap: 2,
@@ -63,23 +64,23 @@ function p({ children: p, enableToggle: m = !1, ...h }) {
63
64
  display: "grid",
64
65
  gridTemplateColumns: "repeat(3, 1fr)",
65
66
  width: "inherit",
66
- columnGap: g.content(2),
67
- rowGap: g.content(6),
68
- maxHeight: _ ? void 0 : m ? `calc(2 * 74px + ${g.content(12)}px)` : void 0,
67
+ columnGap: _.content(2),
68
+ rowGap: _.content(6),
69
+ maxHeight: v ? void 0 : m ? `calc(2 * 74px + ${_.content(12)}px)` : void 0,
69
70
  overflow: "hidden"
70
71
  },
71
- children: t.map(w, (e, t) => {
72
+ children: t.map(T, (e, t) => {
72
73
  let r = Math.floor(t / 3), i = t % 3;
73
74
  return /* @__PURE__ */ d(s, {
74
75
  role: "gridcell",
75
76
  children: n(e, {
76
- tabIndex: y === r && x === i ? 0 : -1,
77
+ tabIndex: b === r && S === i ? 0 : -1,
77
78
  "data-row": r,
78
79
  "data-col": i,
79
80
  "aria-posinset": t + 1,
80
- "aria-setsize": w.length,
81
- onFocus: E(e.props.onFocus),
82
- onKeyDown: D(e.props.onKeyDown),
81
+ "aria-setsize": T.length,
82
+ onFocus: D(e.props.onFocus),
83
+ onKeyDown: O(e.props.onKeyDown),
83
84
  ...e.props
84
85
  })
85
86
  }, `ability-badge-gridcell-${t}`);
@@ -93,11 +94,11 @@ function p({ children: p, enableToggle: m = !1, ...h }) {
93
94
  fullWidth: !0,
94
95
  variant: "text",
95
96
  color: "secondary",
96
- endAdornment: /* @__PURE__ */ d(c, { name: _ ? "ChevronUpLine" : "ChevronDownLine" }),
97
- onClick: T,
97
+ endAdornment: /* @__PURE__ */ d(c, { name: v ? "ChevronUpLine" : "ChevronDownLine" }),
98
+ onClick: E,
98
99
  "aria-controls": "ability-badge-grid",
99
- "aria-expanded": _,
100
- children: _ ? "접기" : "더 보기"
100
+ "aria-expanded": v,
101
+ children: v ? "접기" : "더 보기"
101
102
  })
102
103
  })
103
104
  ]
@@ -4,8 +4,9 @@ import { MasonryProps } from '../../../../shared/components/Masonry';
4
4
  export interface ActivityGalleryProps extends FlexboxProps {
5
5
  onClickViewAll?: () => void;
6
6
  action?: ReactNode;
7
+ description?: ReactNode;
7
8
  hideHeader?: boolean;
8
9
  masonryProps?: MasonryProps;
9
10
  }
10
- declare function ActivityGallery({ children, onClickViewAll, action, hideHeader, masonryProps: { columnCount, rowCount, spacing, edgeSpacing, direction, defaultContainerWidth, defaultContainerHeight, ...masonryProps }, ...props }: ActivityGalleryProps): import("@emotion/react/jsx-runtime").JSX.Element;
11
+ declare function ActivityGallery({ children, onClickViewAll, action, description, hideHeader, masonryProps: { columnCount, rowCount, spacing, edgeSpacing, direction, defaultContainerWidth, defaultContainerHeight, ...masonryProps }, ...props }: ActivityGalleryProps): import("@emotion/react/jsx-runtime").JSX.Element;
11
12
  export default ActivityGallery;
@@ -4,8 +4,8 @@ import { Children as n, isValidElement as r } from "react";
4
4
  import { Button as i, Flexbox as a, Icon as o, Typography as s } from "@dotss/ui";
5
5
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
6
  //#region teacher/profile/components/ActivityGallery/ActivityGallery.tsx
7
- function u({ children: u, onClickViewAll: d, action: f, hideHeader: p = !1, masonryProps: { columnCount: m = 2, rowCount: h = 2, spacing: g = 2, edgeSpacing: _ = 0, direction: v = "horizontal", defaultContainerWidth: y = 360, defaultContainerHeight: b = 0, ...x } = {}, ...S }) {
8
- let C = n.toArray(u).filter(r).filter((t) => t.type === e), w = C.length > 0, T = (e, t, n) => {
7
+ function u({ children: u, onClickViewAll: d, action: f, description: p, hideHeader: m = !1, masonryProps: { columnCount: h = 2, rowCount: g = 2, spacing: _ = 2, edgeSpacing: v = 0, direction: y = "horizontal", defaultContainerWidth: b = 360, defaultContainerHeight: x = 0, ...S } = {}, ...C }) {
8
+ let w = n.toArray(u).filter(r).filter((t) => t.type === e), T = w.length > 0, E = (e, t, n) => {
9
9
  let r = e.props.type === "VIDEO" || e.props.type === "VIMEO" || e.props.type === "YOUTUBE" ? "동영상" : "사진";
10
10
  r = e.props.primary ? `대표 ${r}` : r;
11
11
  let i = {
@@ -18,16 +18,16 @@ function u({ children: u, onClickViewAll: d, action: f, hideHeader: p = !1, maso
18
18
  return /* @__PURE__ */ l(a, {
19
19
  tag: "section",
20
20
  flexDirection: "column",
21
- "aria-labelledby": p ? void 0 : "activity-gallery-title",
22
- "aria-label": p ? "선생님 활동 갤러리" : void 0,
21
+ "aria-labelledby": m ? void 0 : "activity-gallery-title",
22
+ "aria-label": m ? "선생님 활동 갤러리" : void 0,
23
23
  gap: 4,
24
- ...S,
24
+ ...C,
25
25
  inlineCSS: {
26
26
  width: "100%",
27
- ...S?.inlineCSS
27
+ ...C?.inlineCSS
28
28
  },
29
29
  children: [
30
- !p && /* @__PURE__ */ l(a, {
30
+ !m && /* @__PURE__ */ l(a, {
31
31
  alignItems: "center",
32
32
  justifyContent: "space-between",
33
33
  gap: 2,
@@ -46,19 +46,20 @@ function u({ children: u, onClickViewAll: d, action: f, hideHeader: p = !1, maso
46
46
  children: "전체보기"
47
47
  })]
48
48
  }),
49
- w && /* @__PURE__ */ c(t, {
50
- rowCount: h,
51
- columnCount: m,
52
- spacing: g,
53
- edgeSpacing: _,
54
- direction: v,
55
- defaultContainerWidth: y,
56
- defaultContainerHeight: b,
49
+ p,
50
+ T && /* @__PURE__ */ c(t, {
51
+ rowCount: g,
52
+ columnCount: h,
53
+ spacing: _,
54
+ edgeSpacing: v,
55
+ direction: y,
56
+ defaultContainerWidth: b,
57
+ defaultContainerHeight: x,
57
58
  role: "group",
58
59
  "aria-label": "콘텐츠 목록",
59
- ...x,
60
- children: C.map((e, t) => T(e, t, C.length))
61
- }, C.map((e) => e.key).join(",")),
60
+ ...S,
61
+ children: w.map((e, t) => E(e, t, w.length))
62
+ }, w.map((e) => e.key).join(",")),
62
63
  f && /* @__PURE__ */ c(a, {
63
64
  mt: 2,
64
65
  flexGrow: 1,
@@ -4,6 +4,7 @@ import { SchedulerProps } from '../../../../shared/components/Scheduler';
4
4
  export interface AvailableScheduleSectionProps extends FlexboxProps {
5
5
  title?: string;
6
6
  action?: ReactNode;
7
+ description?: ReactNode;
7
8
  footer?: ReactNode;
8
9
  schedulerProps?: SchedulerProps;
9
10
  enableToggle?: boolean;