@dotss/tictoccroc 0.0.10 → 0.0.11
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e, Fragment as C } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Flexbox as r, Typography as t, Icon as
|
|
2
|
+
import { useState as R, 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
4
|
import G from "@dotss/ui/core/useTheme";
|
|
5
5
|
import K from "dayjs";
|
|
6
6
|
import O from "../../../../shared/components/Image/Image.mjs";
|
|
@@ -8,34 +8,34 @@ import { getLastActiveText as W } from "./ProfileSummary.utils.mjs";
|
|
|
8
8
|
function Y({
|
|
9
9
|
avatar: i,
|
|
10
10
|
introduction: l,
|
|
11
|
-
name:
|
|
11
|
+
name: u,
|
|
12
12
|
grade: f,
|
|
13
13
|
activeHours: S = 0,
|
|
14
|
-
rating:
|
|
15
|
-
reviewCount:
|
|
16
|
-
adronment:
|
|
14
|
+
rating: h = 0,
|
|
15
|
+
reviewCount: p = 0,
|
|
16
|
+
adronment: L,
|
|
17
17
|
lastActiveAt: x,
|
|
18
|
-
action:
|
|
18
|
+
action: v
|
|
19
19
|
}) {
|
|
20
20
|
const {
|
|
21
21
|
palette: { background: y, brand: E, etc: k },
|
|
22
22
|
spacing: a
|
|
23
|
-
} = G(), [
|
|
24
|
-
var
|
|
23
|
+
} = G(), [m, D] = R(!1), [z, T] = R(!1), b = F(null), w = S >= 0 && p > 0, c = x ? K(x) : null, I = c ? W(c) : null, j = (o) => {
|
|
24
|
+
var s, g;
|
|
25
25
|
switch (o.key) {
|
|
26
26
|
case "Enter":
|
|
27
|
-
o.preventDefault(), (
|
|
27
|
+
o.preventDefault(), (s = i.onClick) == null || s.call(i, o);
|
|
28
28
|
break;
|
|
29
29
|
case " ":
|
|
30
|
-
o.preventDefault(), (
|
|
30
|
+
o.preventDefault(), (g = i.onClick) == null || g.call(i, o);
|
|
31
31
|
break;
|
|
32
32
|
}
|
|
33
33
|
}, M = () => D((o) => !o);
|
|
34
34
|
return J(() => {
|
|
35
35
|
const o = () => {
|
|
36
36
|
if (!b.current) return;
|
|
37
|
-
const
|
|
38
|
-
|
|
37
|
+
const s = b.current, g = parseInt(window.getComputedStyle(s).lineHeight), $ = s.scrollHeight, H = Math.ceil($ / g);
|
|
38
|
+
T(H > 4);
|
|
39
39
|
};
|
|
40
40
|
return o(), window.addEventListener("resize", o), () => {
|
|
41
41
|
window.removeEventListener("resize", o);
|
|
@@ -81,9 +81,10 @@ function Y({
|
|
|
81
81
|
width: 88,
|
|
82
82
|
height: 88,
|
|
83
83
|
src: i.src,
|
|
84
|
-
alt: `${
|
|
84
|
+
alt: `${u} 선생님 프로필 이미지`,
|
|
85
85
|
fit: "cover",
|
|
86
86
|
borderRadius: 100,
|
|
87
|
+
role: "presentation",
|
|
87
88
|
style: {
|
|
88
89
|
objectFit: "cover"
|
|
89
90
|
}
|
|
@@ -131,7 +132,7 @@ function Y({
|
|
|
131
132
|
}
|
|
132
133
|
),
|
|
133
134
|
/* @__PURE__ */ e(
|
|
134
|
-
|
|
135
|
+
d,
|
|
135
136
|
{
|
|
136
137
|
name: "AlertFill",
|
|
137
138
|
size: "xSmall",
|
|
@@ -150,172 +151,152 @@ function Y({
|
|
|
150
151
|
]
|
|
151
152
|
}
|
|
152
153
|
),
|
|
153
|
-
(
|
|
154
|
+
(c == null ? void 0 : c.isValid()) && /* @__PURE__ */ e(
|
|
154
155
|
t,
|
|
155
156
|
{
|
|
156
157
|
tag: "p",
|
|
157
158
|
variant: "c3M",
|
|
158
159
|
color: "grey.50",
|
|
159
160
|
inlineCSS: {
|
|
160
|
-
visibility:
|
|
161
|
+
visibility: I ? void 0 : "hidden"
|
|
161
162
|
},
|
|
162
|
-
children:
|
|
163
|
+
children: I || "활동 정보 없음"
|
|
163
164
|
}
|
|
164
165
|
)
|
|
165
166
|
] }),
|
|
166
|
-
/* @__PURE__ */ n(
|
|
167
|
-
r,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
167
|
+
/* @__PURE__ */ n(r, { flexDirection: "column", justifyContent: "flex-start", gap: 3, flexGrow: 1, children: [
|
|
168
|
+
/* @__PURE__ */ n(r, { alignItems: "center", gap: 2, flexWrap: "wrap", children: [
|
|
169
|
+
f && /* @__PURE__ */ e(B, { variant: "outlined", size: "small", color: "blue", "aria-label": `${f} 등급`, children: f }),
|
|
170
|
+
/* @__PURE__ */ n(
|
|
171
|
+
t,
|
|
172
|
+
{
|
|
173
|
+
tag: "p",
|
|
174
|
+
variant: "h2B",
|
|
175
|
+
"aria-label": `${u} 선생님`,
|
|
176
|
+
inlineCSS: {
|
|
177
|
+
flexGrow: 1,
|
|
178
|
+
"& > span": {
|
|
179
|
+
marginLeft: a.content(1),
|
|
180
|
+
fontWeight: 400
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
children: [
|
|
184
|
+
u,
|
|
185
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !0, children: "선생님" })
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
/* @__PURE__ */ e(
|
|
190
|
+
r,
|
|
191
|
+
{
|
|
192
|
+
alignItems: "center",
|
|
193
|
+
inlineCSS: {
|
|
194
|
+
maxHeight: 30
|
|
195
|
+
},
|
|
196
|
+
children: L
|
|
197
|
+
}
|
|
198
|
+
)
|
|
199
|
+
] }),
|
|
200
|
+
/* @__PURE__ */ n(
|
|
201
|
+
r,
|
|
202
|
+
{
|
|
203
|
+
pl: 4,
|
|
204
|
+
pr: 4,
|
|
205
|
+
pt: 2,
|
|
206
|
+
pb: 2,
|
|
207
|
+
justifyContent: "space-around",
|
|
208
|
+
alignItems: "center",
|
|
209
|
+
gap: 5,
|
|
210
|
+
"aria-hidden": !w,
|
|
211
|
+
inlineCSS: {
|
|
212
|
+
borderRadius: 8,
|
|
213
|
+
backgroundColor: y.primary,
|
|
214
|
+
visibility: w ? void 0 : "hidden"
|
|
215
|
+
},
|
|
216
|
+
children: [
|
|
217
|
+
/* @__PURE__ */ n(r, { alignItems: "center", role: "group", "aria-label": `누적 수업 ${S}시간`, children: [
|
|
218
|
+
/* @__PURE__ */ e(d, { name: "TimeLine", size: "xSmall", color: "grey.70" }),
|
|
219
|
+
/* @__PURE__ */ e(
|
|
220
|
+
t,
|
|
221
|
+
{
|
|
222
|
+
tag: "p",
|
|
223
|
+
variant: "h4B",
|
|
224
|
+
inlineCSS: {
|
|
225
|
+
marginLeft: a.content(1),
|
|
226
|
+
color: E.primary.text
|
|
227
|
+
},
|
|
228
|
+
children: S.toLocaleString()
|
|
229
|
+
}
|
|
230
|
+
),
|
|
231
|
+
/* @__PURE__ */ e(
|
|
232
|
+
t,
|
|
233
|
+
{
|
|
234
|
+
tag: "span",
|
|
235
|
+
variant: "b5R",
|
|
236
|
+
color: "grey.70",
|
|
237
|
+
inlineCSS: {
|
|
238
|
+
marginLeft: a.content(0.5)
|
|
239
|
+
},
|
|
240
|
+
children: "시간"
|
|
241
|
+
}
|
|
242
|
+
)
|
|
243
|
+
] }),
|
|
244
|
+
/* @__PURE__ */ n(
|
|
245
|
+
r,
|
|
246
|
+
{
|
|
247
|
+
alignItems: "center",
|
|
248
|
+
role: "group",
|
|
249
|
+
"aria-label": h > 0 ? `평점 ${h}, 리뷰 ${p}개` : `평점 집계중, 리뷰 ${p}개`,
|
|
250
|
+
children: [
|
|
251
|
+
/* @__PURE__ */ e(d, { name: "ReviewLine", size: "xSmall", color: "grey.70" }),
|
|
252
|
+
h > 0 ? /* @__PURE__ */ n(C, { children: [
|
|
253
|
+
/* @__PURE__ */ e(
|
|
254
|
+
t,
|
|
255
|
+
{
|
|
256
|
+
tag: "p",
|
|
257
|
+
variant: "h4B",
|
|
258
|
+
inlineCSS: {
|
|
259
|
+
marginLeft: a.content(1),
|
|
260
|
+
color: E.primary.text
|
|
261
|
+
},
|
|
262
|
+
children: h.toLocaleString()
|
|
207
263
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
justifyContent: "space-around",
|
|
227
|
-
alignItems: "center",
|
|
228
|
-
gap: 5,
|
|
229
|
-
inlineCSS: {
|
|
230
|
-
borderRadius: 8,
|
|
231
|
-
backgroundColor: y.primary
|
|
232
|
-
},
|
|
233
|
-
children: [
|
|
234
|
-
/* @__PURE__ */ n(r, { alignItems: "center", role: "group", "aria-label": `누적 수업 ${S}시간`, children: [
|
|
235
|
-
/* @__PURE__ */ e(s, { name: "TimeLine", size: "xSmall", color: "grey.70" }),
|
|
236
|
-
/* @__PURE__ */ e(
|
|
264
|
+
),
|
|
265
|
+
/* @__PURE__ */ n(
|
|
266
|
+
t,
|
|
267
|
+
{
|
|
268
|
+
tag: "span",
|
|
269
|
+
variant: "b5R",
|
|
270
|
+
color: "grey.70",
|
|
271
|
+
inlineCSS: {
|
|
272
|
+
marginLeft: a.content(0.5)
|
|
273
|
+
},
|
|
274
|
+
children: [
|
|
275
|
+
"(",
|
|
276
|
+
p.toLocaleString(),
|
|
277
|
+
")"
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
)
|
|
281
|
+
] }) : /* @__PURE__ */ e(
|
|
237
282
|
t,
|
|
238
283
|
{
|
|
239
284
|
tag: "p",
|
|
240
|
-
variant: "
|
|
241
|
-
inlineCSS: {
|
|
242
|
-
marginLeft: a.content(1),
|
|
243
|
-
color: E.primary.text
|
|
244
|
-
},
|
|
245
|
-
children: S.toLocaleString()
|
|
246
|
-
}
|
|
247
|
-
),
|
|
248
|
-
/* @__PURE__ */ e(
|
|
249
|
-
t,
|
|
250
|
-
{
|
|
251
|
-
tag: "span",
|
|
252
|
-
variant: "b5R",
|
|
285
|
+
variant: "h4R",
|
|
253
286
|
color: "grey.70",
|
|
254
287
|
inlineCSS: {
|
|
255
|
-
marginLeft: a.content(
|
|
288
|
+
marginLeft: a.content(1)
|
|
256
289
|
},
|
|
257
|
-
children: "
|
|
290
|
+
children: "집계중"
|
|
258
291
|
}
|
|
259
292
|
)
|
|
260
|
-
]
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
children: [
|
|
268
|
-
/* @__PURE__ */ e(s, { name: "ReviewLine", size: "xSmall", color: "grey.70" }),
|
|
269
|
-
p > 0 ? /* @__PURE__ */ n(C, { children: [
|
|
270
|
-
/* @__PURE__ */ e(
|
|
271
|
-
t,
|
|
272
|
-
{
|
|
273
|
-
tag: "p",
|
|
274
|
-
variant: "h4B",
|
|
275
|
-
inlineCSS: {
|
|
276
|
-
marginLeft: a.content(1),
|
|
277
|
-
color: E.primary.text
|
|
278
|
-
},
|
|
279
|
-
children: p.toLocaleString()
|
|
280
|
-
}
|
|
281
|
-
),
|
|
282
|
-
/* @__PURE__ */ n(
|
|
283
|
-
t,
|
|
284
|
-
{
|
|
285
|
-
tag: "span",
|
|
286
|
-
variant: "b5R",
|
|
287
|
-
color: "grey.70",
|
|
288
|
-
inlineCSS: {
|
|
289
|
-
marginLeft: a.content(0.5)
|
|
290
|
-
},
|
|
291
|
-
children: [
|
|
292
|
-
"(",
|
|
293
|
-
h.toLocaleString(),
|
|
294
|
-
")"
|
|
295
|
-
]
|
|
296
|
-
}
|
|
297
|
-
)
|
|
298
|
-
] }) : /* @__PURE__ */ e(
|
|
299
|
-
t,
|
|
300
|
-
{
|
|
301
|
-
tag: "p",
|
|
302
|
-
variant: "h4R",
|
|
303
|
-
color: "grey.70",
|
|
304
|
-
inlineCSS: {
|
|
305
|
-
marginLeft: a.content(1)
|
|
306
|
-
},
|
|
307
|
-
children: "집계중"
|
|
308
|
-
}
|
|
309
|
-
)
|
|
310
|
-
]
|
|
311
|
-
}
|
|
312
|
-
)
|
|
313
|
-
]
|
|
314
|
-
}
|
|
315
|
-
)
|
|
316
|
-
]
|
|
317
|
-
}
|
|
318
|
-
)
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
)
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
)
|
|
299
|
+
] })
|
|
319
300
|
] }),
|
|
320
301
|
/* @__PURE__ */ n(
|
|
321
302
|
r,
|
|
@@ -358,7 +339,7 @@ function Y({
|
|
|
358
339
|
},
|
|
359
340
|
children: [
|
|
360
341
|
l.status === "REJECTED" && /* @__PURE__ */ e(
|
|
361
|
-
|
|
342
|
+
d,
|
|
362
343
|
{
|
|
363
344
|
name: "AlertFill",
|
|
364
345
|
size: "xSmall",
|
|
@@ -381,7 +362,7 @@ function Y({
|
|
|
381
362
|
tag: "dl",
|
|
382
363
|
variant: "b4R",
|
|
383
364
|
color: l.status === "REJECTED" ? "grey.30" : "grey.70",
|
|
384
|
-
lineClamp:
|
|
365
|
+
lineClamp: m ? void 0 : 4,
|
|
385
366
|
inlineCSS: {
|
|
386
367
|
marginTop: a.content(2),
|
|
387
368
|
whiteSpace: "pre-wrap"
|
|
@@ -393,26 +374,26 @@ function Y({
|
|
|
393
374
|
}
|
|
394
375
|
)
|
|
395
376
|
] }),
|
|
396
|
-
|
|
377
|
+
z && /* @__PURE__ */ e(
|
|
397
378
|
A,
|
|
398
379
|
{
|
|
399
380
|
variant: "text",
|
|
400
381
|
size: "xSmall",
|
|
401
382
|
color: "secondary",
|
|
402
|
-
endAdornment: /* @__PURE__ */ e(
|
|
383
|
+
endAdornment: /* @__PURE__ */ e(d, { name: m ? "ChevronUpLine" : "ChevronDownLine" }),
|
|
403
384
|
onClick: M,
|
|
404
|
-
"aria-expanded":
|
|
385
|
+
"aria-expanded": m,
|
|
405
386
|
"aria-controls": "about-me",
|
|
406
387
|
inlineCSS: {
|
|
407
388
|
marginLeft: "auto"
|
|
408
389
|
},
|
|
409
|
-
children:
|
|
390
|
+
children: m ? "접기" : "더 보기"
|
|
410
391
|
}
|
|
411
392
|
)
|
|
412
393
|
]
|
|
413
394
|
}
|
|
414
395
|
),
|
|
415
|
-
|
|
396
|
+
v
|
|
416
397
|
]
|
|
417
398
|
}
|
|
418
399
|
);
|
package/package.json
CHANGED