@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.
Files changed (32) hide show
  1. package/dist/index.mjs +100 -96
  2. package/dist/parent/b2b/components/ActionButtons/ActionButtons.mjs +5 -5
  3. package/dist/shared/components/Carousel/Carousel.mjs +104 -98
  4. package/dist/shared/components/Carousel/Carousel.utils.d.ts +8 -0
  5. package/dist/shared/components/Carousel/Carousel.utils.mjs +12 -0
  6. package/dist/shared/components/Carousel/Carousel.utils.test.d.ts +1 -0
  7. package/dist/shared/components/Image/Image.d.ts +1 -0
  8. package/dist/shared/components/Image/Image.mjs +102 -97
  9. package/dist/shared/components/Swiper/Swiper.mjs +137 -136
  10. package/dist/shared/components/Swiper/Swiper.utils.d.ts +10 -0
  11. package/dist/shared/components/Swiper/Swiper.utils.mjs +13 -2
  12. package/dist/shared/components/Swiper/Swiper.utils.test.d.ts +1 -0
  13. package/dist/shared/utils/getHoverChildrenScaleStyle/getHoverChildrenScaleStyle.d.ts +18 -0
  14. package/dist/shared/utils/getHoverChildrenScaleStyle/getHoverChildrenScaleStyle.mjs +9 -0
  15. package/dist/shared/utils/getHoverChildrenScaleStyle/getHoverChildrenScaleStyle.test.d.ts +1 -0
  16. package/dist/shared/utils/getHoverChildrenScaleStyle/index.d.ts +2 -0
  17. package/dist/shared/utils/getHoverChildrenScaleStyle/index.mjs +5 -0
  18. package/dist/shared/utils/index.d.ts +1 -0
  19. package/dist/shared/utils/index.mjs +2 -1
  20. package/dist/teacher/home/components/Carousel1Account/Carousel1Account.mjs +12 -12
  21. package/dist/teacher/home/components/Carousel2Account/Carousel2Account.mjs +14 -14
  22. package/dist/teacher/profile/components/KokTeacherCard/KokTeacherCard.d.ts +21 -0
  23. package/dist/teacher/profile/components/KokTeacherCard/KokTeacherCard.mjs +202 -0
  24. package/dist/teacher/profile/components/KokTeacherCard/KokTeacherCard.utils.d.ts +15 -0
  25. package/dist/teacher/profile/components/KokTeacherCard/KokTeacherCard.utils.mjs +175 -0
  26. package/dist/teacher/profile/components/KokTeacherCard/index.d.ts +4 -0
  27. package/dist/teacher/profile/components/KokTeacherCard/index.mjs +6 -0
  28. package/dist/teacher/profile/components/ProfileSummary/index.d.ts +1 -0
  29. package/dist/teacher/profile/components/ProfileSummary/index.mjs +4 -3
  30. package/dist/teacher/profile/components/index.d.ts +2 -0
  31. package/dist/teacher/profile/components/index.mjs +27 -24
  32. 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 r, cloneElement as i, isValidElement as a, useCallback as o, useEffect as s, useRef as c, useState as l } from "react";
