@dotss/tictoccroc 0.11.1 → 0.12.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/index.mjs +100 -96
- package/dist/parent/b2b/components/ActionButtons/ActionButtons.mjs +5 -5
- package/dist/shared/components/Carousel/Carousel.mjs +104 -98
- package/dist/shared/components/Carousel/Carousel.utils.d.ts +8 -0
- package/dist/shared/components/Carousel/Carousel.utils.mjs +12 -0
- package/dist/shared/components/Carousel/Carousel.utils.test.d.ts +1 -0
- package/dist/shared/components/Image/Image.d.ts +1 -0
- package/dist/shared/components/Image/Image.mjs +102 -97
- package/dist/shared/components/Swiper/Swiper.mjs +137 -136
- package/dist/shared/components/Swiper/Swiper.utils.d.ts +10 -0
- package/dist/shared/components/Swiper/Swiper.utils.mjs +13 -2
- package/dist/shared/components/Swiper/Swiper.utils.test.d.ts +1 -0
- package/dist/shared/utils/getHoverChildrenScaleStyle/getHoverChildrenScaleStyle.d.ts +18 -0
- package/dist/shared/utils/getHoverChildrenScaleStyle/getHoverChildrenScaleStyle.mjs +9 -0
- package/dist/shared/utils/getHoverChildrenScaleStyle/getHoverChildrenScaleStyle.test.d.ts +1 -0
- package/dist/shared/utils/getHoverChildrenScaleStyle/index.d.ts +2 -0
- package/dist/shared/utils/getHoverChildrenScaleStyle/index.mjs +5 -0
- package/dist/shared/utils/index.d.ts +1 -0
- package/dist/shared/utils/index.mjs +2 -1
- package/dist/teacher/home/components/Carousel1Account/Carousel1Account.mjs +12 -12
- package/dist/teacher/home/components/Carousel2Account/Carousel2Account.mjs +14 -14
- package/dist/teacher/profile/components/KokTeacherCard/KokTeacherCard.d.ts +21 -0
- package/dist/teacher/profile/components/KokTeacherCard/KokTeacherCard.mjs +202 -0
- package/dist/teacher/profile/components/KokTeacherCard/KokTeacherCard.utils.d.ts +15 -0
- package/dist/teacher/profile/components/KokTeacherCard/KokTeacherCard.utils.mjs +175 -0
- package/dist/teacher/profile/components/KokTeacherCard/index.d.ts +4 -0
- package/dist/teacher/profile/components/KokTeacherCard/index.mjs +6 -0
- package/dist/teacher/profile/components/ProfileSummary/index.d.ts +1 -0
- package/dist/teacher/profile/components/ProfileSummary/index.mjs +4 -3
- package/dist/teacher/profile/components/index.d.ts +2 -0
- package/dist/teacher/profile/components/index.mjs +27 -24
- package/package.json +1 -1
|
@@ -1,116 +1,117 @@
|
|
|
1
1
|
import e from "./SwiperBlock/index.mjs";
|
|
2
2
|
import t from "../MediaDialog/MediaBlock/index.mjs";
|
|
3
|
-
import { createSwipeEvent as n } from "./Swiper.utils.mjs";
|
|
4
|
-
import { Children as
|
|
5
|
-
import { Flexbox as
|
|
6
|
-
import { jsxs as
|
|
3
|
+
import { createSwipeEvent as n, getSwipingTranslateX as r } from "./Swiper.utils.mjs";
|
|
4
|
+
import { Children as i, cloneElement as a, isValidElement as o, useCallback as s, useEffect as c, useRef as l, useState as u } from "react";
|
|
5
|
+
import { Flexbox as d } from "@dotss/ui";
|
|
6
|
+
import { jsxs as f } from "react/jsx-runtime";
|
|
7
7
|
//#region shared/components/Swiper/Swiper.tsx
|
|
8
|
-
function
|
|
9
|
-
let [
|
|
10
|
-
!
|
|
11
|
-
},
|
|
12
|
-
if (!
|
|
13
|
-
|
|
14
|
-
let o = t ||
|
|
8
|
+
function p({ children: p, initialPage: m = 0, onSwipe: h, onSwiping: g, loop: _ = !1, disableSwipe: v = !1, renderPagination: y, inlineCSS: b, autoSwipe: x = !1, autoSwipeInterval: S = 3e3, autoSwipeDuration: C = 1e3, ...w }) {
|
|
9
|
+
let [T, E] = u(m), [D, O] = u(1), k = l(null), A = l(0), j = l(0), M = l(0), N = l(0), P = l(!1), F = l(!0), I = l(""), L = l(m), R = l(!1), z = l(null), B = i.count(p), V = i.toArray(p).filter(o).filter((n) => n.type === e || n.type === t), H = B > 1 && !v, U = i.toArray(V?.[0]).filter(o).filter((n) => n.type === e || n.type === t), W = i.toArray(V?.[V?.length - 1]).filter(o).filter((n) => n.type === e || n.type === t), G = (e, t, n) => {
|
|
10
|
+
!k.current || !H || (I.current = k.current.style.transform, j.current = e, A.current = e + k.current.offsetWidth * (n + 1), M.current = t);
|
|
11
|
+
}, K = s((e, t, r, { isAutoSwiped: i = !1, shouldFocus: a = !1 } = {}) => {
|
|
12
|
+
if (!k.current || !H || !P.current || !F.current) return;
|
|
13
|
+
F.current = !1, k.current.style.transition = i ? `transform ${C}ms` : "transform 0.2s", k.current.style.cursor = "grab", z.current &&= (k.current.removeEventListener("transitionend", z.current), null);
|
|
14
|
+
let o = t || T, s = r || A.current - k.current.offsetWidth * (o + 1) - e, c = k.current.offsetWidth * .1;
|
|
15
15
|
if (Math.abs(s) < c && !t) {
|
|
16
|
-
|
|
17
|
-
realPage:
|
|
18
|
-
totalPages:
|
|
19
|
-
lastPage:
|
|
16
|
+
k.current.style.transform = I.current, P.current = !1, F.current = !0, h?.(n({
|
|
17
|
+
realPage: L.current,
|
|
18
|
+
totalPages: D,
|
|
19
|
+
lastPage: L.current,
|
|
20
20
|
isLoop: !1
|
|
21
21
|
}));
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
|
-
let l = s <= -c && o - 1 < 0, u = s >= c && o + 1 ===
|
|
24
|
+
let l = _ && s <= -c && o - 1 < 0, u = _ && s >= c && o + 1 === D, d = s >= c && o + 1 < D, f = s <= -c && o - 1 >= 0;
|
|
25
25
|
if (l) {
|
|
26
|
-
|
|
27
|
-
realPage:
|
|
28
|
-
totalPages:
|
|
26
|
+
L.current = D - 1, h?.(n({
|
|
27
|
+
realPage: L.current,
|
|
28
|
+
totalPages: D,
|
|
29
29
|
lastPage: 0,
|
|
30
30
|
isLoop: !0
|
|
31
|
-
})),
|
|
31
|
+
})), k.current.style.transform = "translate3d(0, 0, 0)", z.current = (e) => {
|
|
32
32
|
if (e.propertyName === "transform") {
|
|
33
|
-
if (!
|
|
34
|
-
if (
|
|
33
|
+
if (!k.current) return;
|
|
34
|
+
if (k.current.style.transition = "none", k.current.style.transform = `translate3d(calc(-100% * ${D}), 0, 0)`, E(D - 1), P.current = !1, F.current = !0, a) (k.current?.children)?.[D]?.focus();
|
|
35
35
|
else {
|
|
36
36
|
if (i) return;
|
|
37
37
|
document.activeElement?.blur();
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
},
|
|
40
|
+
}, k.current.addEventListener("transitionend", z.current);
|
|
41
41
|
return;
|
|
42
42
|
} else if (u) {
|
|
43
|
-
|
|
44
|
-
realPage:
|
|
45
|
-
totalPages:
|
|
46
|
-
lastPage:
|
|
43
|
+
L.current = 0, h?.(n({
|
|
44
|
+
realPage: L.current,
|
|
45
|
+
totalPages: D,
|
|
46
|
+
lastPage: D - 1,
|
|
47
47
|
isLoop: !0
|
|
48
|
-
})),
|
|
48
|
+
})), k.current.style.transform = `translate3d(calc(-100% * ${o + 2}), 0, 0)`, z.current = (e) => {
|
|
49
49
|
if (e.propertyName === "transform") {
|
|
50
|
-
if (!
|
|
51
|
-
if (
|
|
50
|
+
if (!k.current) return;
|
|
51
|
+
if (k.current.style.transition = "none", k.current.style.transform = "translate3d(-100%, 0, 0)", E(0), P.current = !1, F.current = !0, a) (k.current?.children)?.[1]?.focus();
|
|
52
52
|
else {
|
|
53
53
|
if (i) return;
|
|
54
54
|
document.activeElement?.blur();
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
},
|
|
57
|
+
}, k.current.addEventListener("transitionend", z.current);
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
|
-
d ? (
|
|
61
|
-
realPage:
|
|
62
|
-
totalPages:
|
|
60
|
+
d ? (L.current = o + 1, h?.(n({
|
|
61
|
+
realPage: L.current,
|
|
62
|
+
totalPages: D,
|
|
63
63
|
lastPage: o,
|
|
64
64
|
isLoop: !0
|
|
65
|
-
})),
|
|
66
|
-
realPage:
|
|
67
|
-
totalPages:
|
|
65
|
+
})), E(L.current), k.current.style.transform = `translate3d(calc(-100% * ${o + 2}), 0, 0)`) : f ? (L.current = o - 1, h?.(n({
|
|
66
|
+
realPage: L.current,
|
|
67
|
+
totalPages: D,
|
|
68
68
|
lastPage: o,
|
|
69
69
|
isLoop: !1
|
|
70
|
-
})),
|
|
71
|
-
realPage:
|
|
72
|
-
totalPages:
|
|
73
|
-
lastPage:
|
|
70
|
+
})), E(L.current), k.current.style.transform = `translate3d(calc(-100% * ${o}), 0, 0)`) : (h?.(n({
|
|
71
|
+
realPage: L.current,
|
|
72
|
+
totalPages: D,
|
|
73
|
+
lastPage: L.current,
|
|
74
74
|
isLoop: !1
|
|
75
|
-
})),
|
|
75
|
+
})), k.current.style.transform = I.current), z.current = (e) => {
|
|
76
76
|
if (e.propertyName === "transform") {
|
|
77
|
-
|
|
78
|
-
let e = Array.from(
|
|
77
|
+
P.current = !1, F.current = !0;
|
|
78
|
+
let e = Array.from(k.current?.children ?? []).find((e) => e.getAttribute("aria-current") === "page");
|
|
79
79
|
if (a && e) e.focus();
|
|
80
80
|
else {
|
|
81
81
|
if (i) return;
|
|
82
82
|
document.activeElement?.blur();
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
},
|
|
85
|
+
}, k.current.addEventListener("transitionend", z.current);
|
|
86
86
|
}, [
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
87
|
+
T,
|
|
88
|
+
D,
|
|
89
|
+
h,
|
|
90
|
+
H,
|
|
91
|
+
C,
|
|
92
|
+
_
|
|
93
|
+
]), q = (e) => {
|
|
94
|
+
P.current = !0, G(e.clientX, e.clientY, L.current);
|
|
95
|
+
}, J = (e) => K(e.clientX), Y = (e) => {
|
|
96
|
+
G(e.touches[0].clientX, e.touches[0].clientY, L.current);
|
|
97
|
+
}, X = (e) => K(e.changedTouches[0].clientX), Z = (e) => {
|
|
98
|
+
P.current = !0;
|
|
98
99
|
let t = e - 1;
|
|
99
|
-
|
|
100
|
-
},
|
|
100
|
+
E(t <= 0 ? 0 : t), K(0, e);
|
|
101
|
+
}, Q = (e) => (t) => {
|
|
101
102
|
switch (t.key) {
|
|
102
103
|
case "ArrowRight": {
|
|
103
|
-
if (t.preventDefault(),
|
|
104
|
-
let e =
|
|
105
|
-
if (!
|
|
106
|
-
|
|
104
|
+
if (t.preventDefault(), P.current || !F.current) return;
|
|
105
|
+
let e = L.current === D - 1;
|
|
106
|
+
if (!_ && e) return;
|
|
107
|
+
P.current = !0, K(0, L.current, (k.current?.offsetWidth ?? 0) * .1, { shouldFocus: !0 });
|
|
107
108
|
break;
|
|
108
109
|
}
|
|
109
110
|
case "ArrowLeft": {
|
|
110
|
-
if (t.preventDefault(),
|
|
111
|
-
let e =
|
|
112
|
-
if (!
|
|
113
|
-
|
|
111
|
+
if (t.preventDefault(), P.current || !F.current) return;
|
|
112
|
+
let e = L.current === 0;
|
|
113
|
+
if (!_ && e) return;
|
|
114
|
+
P.current = !0, K(0, L.current, -((k.current?.offsetWidth ?? 0) * .1), { shouldFocus: !0 });
|
|
114
115
|
break;
|
|
115
116
|
}
|
|
116
117
|
case "Enter":
|
|
@@ -122,90 +123,90 @@ function f({ children: f, initialPage: p = 0, onSwipe: m, onSwiping: h, loop: g
|
|
|
122
123
|
}
|
|
123
124
|
e?.(t);
|
|
124
125
|
};
|
|
125
|
-
return
|
|
126
|
-
let e =
|
|
127
|
-
if (!(!
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
if (!g && i && I.current === E - 1) {
|
|
134
|
-
N.current = !1;
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
r.cancelable && r.preventDefault(), h?.(n({
|
|
138
|
-
realPage: I.current,
|
|
139
|
-
totalPages: E,
|
|
140
|
-
lastPage: I.current,
|
|
126
|
+
return c(() => {
|
|
127
|
+
let e = k.current, t = (e, t, i) => {
|
|
128
|
+
if (!(!k.current || !H || !F.current) && (N.current = e - A.current, P.current = P.current || Math.abs(N.current) > 5 && Math.abs(t - M.current) < 5, P.current)) {
|
|
129
|
+
i.cancelable && i.preventDefault(), g?.(n({
|
|
130
|
+
realPage: L.current,
|
|
131
|
+
totalPages: D,
|
|
132
|
+
lastPage: L.current,
|
|
141
133
|
isLoop: !1
|
|
142
|
-
}))
|
|
134
|
+
}));
|
|
135
|
+
let t = r({
|
|
136
|
+
rawTranslateX: N.current,
|
|
137
|
+
fingerDeltaX: e - j.current,
|
|
138
|
+
page: L.current,
|
|
139
|
+
totalPages: D,
|
|
140
|
+
width: k.current.offsetWidth,
|
|
141
|
+
loop: _
|
|
142
|
+
});
|
|
143
|
+
k.current.style.transition = "none", k.current.style.cursor = "grabbing", k.current.style.transform = `translate3d(${t}px, 0, 0)`;
|
|
143
144
|
}
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
return e && (e.addEventListener("mousemove",
|
|
148
|
-
e && (e.removeEventListener("mousemove",
|
|
145
|
+
}, i = (e) => {
|
|
146
|
+
P.current && t(e.clientX, e.clientY, e);
|
|
147
|
+
}, a = (e) => t(e.touches[0].clientX, e.touches[0].clientY, e);
|
|
148
|
+
return e && (e.addEventListener("mousemove", i), e.addEventListener("touchmove", a)), () => {
|
|
149
|
+
e && (e.removeEventListener("mousemove", i), e.removeEventListener("touchmove", a));
|
|
149
150
|
};
|
|
150
151
|
}, [
|
|
151
|
-
|
|
152
|
-
h,
|
|
152
|
+
H,
|
|
153
153
|
g,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
_,
|
|
155
|
+
D
|
|
156
|
+
]), c(() => {
|
|
157
|
+
let e = k.current, t = (e) => {
|
|
158
|
+
F.current || (e.stopPropagation(), e.preventDefault());
|
|
158
159
|
};
|
|
159
160
|
return e?.addEventListener("click", t), () => {
|
|
160
161
|
e?.removeEventListener("click", t);
|
|
161
162
|
};
|
|
162
|
-
}, []),
|
|
163
|
-
let e =
|
|
163
|
+
}, []), c(() => {
|
|
164
|
+
let e = k.current;
|
|
164
165
|
return () => {
|
|
165
|
-
|
|
166
|
+
z.current && e && (e.removeEventListener("transitionend", z.current), z.current = null);
|
|
166
167
|
};
|
|
167
|
-
}, []),
|
|
168
|
-
|
|
169
|
-
}, [
|
|
170
|
-
|
|
171
|
-
}, [
|
|
172
|
-
if (
|
|
168
|
+
}, []), c(() => {
|
|
169
|
+
O(B);
|
|
170
|
+
}, [B]), c(() => {
|
|
171
|
+
k.current && !R.current && (R.current = !0, k.current.style.transition = "none", k.current.style.transform = `translate3d(calc(-100% * ${B < m + 1 ? B : m + 1}), 0, 0)`);
|
|
172
|
+
}, [m, B]), c(() => {
|
|
173
|
+
if (x) {
|
|
173
174
|
let e = setInterval(() => {
|
|
174
|
-
|
|
175
|
-
},
|
|
175
|
+
P.current || !F.current || k.current && (!_ && L.current === D - 1 || document.activeElement && k.current && k.current.contains(document.activeElement) || (P.current = !0, K(0, L.current, (k.current.offsetWidth ?? 0) * .1, { isAutoSwiped: !0 })));
|
|
176
|
+
}, S);
|
|
176
177
|
return () => {
|
|
177
178
|
clearInterval(e);
|
|
178
179
|
};
|
|
179
180
|
}
|
|
180
181
|
}, [
|
|
181
|
-
b,
|
|
182
182
|
x,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
183
|
+
S,
|
|
184
|
+
_,
|
|
185
|
+
D,
|
|
186
|
+
K
|
|
187
|
+
]), /* @__PURE__ */ f(d, {
|
|
187
188
|
flexGrow: 1,
|
|
188
189
|
role: "list",
|
|
189
190
|
"aria-roledescription": "carousel",
|
|
190
191
|
"aria-label": "슬라이더",
|
|
191
|
-
...
|
|
192
|
+
...w,
|
|
192
193
|
inlineCSS: {
|
|
193
194
|
width: "100%",
|
|
194
195
|
position: "relative",
|
|
195
|
-
...
|
|
196
|
+
...b
|
|
196
197
|
},
|
|
197
|
-
children: [/* @__PURE__ */ d
|
|
198
|
-
ref:
|
|
198
|
+
children: [/* @__PURE__ */ f(d, {
|
|
199
|
+
ref: k,
|
|
199
200
|
flexGrow: 1,
|
|
200
|
-
onMouseDown:
|
|
201
|
-
onMouseUp:
|
|
202
|
-
onMouseLeave:
|
|
203
|
-
onTouchStart:
|
|
204
|
-
onTouchEnd:
|
|
205
|
-
onTouchCancel:
|
|
201
|
+
onMouseDown: q,
|
|
202
|
+
onMouseUp: J,
|
|
203
|
+
onMouseLeave: J,
|
|
204
|
+
onTouchStart: Y,
|
|
205
|
+
onTouchEnd: X,
|
|
206
|
+
onTouchCancel: X,
|
|
206
207
|
inlineCSS: {
|
|
207
|
-
"& > div:first-of-type": { visibility:
|
|
208
|
-
"& > div:last-of-type": { visibility:
|
|
208
|
+
"& > div:first-of-type": { visibility: _ ? "visible" : "hidden" },
|
|
209
|
+
"& > div:last-of-type": { visibility: _ ? "visible" : "hidden" }
|
|
209
210
|
},
|
|
210
211
|
style: {
|
|
211
212
|
transition: "transform 0.2s",
|
|
@@ -213,27 +214,27 @@ function f({ children: f, initialPage: p = 0, onSwipe: m, onSwiping: h, loop: g
|
|
|
213
214
|
cursor: "grab"
|
|
214
215
|
},
|
|
215
216
|
children: [
|
|
216
|
-
|
|
217
|
-
|
|
217
|
+
W,
|
|
218
|
+
V.map((e, t) => a(e, {
|
|
218
219
|
role: "listitem",
|
|
219
|
-
tabIndex: t ===
|
|
220
|
-
onKeyDown:
|
|
220
|
+
tabIndex: t === T ? 0 : -1,
|
|
221
|
+
onKeyDown: Q(e.props.onKeyDown),
|
|
221
222
|
"aria-roledescription": "slide",
|
|
222
|
-
"aria-hidden": t !==
|
|
223
|
-
"aria-current": t ===
|
|
224
|
-
"aria-label": `${
|
|
223
|
+
"aria-hidden": t !== T,
|
|
224
|
+
"aria-current": t === T ? "page" : void 0,
|
|
225
|
+
"aria-label": `${D}개 중 ${t + 1}번째 슬라이드`,
|
|
225
226
|
"aria-posinset": t + 1,
|
|
226
|
-
"aria-setsize":
|
|
227
|
+
"aria-setsize": D,
|
|
227
228
|
...e.props
|
|
228
229
|
})),
|
|
229
|
-
|
|
230
|
+
U
|
|
230
231
|
]
|
|
231
|
-
}), typeof
|
|
232
|
-
page:
|
|
233
|
-
totalPages:
|
|
234
|
-
onChange:
|
|
232
|
+
}), typeof y == "function" && y({
|
|
233
|
+
page: T,
|
|
234
|
+
totalPages: D,
|
|
235
|
+
onChange: Z
|
|
235
236
|
})]
|
|
236
237
|
});
|
|
237
238
|
}
|
|
238
239
|
//#endregion
|
|
239
|
-
export {
|
|
240
|
+
export { p as default };
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
export declare const EDGE_RESISTANCE = 0.35;
|
|
2
|
+
export declare function addDamping(distance: number, maxDistance: number, constant?: number): number;
|
|
3
|
+
export declare function getSwipingTranslateX({ rawTranslateX, fingerDeltaX, page, totalPages, width, loop }: {
|
|
4
|
+
rawTranslateX: number;
|
|
5
|
+
fingerDeltaX: number;
|
|
6
|
+
page: number;
|
|
7
|
+
totalPages: number;
|
|
8
|
+
width: number;
|
|
9
|
+
loop: boolean;
|
|
10
|
+
}): number;
|
|
1
11
|
export declare function createSwipeEvent({ realPage, totalPages, lastPage, isLoop }: {
|
|
2
12
|
realPage: number;
|
|
3
13
|
totalPages: number;
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
//#region shared/components/Swiper/Swiper.utils.ts
|
|
2
|
-
|
|
2
|
+
var e = .35;
|
|
3
|
+
function t(t, n, r = e) {
|
|
4
|
+
if (t === 0 || n <= 0) return 0;
|
|
5
|
+
let i = Math.abs(t), a = i * n * r / (n + r * i);
|
|
6
|
+
return Math.sign(t) * a;
|
|
7
|
+
}
|
|
8
|
+
function n({ rawTranslateX: e, fingerDeltaX: n, page: r, totalPages: i, width: a, loop: o }) {
|
|
9
|
+
if (o) return e;
|
|
10
|
+
let s = r === 0 && n > 0, c = r === i - 1 && n < 0;
|
|
11
|
+
return !s && !c ? e : -a * (r + 1) + t(n, a);
|
|
12
|
+
}
|
|
13
|
+
function r({ realPage: e, totalPages: t, lastPage: n, isLoop: r }) {
|
|
3
14
|
return r ? {
|
|
4
15
|
isFirstPage: e === 0,
|
|
5
16
|
isLastPage: e === t - 1,
|
|
@@ -17,4 +28,4 @@ function e({ realPage: e, totalPages: t, lastPage: n, isLoop: r }) {
|
|
|
17
28
|
};
|
|
18
29
|
}
|
|
19
30
|
//#endregion
|
|
20
|
-
export { e as createSwipeEvent };
|
|
31
|
+
export { e as EDGE_RESISTANCE, t as addDamping, r as createSwipeEvent, n as getSwipingTranslateX };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
interface GetHoverChildrenScaleStyleProps {
|
|
3
|
+
selector: keyof HTMLElementTagNameMap;
|
|
4
|
+
scale?: number;
|
|
5
|
+
transitionDuration?: number;
|
|
6
|
+
transitionTimingFunction?: CSSProperties['transitionTimingFunction'];
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export default function getHoverChildrenScaleStyle({ selector, scale, disabled, transitionDuration, transitionTimingFunction }: GetHoverChildrenScaleStyleProps): {
|
|
10
|
+
[x: string]: {
|
|
11
|
+
transition: string;
|
|
12
|
+
transform?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
transform: string;
|
|
15
|
+
transition?: undefined;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region shared/utils/getHoverChildrenScaleStyle/getHoverChildrenScaleStyle.ts
|
|
2
|
+
function e({ selector: e, scale: t = 1.03, disabled: n = !1, transitionDuration: r = .3, transitionTimingFunction: i = "ease-in-out" }) {
|
|
3
|
+
return n ? {} : {
|
|
4
|
+
[`& ${e}`]: { transition: `transform ${r}s ${i}` },
|
|
5
|
+
[`&:hover ${e}`]: { transform: `scale(${t})` }
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { e as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -15,3 +15,4 @@ export { default as share } from './share';
|
|
|
15
15
|
export { default as dayFlagToDay } from './dayFlagToDay';
|
|
16
16
|
export { default as getCareTypeLabel } from './getCareTypeLabel';
|
|
17
17
|
export { default as combineRef } from './combineRef';
|
|
18
|
+
export { default as getHoverChildrenScaleStyle } from './getHoverChildrenScaleStyle';
|
|
@@ -15,4 +15,5 @@ import p from "./getVimeoId/index.mjs";
|
|
|
15
15
|
import m from "./parseQueryString/index.mjs";
|
|
16
16
|
import h from "./share/index.mjs";
|
|
17
17
|
import g from "./getCareTypeLabel/index.mjs";
|
|
18
|
-
|
|
18
|
+
import _ from "./getHoverChildrenScaleStyle/index.mjs";
|
|
19
|
+
export { d as ageToBirthDate, o as birthDateToAge, n as combineRef, r as dayFlagToDay, g as getCareTypeLabel, i as getDateRange, _ as getHoverChildrenScaleStyle, t as getImageUrl, a as getTimeRange, p as getVimeoId, s as isAndroid, l as isApp, u as isDesktop, c as isIos, e as isServer, f as objectToQueryString, m as parseQueryString, h as share };
|
|
@@ -2,20 +2,20 @@ import e from "../../../../shared/components/Image/index.mjs";
|
|
|
2
2
|
import t from "../../../../shared/components/Carousel/CarouselSlide/index.mjs";
|
|
3
3
|
import n from "../../../../shared/components/Carousel/index.mjs";
|
|
4
4
|
import r from "@dotss/ui/core/useTheme";
|
|
5
|
-
import
|
|
6
|
-
import s from "
|
|
7
|
-
import c from "@dotss/ui/
|
|
8
|
-
import l from "@dotss/ui/
|
|
5
|
+
import i from "@dotss/ui/hooks/useCheckHoverPossible/useCheckHoverPossible";
|
|
6
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
import c from "@dotss/ui/Flexbox";
|
|
8
|
+
import l from "@dotss/ui/Typography";
|
|
9
9
|
//#region teacher/home/components/Carousel1Account/Carousel1Account.tsx
|
|
10
10
|
function u({ id: u, title: d, banners: f, onClickBanner: p, imageProps: m, ...h }) {
|
|
11
|
-
let { spacing: g, palette: _ } = r(), { isHoverPossible: v } =
|
|
11
|
+
let { spacing: g, palette: _ } = r(), { isHoverPossible: v } = i(), y = (e, t) => (n) => {
|
|
12
12
|
p && typeof p == "function" && (n.stopPropagation(), n.preventDefault(), p(e, t, n));
|
|
13
13
|
};
|
|
14
|
-
return /* @__PURE__ */ a
|
|
14
|
+
return /* @__PURE__ */ o(a, { children: /* @__PURE__ */ s(c, {
|
|
15
15
|
flexDirection: "column",
|
|
16
16
|
inlineCSS: { width: "100%" },
|
|
17
17
|
...h,
|
|
18
|
-
children: [/* @__PURE__ */
|
|
18
|
+
children: [/* @__PURE__ */ o(l, {
|
|
19
19
|
id: `banner-account-carousel1-${u}`,
|
|
20
20
|
variant: "h2B",
|
|
21
21
|
inlineCSS: {
|
|
@@ -26,11 +26,11 @@ function u({ id: u, title: d, banners: f, onClickBanner: p, imageProps: m, ...h
|
|
|
26
26
|
marginBottom: g.content(3)
|
|
27
27
|
},
|
|
28
28
|
children: d
|
|
29
|
-
}), /* @__PURE__ */
|
|
29
|
+
}), /* @__PURE__ */ o(n, {
|
|
30
30
|
rowCount: 2,
|
|
31
31
|
step: 1,
|
|
32
32
|
spacing: 5,
|
|
33
|
-
children: f.map(({ id: n, title: r, url: i, image:
|
|
33
|
+
children: f.map(({ id: n, title: r, url: i, image: a }) => /* @__PURE__ */ o(t, { children: /* @__PURE__ */ s(c, {
|
|
34
34
|
tag: "a",
|
|
35
35
|
href: i,
|
|
36
36
|
alignItems: "center",
|
|
@@ -43,8 +43,8 @@ function u({ id: u, title: d, banners: f, onClickBanner: p, imageProps: m, ...h
|
|
|
43
43
|
"&:active:not([aria-disabled=\"true\"])": { backgroundColor: _.background.primary },
|
|
44
44
|
...v && { "&:hover:not([aria-disabled=\"true\"])": { backgroundColor: _.background.primary } }
|
|
45
45
|
},
|
|
46
|
-
children: [/* @__PURE__ */
|
|
47
|
-
src:
|
|
46
|
+
children: [/* @__PURE__ */ o(e, {
|
|
47
|
+
src: a || "",
|
|
48
48
|
width: 140,
|
|
49
49
|
height: 98,
|
|
50
50
|
alt: `${r} 이미지`,
|
|
@@ -55,7 +55,7 @@ function u({ id: u, title: d, banners: f, onClickBanner: p, imageProps: m, ...h
|
|
|
55
55
|
enableErrorFallback: !0,
|
|
56
56
|
style: { objectFit: "cover" },
|
|
57
57
|
...m
|
|
58
|
-
}), /* @__PURE__ */
|
|
58
|
+
}), /* @__PURE__ */ o(l, {
|
|
59
59
|
tag: "p",
|
|
60
60
|
variant: "b2M",
|
|
61
61
|
lineClamp: 2,
|
|
@@ -2,21 +2,21 @@ import e from "../../../../shared/components/Image/index.mjs";
|
|
|
2
2
|
import t from "../../../../shared/components/Carousel/CarouselSlide/index.mjs";
|
|
3
3
|
import n from "../../../../shared/components/Carousel/index.mjs";
|
|
4
4
|
import r from "@dotss/ui/core/useTheme";
|
|
5
|
-
import
|
|
6
|
-
import o from "
|
|
7
|
-
import s from "@dotss/ui/
|
|
8
|
-
import c from "@dotss/ui/
|
|
5
|
+
import i from "@dotss/ui/hooks/useCheckHoverPossible/useCheckHoverPossible";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
import s from "@dotss/ui/Flexbox";
|
|
8
|
+
import c from "@dotss/ui/Typography";
|
|
9
9
|
//#region teacher/home/components/Carousel2Account/Carousel2Account.tsx
|
|
10
10
|
function l({ id: l, title: u, banners: d, onClickBanner: f, imageProps: p, ...m }) {
|
|
11
|
-
let { spacing: h, palette: g } = r(), { isHoverPossible: _ } =
|
|
11
|
+
let { spacing: h, palette: g } = r(), { isHoverPossible: _ } = i(), v = (e, t) => (n) => {
|
|
12
12
|
f && typeof f == "function" && (n.stopPropagation(), n.preventDefault(), f(e, t, n));
|
|
13
13
|
};
|
|
14
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ o(s, {
|
|
15
15
|
tag: "section",
|
|
16
16
|
flexDirection: "column",
|
|
17
17
|
inlineCSS: { width: "100%" },
|
|
18
18
|
...m,
|
|
19
|
-
children: [/* @__PURE__ */
|
|
19
|
+
children: [/* @__PURE__ */ a(c, {
|
|
20
20
|
id: `banner-account-carousel2-${l}`,
|
|
21
21
|
variant: "h2B",
|
|
22
22
|
inlineCSS: {
|
|
@@ -27,11 +27,11 @@ function l({ id: l, title: u, banners: d, onClickBanner: f, imageProps: p, ...m
|
|
|
27
27
|
marginBottom: h.content(4)
|
|
28
28
|
},
|
|
29
29
|
children: u
|
|
30
|
-
}), /* @__PURE__ */
|
|
30
|
+
}), /* @__PURE__ */ a(n, {
|
|
31
31
|
rowCount: 1,
|
|
32
32
|
step: 1,
|
|
33
33
|
spacing: 3,
|
|
34
|
-
children: d.map(({ id: n, title: r, subTitle:
|
|
34
|
+
children: d.map(({ id: n, title: r, subTitle: i, url: l, image: u }) => /* @__PURE__ */ a(t, { children: /* @__PURE__ */ o(s, {
|
|
35
35
|
tag: "a",
|
|
36
36
|
href: l,
|
|
37
37
|
flexDirection: "column",
|
|
@@ -44,7 +44,7 @@ function l({ id: l, title: u, banners: d, onClickBanner: f, imageProps: p, ...m
|
|
|
44
44
|
"&:active:not([aria-disabled=\"true\"])": { backgroundColor: g.background.primary },
|
|
45
45
|
..._ && { "&:hover:not([aria-disabled=\"true\"])": { backgroundColor: g.background.primary } }
|
|
46
46
|
},
|
|
47
|
-
children: [/* @__PURE__ */
|
|
47
|
+
children: [/* @__PURE__ */ a(e, {
|
|
48
48
|
src: u || "",
|
|
49
49
|
width: 240,
|
|
50
50
|
height: 168,
|
|
@@ -56,20 +56,20 @@ function l({ id: l, title: u, banners: d, onClickBanner: f, imageProps: p, ...m
|
|
|
56
56
|
enableErrorFallback: !0,
|
|
57
57
|
style: { objectFit: "cover" },
|
|
58
58
|
...p
|
|
59
|
-
}), /* @__PURE__ */
|
|
59
|
+
}), /* @__PURE__ */ o(s, {
|
|
60
60
|
flexDirection: "column",
|
|
61
61
|
gap: 1,
|
|
62
|
-
children: [/* @__PURE__ */
|
|
62
|
+
children: [/* @__PURE__ */ a(c, {
|
|
63
63
|
tag: "p",
|
|
64
64
|
variant: "h4B",
|
|
65
65
|
lineClamp: 1,
|
|
66
66
|
children: r
|
|
67
|
-
}), /* @__PURE__ */
|
|
67
|
+
}), /* @__PURE__ */ a(c, {
|
|
68
68
|
tag: "p",
|
|
69
69
|
variant: "b4R",
|
|
70
70
|
lineClamp: 1,
|
|
71
71
|
color: "grey.70",
|
|
72
|
-
children:
|
|
72
|
+
children: i
|
|
73
73
|
})]
|
|
74
74
|
})]
|
|
75
75
|
}) }, `tictoccroc-carousel2-account-${n}`))
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { CardProps } from 'node_modules/@dotss/ui/Card/Card';
|
|
3
|
+
export interface KokTeacherCardProps extends Omit<CardProps, 'onClick'> {
|
|
4
|
+
idx: number;
|
|
5
|
+
name: string;
|
|
6
|
+
adornmentUrl?: string;
|
|
7
|
+
picture: string;
|
|
8
|
+
introduction: string;
|
|
9
|
+
selected: boolean;
|
|
10
|
+
checkboxSelected?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
onClick?: (idx: number, e: MouseEvent<HTMLDivElement>) => void;
|
|
13
|
+
onClickMore?: (idx: number, e: MouseEvent<HTMLButtonElement>) => void;
|
|
14
|
+
badgeLabel?: ReactNode;
|
|
15
|
+
pictureLabel?: ReactNode;
|
|
16
|
+
infoLabel?: ReactNode;
|
|
17
|
+
chargeLabel?: ReactNode;
|
|
18
|
+
note?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
declare function KokTeacherCard({ idx, name, adornmentUrl, picture, introduction, selected, checkboxSelected, disabled, onClick, onClickMore, badgeLabel, pictureLabel, infoLabel, chargeLabel, note, ...props }: KokTeacherCardProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default KokTeacherCard;
|