@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.
- package/dist/shared/components/ChatKit/ImageMessage/ImageMessage.mjs +7 -6
- package/dist/shared/components/ChatKit/Message/Message.utils.mjs +15 -3
- package/dist/shared/components/ChatKit/Message/Message.utils.test.d.ts +1 -0
- package/dist/shared/components/Image/Image.mjs +113 -111
- package/dist/shared/components/Image/Image.utils.d.ts +7 -0
- package/dist/shared/components/Image/Image.utils.mjs +21 -0
- package/dist/shared/components/Image/Image.utils.test.d.ts +1 -0
- package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.d.ts +3 -1
- package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.mjs +25 -24
- package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.d.ts +2 -1
- package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.mjs +19 -18
- package/dist/teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.d.ts +1 -0
- package/dist/teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs +29 -28
- package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.d.ts +2 -0
- package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.mjs +53 -49
- package/dist/teacher/profile/components/CareerSection/CareerSection.d.ts +2 -1
- package/dist/teacher/profile/components/CareerSection/CareerSection.mjs +25 -24
- package/dist/teacher/profile/components/CertificateSection/CertificateSection.d.ts +2 -1
- package/dist/teacher/profile/components/CertificateSection/CertificateSection.mjs +21 -20
- package/dist/teacher/profile/components/EducationSection/EducationSection.d.ts +2 -1
- package/dist/teacher/profile/components/EducationSection/EducationSection.mjs +21 -20
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.d.ts +2 -0
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs +12 -11
- package/dist/teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.d.ts +2 -1
- package/dist/teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs +4 -3
- package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.d.ts +2 -1
- package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs +4 -3
- 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
|
|
74
|
-
"aria-label": o === "NORMAL" ? `${
|
|
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
|
-
|
|
19
|
-
|
|
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 {
|
|
34
|
+
export { r as getMessageLabel, t as markMessageGroupBoundaries };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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
|
|
10
|
-
let F =
|
|
11
|
-
|
|
12
|
-
let { isInView:
|
|
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
|
-
...
|
|
15
|
-
}), [
|
|
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:
|
|
18
|
-
width:
|
|
19
|
-
height:
|
|
20
|
-
fit:
|
|
21
|
-
position:
|
|
22
|
-
scale:
|
|
23
|
-
disabledResizing:
|
|
24
|
-
})), Y = i
|
|
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:
|
|
27
|
-
width:
|
|
28
|
-
fit:
|
|
29
|
-
position:
|
|
27
|
+
src: a,
|
|
28
|
+
width: h,
|
|
29
|
+
fit: _,
|
|
30
|
+
position: v,
|
|
30
31
|
scale: 1 / 3,
|
|
31
|
-
disabledResizing:
|
|
32
|
+
disabledResizing: T
|
|
32
33
|
}) : null, Z = (e) => {
|
|
33
|
-
|
|
34
|
+
U(!0), G(!1), typeof x == "function" && x(e);
|
|
34
35
|
}, Q = (e) => {
|
|
35
|
-
typeof M == "function" && M(e.nativeEvent),
|
|
36
|
-
}, $ = () =>
|
|
37
|
-
return
|
|
38
|
-
if (
|
|
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
|
-
|
|
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
|
-
}),
|
|
47
|
-
typeof
|
|
48
|
-
}, [
|
|
49
|
-
let e = L.current, t = (e) => {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
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",
|
|
63
|
-
e.style.opacity = "1",
|
|
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
|
-
|
|
68
|
+
G(!0), e.onerror = null;
|
|
67
69
|
return;
|
|
68
70
|
}
|
|
69
|
-
|
|
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
|
-
|
|
75
|
-
|
|
76
|
+
B,
|
|
77
|
+
a,
|
|
76
78
|
Y
|
|
77
|
-
]),
|
|
79
|
+
]), o(() => {
|
|
78
80
|
J(n({
|
|
79
81
|
mode: "original",
|
|
80
|
-
src:
|
|
81
|
-
width:
|
|
82
|
-
height:
|
|
83
|
-
fit:
|
|
84
|
-
position:
|
|
85
|
-
scale:
|
|
86
|
-
disabledResizing:
|
|
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
|
-
|
|
90
|
-
m,
|
|
91
|
+
a,
|
|
91
92
|
h,
|
|
92
93
|
g,
|
|
93
94
|
_,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
v,
|
|
96
|
+
b,
|
|
97
|
+
T
|
|
98
|
+
]), C ? /* @__PURE__ */ m(u, {
|
|
99
|
+
...j,
|
|
98
100
|
ref: F,
|
|
99
|
-
inlineCSS:
|
|
101
|
+
inlineCSS: E ? {
|
|
100
102
|
position: "relative",
|
|
101
|
-
paddingTop: `calc(100% / ${
|
|
103
|
+
paddingTop: `calc(100% / ${h} * ${g})`,
|
|
102
104
|
minWidth: "100%",
|
|
103
|
-
borderRadius:
|
|
105
|
+
borderRadius: w,
|
|
104
106
|
overflow: "hidden",
|
|
105
|
-
...
|
|
107
|
+
...j?.inlineCSS
|
|
106
108
|
} : {
|
|
107
109
|
position: "relative",
|
|
108
|
-
width:
|
|
109
|
-
minWidth:
|
|
110
|
-
height:
|
|
111
|
-
borderRadius:
|
|
110
|
+
width: h,
|
|
111
|
+
minWidth: h,
|
|
112
|
+
height: g,
|
|
113
|
+
borderRadius: w,
|
|
112
114
|
overflow: "hidden",
|
|
113
|
-
...
|
|
115
|
+
...j?.inlineCSS
|
|
114
116
|
},
|
|
115
117
|
children: [
|
|
116
|
-
|
|
118
|
+
O && /* @__PURE__ */ p(d, {
|
|
117
119
|
width: "100%",
|
|
118
120
|
height: "100%",
|
|
119
|
-
borderRadius:
|
|
121
|
+
borderRadius: w || 0,
|
|
120
122
|
inlineCSS: {
|
|
121
123
|
position: "absolute",
|
|
122
124
|
top: 0,
|
|
123
125
|
left: 0,
|
|
124
|
-
opacity:
|
|
126
|
+
opacity: H || D && K ? 0 : 1,
|
|
125
127
|
transition: "opacity 0.3s"
|
|
126
128
|
}
|
|
127
129
|
}),
|
|
128
|
-
|
|
130
|
+
D && X && B && /* @__PURE__ */ p("img", {
|
|
129
131
|
src: X,
|
|
130
132
|
alt: "",
|
|
131
|
-
width:
|
|
132
|
-
height:
|
|
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:
|
|
144
|
+
opacity: K && !H ? 1 : 0,
|
|
143
145
|
transition: "opacity 0.3s",
|
|
144
|
-
objectFit:
|
|
145
|
-
objectPosition:
|
|
146
|
+
objectFit: _,
|
|
147
|
+
objectPosition: v
|
|
146
148
|
}
|
|
147
149
|
}),
|
|
148
|
-
|
|
150
|
+
B && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("img", {
|
|
149
151
|
ref: L,
|
|
150
152
|
src: q,
|
|
151
|
-
alt:
|
|
152
|
-
width:
|
|
153
|
-
height:
|
|
153
|
+
alt: y,
|
|
154
|
+
width: h,
|
|
155
|
+
height: g,
|
|
154
156
|
onLoad: Z,
|
|
155
157
|
onError: Q,
|
|
156
|
-
"aria-hidden":
|
|
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
|
-
}),
|
|
170
|
+
}), k && W && (A?.() || /* @__PURE__ */ p(r, {}))] })
|
|
169
171
|
]
|
|
170
|
-
}) : /* @__PURE__ */
|
|
171
|
-
...
|
|
172
|
+
}) : /* @__PURE__ */ m(u, {
|
|
173
|
+
...j,
|
|
172
174
|
ref: F,
|
|
173
|
-
inlineCSS:
|
|
175
|
+
inlineCSS: E ? {
|
|
174
176
|
position: "relative",
|
|
175
|
-
paddingTop: `calc(100% / ${
|
|
177
|
+
paddingTop: `calc(100% / ${h} * ${g})`,
|
|
176
178
|
minWidth: "100%",
|
|
177
179
|
transition: "padding-top 0.2s",
|
|
178
|
-
borderRadius:
|
|
180
|
+
borderRadius: w,
|
|
179
181
|
overflow: "hidden",
|
|
180
|
-
...
|
|
182
|
+
...j?.inlineCSS
|
|
181
183
|
} : {
|
|
182
184
|
position: "relative",
|
|
183
|
-
width:
|
|
184
|
-
minWidth:
|
|
185
|
-
height:
|
|
186
|
-
borderRadius:
|
|
185
|
+
width: h,
|
|
186
|
+
minWidth: h,
|
|
187
|
+
height: g,
|
|
188
|
+
borderRadius: w,
|
|
187
189
|
overflow: "hidden",
|
|
188
|
-
...
|
|
190
|
+
...j?.inlineCSS
|
|
189
191
|
},
|
|
190
192
|
children: [
|
|
191
|
-
|
|
193
|
+
O && /* @__PURE__ */ p(d, {
|
|
192
194
|
width: "100%",
|
|
193
195
|
height: "100%",
|
|
194
|
-
borderRadius:
|
|
196
|
+
borderRadius: w || 0,
|
|
195
197
|
inlineCSS: {
|
|
196
198
|
position: "absolute",
|
|
197
199
|
top: 0,
|
|
198
200
|
left: 0,
|
|
199
|
-
opacity:
|
|
201
|
+
opacity: H || D && K ? 0 : 1,
|
|
200
202
|
transition: "opacity 0.3s"
|
|
201
203
|
}
|
|
202
204
|
}),
|
|
203
|
-
|
|
205
|
+
D && X && /* @__PURE__ */ p("img", {
|
|
204
206
|
src: X,
|
|
205
207
|
alt: "",
|
|
206
|
-
width:
|
|
207
|
-
height:
|
|
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:
|
|
219
|
+
opacity: K && !H ? 1 : 0,
|
|
218
220
|
transition: "opacity 0.3s"
|
|
219
221
|
}
|
|
220
222
|
}),
|
|
221
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ p("img", {
|
|
222
224
|
ref: L,
|
|
223
225
|
src: q,
|
|
224
|
-
alt:
|
|
225
|
-
width:
|
|
226
|
-
height:
|
|
226
|
+
alt: y,
|
|
227
|
+
width: h,
|
|
228
|
+
height: g,
|
|
227
229
|
onLoad: Z,
|
|
228
230
|
onError: Q,
|
|
229
|
-
"aria-hidden":
|
|
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
|
-
|
|
244
|
+
k && W && (A?.() || /* @__PURE__ */ p(r, {}))
|
|
243
245
|
]
|
|
244
246
|
});
|
|
245
247
|
});
|
|
246
248
|
//#endregion
|
|
247
|
-
export {
|
|
249
|
+
export { h as default };
|
|
@@ -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,
|
|
8
|
-
let { spacing:
|
|
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
|
-
|
|
11
|
-
},
|
|
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
|
-
|
|
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 && !
|
|
20
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
...
|
|
42
|
+
...g,
|
|
43
43
|
inlineCSS: {
|
|
44
44
|
width: "100%",
|
|
45
|
-
...
|
|
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:
|
|
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:
|
|
67
|
-
rowGap:
|
|
68
|
-
maxHeight:
|
|
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(
|
|
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:
|
|
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":
|
|
81
|
-
onFocus:
|
|
82
|
-
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:
|
|
97
|
-
onClick:
|
|
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,
|
|
8
|
-
let
|
|
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":
|
|
22
|
-
"aria-label":
|
|
21
|
+
"aria-labelledby": m ? void 0 : "activity-gallery-title",
|
|
22
|
+
"aria-label": m ? "선생님 활동 갤러리" : void 0,
|
|
23
23
|
gap: 4,
|
|
24
|
-
...
|
|
24
|
+
...C,
|
|
25
25
|
inlineCSS: {
|
|
26
26
|
width: "100%",
|
|
27
|
-
...
|
|
27
|
+
...C?.inlineCSS
|
|
28
28
|
},
|
|
29
29
|
children: [
|
|
30
|
-
!
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
...
|
|
60
|
-
children:
|
|
61
|
-
},
|
|
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,
|
package/dist/teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.d.ts
CHANGED
|
@@ -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;
|