5
- import { Flexbox as u } from "@dotss/ui";
6
- import { jsxs as d } from "react/jsx-runtime";
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 f({ children: f, initialPage: p = 0, onSwipe: m, onSwiping: h, loop: g = !1, disableSwipe: _ = !1, renderPagination: v, inlineCSS: y, autoSwipe: b = !1, autoSwipeInterval: x = 3e3, autoSwipeDuration: S = 1e3, ...C }) {
9
- let [w, T] = l(p), [E, D] = l(1), O = c(null), k = c(0), A = c(0), j = c(0), M = c(0), N = c(!1), P = c(!0), F = c(""), I = c(p), L = c(!1), R = c(null), z = r.count(f), B = r.toArray(f).filter(a).filter((n) => n.type === e || n.type === t), V = z > 1 && !_, H = r.toArray(B?.[0]).filter(a).filter((n) => n.type === e || n.type === t), U = r.toArray(B?.[B?.length - 1]).filter(a).filter((n) => n.type === e || n.type === t), W = (e, t, n) => {
10
- !O.current || !V || (F.current = O.current.style.transform, A.current = e, k.current = e + O.current.offsetWidth * (n + 1), j.current = t);
11
- }, G = o((e, t, r, { isAutoSwiped: i = !1, shouldFocus: a = !1 } = {}) => {
12
- if (!O.current || !V || !N.current || !P.current) return;
13
- P.current = !1, O.current.style.transition = i ? `transform ${S}ms` : "transform 0.2s", O.current.style.cursor = "grab", R.current &&= (O.current.removeEventListener("transitionend", R.current), null);
14
- let o = t || w, s = r || k.current - O.current.offsetWidth * (o + 1) - e, c = O.current.offsetWidth * .1;
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
- O.current.style.transform = F.current, N.current = !1, P.current = !0, m?.(n({
17
- realPage: I.current,
18
- totalPages: E,
19
- lastPage: I.current,
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 === E, d = s >= c && o + 1 < E, f = s <= -c && o - 1 >= 0;
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
- I.current = E - 1, m?.(n({
27
- realPage: I.current,
28
- totalPages: E,
26
+ L.current = D - 1, h?.(n({
27
+ realPage: L.current,
28
+ totalPages: D,
29
29
  lastPage: 0,
30
30
  isLoop: !0
31
- })), O.current.style.transform = "translate3d(0, 0, 0)", R.current = (e) => {
31
+ })), k.current.style.transform = "translate3d(0, 0, 0)", z.current = (e) => {
32
32
  if (e.propertyName === "transform") {
33
- if (!O.current) return;
34
- if (O.current.style.transition = "none", O.current.style.transform = `translate3d(calc(-100% * ${E}), 0, 0)`, T(E - 1), N.current = !1, P.current = !0, a) (O.current?.children)?.[E]?.focus();
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
- }, O.current.addEventListener("transitionend", R.current);
40
+ }, k.current.addEventListener("transitionend", z.current);
41
41
  return;
42
42
  } else if (u) {
43
- I.current = 0, m?.(n({
44
- realPage: I.current,
45
- totalPages: E,
46
- lastPage: E - 1,
43
+ L.current = 0, h?.(n({
44
+ realPage: L.current,
45
+ totalPages: D,
46
+ lastPage: D - 1,
47
47
  isLoop: !0
48
- })), O.current.style.transform = `translate3d(calc(-100% * ${o + 2}), 0, 0)`, R.current = (e) => {
48
+ })), k.current.style.transform = `translate3d(calc(-100% * ${o + 2}), 0, 0)`, z.current = (e) => {
49
49
  if (e.propertyName === "transform") {
50
- if (!O.current) return;
51
- if (O.current.style.transition = "none", O.current.style.transform = "translate3d(-100%, 0, 0)", T(0), N.current = !1, P.current = !0, a) (O.current?.children)?.[1]?.focus();
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
- }, O.current.addEventListener("transitionend", R.current);
57
+ }, k.current.addEventListener("transitionend", z.current);
58
58
  return;
59
59
  }
60
- d ? (I.current = o + 1, m?.(n({
61
- realPage: I.current,
62
- totalPages: E,
60
+ d ? (L.current = o + 1, h?.(n({
61
+ realPage: L.current,
62
+ totalPages: D,
63
63
  lastPage: o,
64
64
  isLoop: !0
65
- })), T(I.current), O.current.style.transform = `translate3d(calc(-100% * ${o + 2}), 0, 0)`) : f ? (I.current = o - 1, m?.(n({
66
- realPage: I.current,
67
- totalPages: E,
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
- })), T(I.current), O.current.style.transform = `translate3d(calc(-100% * ${o}), 0, 0)`) : (m?.(n({
71
- realPage: I.current,
72
- totalPages: E,
73
- lastPage: I.current,
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
- })), O.current.style.transform = F.current), R.current = (e) => {
75
+ })), k.current.style.transform = I.current), z.current = (e) => {
76
76
  if (e.propertyName === "transform") {
77
- N.current = !1, P.current = !0;
78
- let e = Array.from(O.current?.children ?? []).find((e) => e.getAttribute("aria-current") === "page");
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
- }, O.current.addEventListener("transitionend", R.current);
85
+ }, k.current.addEventListener("transitionend", z.current);
86
86
  }, [
87
- w,
88
- E,
89
- m,
90
- V,
91
- S
92
- ]), K = (e) => {
93
- N.current = !0, W(e.clientX, e.clientY, I.current);
94
- }, q = (e) => G(e.clientX), J = (e) => {
95
- W(e.touches[0].clientX, e.touches[0].clientY, I.current);
96
- }, Y = (e) => G(e.changedTouches[0].clientX), X = (e) => {
97
- N.current = !0;
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
- T(t <= 0 ? 0 : t), G(0, e);
100
- }, Z = (e) => (t) => {
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(), N.current || !P.current) return;
104
- let e = I.current === E - 1;
105
- if (!g && e) return;
106
- N.current = !0, G(0, I.current, (O.current?.offsetWidth ?? 0) * .1, { shouldFocus: !0 });
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(), N.current || !P.current) return;
111
- let e = I.current === 0;
112
- if (!g && e) return;
113
- N.current = !0, G(0, I.current, -((O.current?.offsetWidth ?? 0) * .1), { shouldFocus: !0 });
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 s(() => {
126
- let e = O.current, t = (e, t, r) => {
127
- if (!(!O.current || !V || !P.current) && (M.current = e - k.current, N.current = N.current || Math.abs(M.current) > 5 && Math.abs(t - j.current) < 5, N.current)) {
128
- let t = A.current < e, i = A.current > e;
129
- if (!g && t && I.current === 0) {
130
- N.current = !1;
131
- return;
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
- })), O.current.style.transition = "none", O.current.style.cursor = "grabbing", O.current.style.transform = `translate3d(${M.current}px, 0, 0)`;
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
- }, r = (e) => {
145
- N.current && t(e.clientX, e.clientY, e);
146
- }, i = (e) => t(e.touches[0].clientX, e.touches[0].clientY, e);
147
- return e && (e.addEventListener("mousemove", r), e.addEventListener("touchmove", i)), () => {
148
- e && (e.removeEventListener("mousemove", r), e.removeEventListener("touchmove", i));
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
- V,
152
- h,
152
+ H,
153
153
  g,
154
- E
155
- ]), s(() => {
156
- let e = O.current, t = (e) => {
157
- P.current || (e.stopPropagation(), e.preventDefault());
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
- }, []), s(() => {
163
- let e = O.current;
163
+ }, []), c(() => {
164
+ let e = k.current;
164
165
  return () => {
165
- R.current && e && (e.removeEventListener("transitionend", R.current), R.current = null);
166
+ z.current && e && (e.removeEventListener("transitionend", z.current), z.current = null);
166
167
  };
167
- }, []), s(() => {
168
- D(z);
169
- }, [z]), s(() => {
170
- O.current && !L.current && (L.current = !0, O.current.style.transition = "none", O.current.style.transform = `translate3d(calc(-100% * ${z < p + 1 ? z : p + 1}), 0, 0)`);
171
- }, [p, z]), s(() => {
172
- if (b) {
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
- N.current || !P.current || O.current && (!g && I.current === E - 1 || document.activeElement && O.current && O.current.contains(document.activeElement) || (N.current = !0, G(0, I.current, (O.current.offsetWidth ?? 0) * .1, { isAutoSwiped: !0 })));
175
- }, x);
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
- g,
184
- E,
185
- G
186
- ]), /* @__PURE__ */ d(u, {
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
- ...C,
192
+ ...w,
192
193
  inlineCSS: {
193
194
  width: "100%",
194
195
  position: "relative",
195
- ...y
196
+ ...b
196
197
  },
197
- children: [/* @__PURE__ */ d(u, {
198
- ref: O,
198
+ children: [/* @__PURE__ */ f(d, {
199
+ ref: k,
199
200
  flexGrow: 1,
200
- onMouseDown: K,
201
- onMouseUp: q,
202
- onMouseLeave: q,
203
- onTouchStart: J,
204
- onTouchEnd: Y,
205
- onTouchCancel: Y,
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: g ? "visible" : "hidden" },
208
- "& > div:last-of-type": { visibility: g ? "visible" : "hidden" }
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
- U,
217
- B.map((e, t) => i(e, {
217
+ W,
218
+ V.map((e, t) => a(e, {
218
219
  role: "listitem",
219
- tabIndex: t === w ? 0 : -1,
220
- onKeyDown: Z(e.props.onKeyDown),
220
+ tabIndex: t === T ? 0 : -1,
221
+ onKeyDown: Q(e.props.onKeyDown),
221
222
  "aria-roledescription": "slide",
222
- "aria-hidden": t !== w,
223
- "aria-current": t === w ? "page" : void 0,
224
- "aria-label": `${E}개 중 ${t + 1}번째 슬라이드`,
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": E,
227
+ "aria-setsize": D,
227
228
  ...e.props
228
229
  })),
229
- H
230
+ U
230
231
  ]
231
- }), typeof v == "function" && v({
232
- page: w,
233
- totalPages: E,
234
- onChange: X
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 { f as default };
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
- function e({ realPage: e, totalPages: t, lastPage: n, isLoop: r }) {
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,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,2 @@
1
+ import { default as getHoverChildrenScaleStyle } from './getHoverChildrenScaleStyle';
2
+ export default getHoverChildrenScaleStyle;
@@ -0,0 +1,5 @@
1
+ import e from "./getHoverChildrenScaleStyle.mjs";
2
+ //#region shared/utils/getHoverChildrenScaleStyle/index.ts
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -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
- export { d as ageToBirthDate, o as birthDateToAge, n as combineRef, r as dayFlagToDay, g as getCareTypeLabel, i as getDateRange, 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 };
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 { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
6
- import s from "@dotss/ui/Flexbox";
7
- import c from "@dotss/ui/Typography";
8
- import l from "@dotss/ui/hooks/useCheckHoverPossible/useCheckHoverPossible";
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 } = l(), y = (e, t) => (n) => {
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(i, { children: /* @__PURE__ */ o(s, {
14
+ return /* @__PURE__ */ o(a, { children: /* @__PURE__ */ s(c, {
15
15
  flexDirection: "column",
16
16
  inlineCSS: { width: "100%" },
17
17
  ...h,
18
- children: [/* @__PURE__ */ a(c, {
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__ */ a(n, {
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: l }) => /* @__PURE__ */ a(t, { children: /* @__PURE__ */ o(s, {
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__ */ a(e, {
47
- src: l || "",
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__ */ a(c, {
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 { jsx as i, jsxs as a } from "react/jsx-runtime";
6
- import o from "@dotss/ui/Flexbox";
7
- import s from "@dotss/ui/Typography";
8
- import c from "@dotss/ui/hooks/useCheckHoverPossible/useCheckHoverPossible";
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: _ } = c(), v = (e, t) => (n) => {
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__ */ a(o, {
14
+ return /* @__PURE__ */ o(s, {
15
15
  tag: "section",
16
16
  flexDirection: "column",
17
17
  inlineCSS: { width: "100%" },
18
18
  ...m,
19
- children: [/* @__PURE__ */ i(s, {
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__ */ i(n, {
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: c, url: l, image: u }) => /* @__PURE__ */ i(t, { children: /* @__PURE__ */ a(o, {
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__ */ i(e, {
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__ */ a(o, {
59
+ }), /* @__PURE__ */ o(s, {
60
60
  flexDirection: "column",
61
61
  gap: 1,
62
- children: [/* @__PURE__ */ i(s, {
62
+ children: [/* @__PURE__ */ a(c, {
63
63
  tag: "p",
64
64
  variant: "h4B",
65
65
  lineClamp: 1,
66
66
  children: r
67
- }), /* @__PURE__ */ i(s, {
67
+ }), /* @__PURE__ */ a(c, {
68
68
  tag: "p",
69
69
  variant: "b4R",
70
70
  lineClamp: 1,
71
71
  color: "grey.70",
72
- children: c
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;