@dotss/tictoccroc 0.0.5 → 0.0.7

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 (25) hide show
  1. package/dist/shared/components/Scheduler/Scheduler.d.ts +2 -2
  2. package/dist/shared/components/Scheduler/Scheduler.mjs +164 -164
  3. package/dist/shared/components/Scheduler/Scheduler.utils.d.ts +13 -7
  4. package/dist/shared/components/Scheduler/Scheduler.utils.mjs +65 -54
  5. package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.mjs +23 -24
  6. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.d.ts +3 -3
  7. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs +3 -3
  8. package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.d.ts +5 -2
  9. package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs +24 -24
  10. package/dist/teacher/profile/components/CareerSection/CareerSection.mjs +42 -41
  11. package/dist/teacher/profile/components/CertificationSection/CertificationItem/CertificationItem.d.ts +5 -2
  12. package/dist/teacher/profile/components/CertificationSection/CertificationItem/CertificationItem.mjs +27 -22
  13. package/dist/teacher/profile/components/CertificationSection/CertificationSection.mjs +41 -37
  14. package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.d.ts +6 -3
  15. package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs +38 -30
  16. package/dist/teacher/profile/components/EducationSection/EducationSection.mjs +35 -34
  17. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs +33 -31
  18. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs +4 -4
  19. package/dist/teacher/profile/utils/index.d.ts +1 -0
  20. package/dist/teacher/profile/utils/index.mjs +5 -0
  21. package/dist/teacher/profile/utils/sortItems/index.d.ts +3 -0
  22. package/dist/teacher/profile/utils/sortItems/index.mjs +6 -0
  23. package/dist/teacher/profile/utils/sortItems/sortItems.d.ts +9 -0
  24. package/dist/teacher/profile/utils/sortItems/sortItems.mjs +29 -0
  25. package/package.json +9 -1
@@ -8,9 +8,9 @@ export interface SchedulerProps extends FlexboxProps {
8
8
  color?: string;
9
9
  }[];
10
10
  minScheduleBlockHeight?: number;
11
+ maxScheduleBlockHeight?: number;
11
12
  renderScheduleBlock?: (date: string, time: string) => ReactNode;
12
13
  onDateChange?: (date: Dayjs) => void;
13
- adornment?: ReactNode;
14
14
  }
15
- declare function Scheduler({ children, date, legend, minScheduleBlockHeight, renderScheduleBlock, onDateChange, adornment, ...props }: SchedulerProps): import("@emotion/react/jsx-runtime").JSX.Element;
15
+ declare function Scheduler({ children, date, legend, minScheduleBlockHeight, maxScheduleBlockHeight, renderScheduleBlock, onDateChange, ...props }: SchedulerProps): import("@emotion/react/jsx-runtime").JSX.Element;
16
16
  export default Scheduler;
@@ -1,32 +1,32 @@
1
- import { jsxs as R, jsx as h } from "react/jsx-runtime";
2
- import { useState as j, useRef as d, Children as ke, isValidElement as Ee, useEffect as N, cloneElement as fe } from "react";
3
- import { Flexbox as m, Box as me, Typography as C } from "@dotss/ui";
4
- import Se from "@dotss/ui/core/useTheme";
1
+ import { jsxs as A, jsx as h } from "react/jsx-runtime";
2
+ import { useState as j, useRef as d, Children as fe, isValidElement as me, useEffect as W, cloneElement as he } from "react";
3
+ import { Flexbox as m, Box as pe, Typography as q } from "@dotss/ui";
4
+ import Ae from "@dotss/ui/core/useTheme";
5
5
  import v from "dayjs";
6
- import Le from "./ScheduleEvent/ScheduleEvent.mjs";
7
- import { generateWeek as Z, getDayScheduleEvents as Re, resolvePositionedScheduleEventsForDate as Ae, getMinutesFromMidnight as he } from "./Scheduler.utils.mjs";
8
- const A = Array.from({ length: 34 }).map((O, W) => {
9
- const y = Math.floor((W + 14) / 2) % 24, $ = (W + 14) % 2 === 0 ? "00" : "30", T = v().hour(y).minute(parseInt($)), D = v(), G = D.hour(), U = D.minute(), S = G === y && (U < 30 && $ === "00" || U >= 30 && $ === "30");
6
+ import ve from "./ScheduleEvent/ScheduleEvent.mjs";
7
+ import { generateWeek as O, getDayScheduleEvents as Re, resolvePositionedScheduleEventsForDate as Fe, getMinutesFromMidnight as we } from "./Scheduler.utils.mjs";
8
+ const R = Array.from({ length: 34 }).map((_, U) => {
9
+ const $ = Math.floor((U + 14) / 2) % 24, w = (U + 14) % 2 === 0 ? "00" : "30", T = v().hour($).minute(parseInt(w)), H = v(), D = H.hour(), K = H.minute(), L = D === $ && (K < 30 && w === "00" || K >= 30 && w === "30");
10
10
  return {
11
11
  time: T.format("HH:mm"),
12
12
  label: T.format("A h시 m분"),
13
- isCurrentTime: S
13
+ isCurrentTime: L
14
14
  };
15
15
  });
16
- function He({
17
- children: O,
18
- date: W = v(),
19
- legend: y,
20
- minScheduleBlockHeight: $ = 20,
21
- renderScheduleBlock: T,
16
+ function Ye({
17
+ children: _,
18
+ date: U = v(),
19
+ legend: $,
20
+ minScheduleBlockHeight: w = 20,
21
+ maxScheduleBlockHeight: T,
22
+ renderScheduleBlock: H,
22
23
  onDateChange: D,
23
- adornment: G,
24
- ...U
24
+ ...K
25
25
  }) {
26
26
  const {
27
- palette: { grey: S }
28
- } = Se(), [M, F] = j(W.startOf("week")), [H, pe] = j(20), [Y, w] = j(0), [z, k] = j(0), [ve, we] = j(""), ee = d(null), te = d(null), re = d(null), V = d(null), ne = d(0), oe = d(0), I = d(!1), X = d(!1), q = d(!1), K = d(0), ae = d(0), se = d(0), ie = d(0), _ = d(!1), L = d(null), P = d(0), B = d(0), E = d(0), p = d(null), J = ke.toArray(O).filter(Ee).map((e) => {
29
- if (e.type === Le) {
27
+ palette: { grey: L }
28
+ } = Ae(), [M, F] = j(U.startOf("week")), [Y, ge] = j("100%"), [z, g] = j(0), [I, k] = j(0), [be, ye] = j(""), ee = d(null), te = d(null), re = d(null), J = d(null), ne = d(0), oe = d(0), N = d(!1), X = d(!1), C = d(!1), P = d(0), ae = d(0), se = d(0), ie = d(0), Q = d(!1), S = d(null), G = d(0), V = d(0), E = d(0), p = d(null), Z = fe.toArray(_).filter(me).map((e) => {
29
+ if (e.type === ve) {
30
30
  const { startDate: n, endDate: a } = e.props;
31
31
  return {
32
32
  startDate: n,
@@ -35,38 +35,38 @@ function He({
35
35
  };
36
36
  }
37
37
  return null;
38
- }).filter(Boolean), ce = [
39
- Z(M.subtract(1, "week"), J),
40
- Z(M, J),
41
- Z(M.add(1, "week"), J)
42
- ], le = (e, n) => (a) => {
38
+ }).filter(Boolean), $e = fe.toArray(_).filter(me).filter((e) => e.type !== ve), ce = [
39
+ O(M.subtract(1, "week"), Z),
40
+ O(M, Z),
41
+ O(M.add(1, "week"), Z)
42
+ ], ue = (e, n) => (a) => {
43
43
  const o = Number(a.currentTarget.dataset.row), i = Number(a.currentTarget.dataset.col);
44
- w(o), k(i), we(`${e.format("dddd")} ${e.format("D")}일 ${n}`);
45
- }, ue = (e) => {
46
- var g, b;
44
+ g(o), k(i), ye(`${e.format("dddd")} ${e.format("D")}일 ${n}`);
45
+ }, le = (e) => {
46
+ var b, y;
47
47
  const n = Number(e.currentTarget.dataset.row), a = Number(e.currentTarget.dataset.col);
48
48
  let o = n, i = a;
49
49
  switch (e.key) {
50
50
  case "ArrowUp": {
51
- e.preventDefault(), n === 0 && (a - 1 < 0 ? (F((t) => t.add(-1, "week")), w(A.length - 1), k(6), E.current = requestAnimationFrame(() => {
51
+ e.preventDefault(), n === 0 && (a - 1 < 0 ? (F((t) => t.add(-1, "week")), g(R.length - 1), k(6), E.current = requestAnimationFrame(() => {
52
52
  var t, r;
53
53
  (r = (t = p.current) == null ? void 0 : t.querySelector(
54
- `[data-row="${A.length - 1}"][data-col="6"][data-week="1"]`
54
+ `[data-row="${R.length - 1}"][data-col="6"][data-week="1"]`
55
55
  )) == null || r.focus();
56
- })) : (w(A.length - 1), k(a - 1), E.current = requestAnimationFrame(() => {
56
+ })) : (g(R.length - 1), k(a - 1), E.current = requestAnimationFrame(() => {
57
57
  var t, r;
58
58
  (r = (t = p.current) == null ? void 0 : t.querySelector(
59
- `[data-row="${A.length - 1}"][data-col="${a - 1}"][data-week="1"]`
59
+ `[data-row="${R.length - 1}"][data-col="${a - 1}"][data-week="1"]`
60
60
  )) == null || r.focus();
61
61
  }))), o = Math.max(n - 1, 0);
62
62
  break;
63
63
  }
64
64
  case "ArrowDown": {
65
- if (e.preventDefault(), n === A.length - 1) {
66
- a + 1 > 6 ? (F((t) => t.add(1, "week")), w(0), k(0), E.current = requestAnimationFrame(() => {
65
+ if (e.preventDefault(), n === R.length - 1) {
66
+ a + 1 > 6 ? (F((t) => t.add(1, "week")), g(0), k(0), E.current = requestAnimationFrame(() => {
67
67
  var t, r;
68
68
  (r = (t = p.current) == null ? void 0 : t.querySelector('[data-row="0"][data-col="0"][data-week="1"]')) == null || r.focus();
69
- })) : (w(0), k(i + 1), E.current = requestAnimationFrame(() => {
69
+ })) : (g(0), k(i + 1), E.current = requestAnimationFrame(() => {
70
70
  var t, r;
71
71
  (r = (t = p.current) == null ? void 0 : t.querySelector(
72
72
  `[data-row="0"][data-col="${i + 1}"][data-week="1"]`
@@ -74,12 +74,12 @@ function He({
74
74
  }));
75
75
  return;
76
76
  }
77
- o = Math.min(n + 1, A.length - 1);
77
+ o = Math.min(n + 1, R.length - 1);
78
78
  break;
79
79
  }
80
80
  case "ArrowLeft": {
81
81
  if (e.preventDefault(), a === 0) {
82
- F((s) => s.add(-1, "week")), w(o), k(6), E.current = requestAnimationFrame(() => {
82
+ F((s) => s.add(-1, "week")), g(o), k(6), E.current = requestAnimationFrame(() => {
83
83
  var s, t;
84
84
  (t = (s = p.current) == null ? void 0 : s.querySelector(`[data-row="${o}"][data-col="6"][data-week="1"]`)) == null || t.focus();
85
85
  });
@@ -90,7 +90,7 @@ function He({
90
90
  }
91
91
  case "ArrowRight": {
92
92
  if (e.preventDefault(), a === 6) {
93
- F((s) => s.add(1, "week")), w(o), k(0), E.current = requestAnimationFrame(() => {
93
+ F((s) => s.add(1, "week")), g(o), k(0), E.current = requestAnimationFrame(() => {
94
94
  var s, t;
95
95
  (t = (s = p.current) == null ? void 0 : s.querySelector(`[data-row="${o}"][data-col="0"][data-week="1"]`)) == null || t.focus();
96
96
  });
@@ -106,9 +106,9 @@ function He({
106
106
  e.preventDefault(), e.currentTarget.click();
107
107
  break;
108
108
  }
109
- w(o), k(i), (b = (g = p.current) == null ? void 0 : g.querySelector(`[data-row="${o}"][data-col="${i}"][data-week="1"]`)) == null || b.focus();
110
- }, ge = (e) => (n) => {
111
- var i, g, b, l, s, t;
109
+ g(o), k(i), (y = (b = p.current) == null ? void 0 : b.querySelector(`[data-row="${o}"][data-col="${i}"][data-week="1"]`)) == null || y.focus();
110
+ }, ke = (e) => (n) => {
111
+ var i, b, y, c, s, t;
112
112
  const a = n.currentTarget.dataset.startDate, o = n.currentTarget.dataset.endDate;
113
113
  if (!(!a || !o)) {
114
114
  switch (n.key) {
@@ -120,51 +120,51 @@ function He({
120
120
  break;
121
121
  case "ArrowUp": {
122
122
  n.preventDefault();
123
- const r = n.currentTarget.previousElementSibling, u = !!(r != null && r.getAttribute("data-is-event"));
124
- if (r && u)
125
- r.focus(), w(Y - 1);
123
+ const r = n.currentTarget.previousElementSibling, l = !!(r != null && r.getAttribute("data-is-event"));
124
+ if (r && l)
125
+ r.focus(), g(z - 1);
126
126
  else {
127
- const c = (i = n.currentTarget.parentElement) == null ? void 0 : i.querySelector(
127
+ const u = (i = n.currentTarget.parentElement) == null ? void 0 : i.querySelector(
128
128
  `[data-time="${v(a).add(-30, "minute").format("HH:mm")}"]`
129
129
  );
130
- c == null || c.focus();
130
+ u == null || u.focus();
131
131
  }
132
132
  break;
133
133
  }
134
134
  case "ArrowLeft": {
135
135
  n.preventDefault();
136
- const r = n.currentTarget.previousElementSibling, u = !!(r != null && r.getAttribute("data-is-event"));
137
- if (r && u)
136
+ const r = n.currentTarget.previousElementSibling, l = !!(r != null && r.getAttribute("data-is-event"));
137
+ if (r && l)
138
138
  r.focus();
139
139
  else {
140
- if (z === 0) {
141
- F((f) => f.add(-1, "week")), w(0), k(6), E.current = requestAnimationFrame(() => {
140
+ if (I === 0) {
141
+ F((f) => f.add(-1, "week")), g(0), k(6), E.current = requestAnimationFrame(() => {
142
142
  var f, x;
143
143
  (x = (f = p.current) == null ? void 0 : f.querySelector('[data-row="0"][data-col="6"][data-week="1"]')) == null || x.focus();
144
144
  });
145
145
  return;
146
146
  }
147
- (b = (g = p.current) == null ? void 0 : g.querySelector(
148
- `[data-row="${Y}"][data-col="${z - 1}"][data-week="1"]`
149
- )) == null || b.focus();
147
+ (y = (b = p.current) == null ? void 0 : b.querySelector(
148
+ `[data-row="${z}"][data-col="${I - 1}"][data-week="1"]`
149
+ )) == null || y.focus();
150
150
  }
151
151
  break;
152
152
  }
153
153
  case "ArrowRight": {
154
154
  n.preventDefault();
155
- const r = n.currentTarget.nextElementSibling, u = !!(r != null && r.getAttribute("data-is-event"));
156
- if (r && u)
155
+ const r = n.currentTarget.nextElementSibling, l = !!(r != null && r.getAttribute("data-is-event"));
156
+ if (r && l)
157
157
  r.focus();
158
158
  else {
159
- if (z === 6) {
160
- F((f) => f.add(1, "week")), w(0), k(0), E.current = requestAnimationFrame(() => {
159
+ if (I === 6) {
160
+ F((f) => f.add(1, "week")), g(0), k(0), E.current = requestAnimationFrame(() => {
161
161
  var f, x;
162
162
  (x = (f = p.current) == null ? void 0 : f.querySelector('[data-row="0"][data-col="0"][data-week="1"]')) == null || x.focus();
163
163
  });
164
164
  return;
165
165
  }
166
- (s = (l = p.current) == null ? void 0 : l.querySelector(
167
- `[data-row="${Y}"][data-col="${z + 1}"][data-week="1"]`
166
+ (s = (c = p.current) == null ? void 0 : c.querySelector(
167
+ `[data-row="${z}"][data-col="${I + 1}"][data-week="1"]`
168
168
  )) == null || s.focus();
169
169
  }
170
170
  break;
@@ -172,14 +172,14 @@ function He({
172
172
  case "ArrowDown":
173
173
  {
174
174
  n.preventDefault();
175
- const r = n.currentTarget.nextElementSibling, u = !!(r != null && r.getAttribute("data-is-event"));
176
- if (r && u)
177
- r.focus(), w(Y + 1);
175
+ const r = n.currentTarget.nextElementSibling, l = !!(r != null && r.getAttribute("data-is-event"));
176
+ if (r && l)
177
+ r.focus(), g(z + 1);
178
178
  else {
179
- const c = (t = n.currentTarget.parentElement) == null ? void 0 : t.querySelector(
179
+ const u = (t = n.currentTarget.parentElement) == null ? void 0 : t.querySelector(
180
180
  `[data-time="${v(o).format("HH:mm")}"]`
181
181
  );
182
- c == null || c.focus();
182
+ u == null || u.focus();
183
183
  }
184
184
  }
185
185
  break;
@@ -187,20 +187,19 @@ function He({
187
187
  e == null || e(n);
188
188
  }
189
189
  };
190
- return N(() => {
190
+ return W(() => {
191
191
  const e = () => {
192
192
  var n, a, o;
193
- if (V.current) {
194
- const i = ((a = (n = ee.current) == null ? void 0 : n.parentElement) == null ? void 0 : a.offsetHeight) ?? 0, g = V.current.offsetHeight, b = ((o = re.current) == null ? void 0 : o.offsetHeight) ?? 0, l = (i - g - b) / A.length;
195
- pe(
196
- l < $ ? $ : l
197
- );
193
+ if (J.current) {
194
+ const i = ((a = (n = ee.current) == null ? void 0 : n.parentElement) == null ? void 0 : a.offsetHeight) ?? 0, b = J.current.offsetHeight, y = ((o = re.current) == null ? void 0 : o.offsetHeight) ?? 0;
195
+ let c = (i - b - y) / R.length;
196
+ c = c < w ? w : c, c = Math.min(c, T ?? c), ge(c);
198
197
  }
199
198
  };
200
199
  return e(), window.addEventListener("resize", e), () => {
201
200
  window.removeEventListener("resize", e);
202
201
  };
203
- }, [$, y]), N(() => {
202
+ }, [w, T, $]), W(() => {
204
203
  const e = te.current;
205
204
  if (!e) return;
206
205
  const n = () => {
@@ -208,49 +207,49 @@ function He({
208
207
  };
209
208
  n();
210
209
  const a = (t, r) => {
211
- q.current || (L.current && (e.removeEventListener("transitionend", L.current), L.current = null), ne.current = t, oe.current = r, _.current = !1, I.current = !0, K.current = 0);
212
- }, o = (t, r, u) => {
213
- if (!I.current) return;
214
- const c = t - ne.current, f = r - oe.current;
215
- if (K.current = c, !_.current && (se.current = Math.abs(c), ie.current = Math.abs(f), _.current = !0, ie.current > se.current)) {
216
- I.current = !1;
210
+ C.current || (S.current && (e.removeEventListener("transitionend", S.current), S.current = null), ne.current = t, oe.current = r, Q.current = !1, N.current = !0, P.current = 0);
211
+ }, o = (t, r, l) => {
212
+ if (!N.current) return;
213
+ const u = t - ne.current, f = r - oe.current;
214
+ if (P.current = u, !Q.current && (se.current = Math.abs(u), ie.current = Math.abs(f), Q.current = !0, ie.current > se.current)) {
215
+ N.current = !1;
217
216
  return;
218
217
  }
219
- u.cancelable && u.preventDefault(), e.style.transition = "none", e.style.transform = `translate3d(${K.current}px, 0, 0)`, e.style.cursor = "grabbing";
218
+ l.cancelable && l.preventDefault(), e.style.transition = "none", e.style.transform = `translate3d(${P.current}px, 0, 0)`, e.style.cursor = "grabbing";
220
219
  }, i = () => {
221
- if (e.style.cursor = "grab", !I.current) return;
222
- I.current = !1, X.current = !1, q.current = !0;
223
- const t = K.current, r = ae.current, u = r * 0.2;
224
- e.style.transition = "transform 300ms cubic-bezier(0.25, 1, 0.5, 1)", t > u ? (e.style.transform = `translate3d(${r}px, 0, 0)`, L.current = (c) => {
225
- c.propertyName === "transform" && (P.current = requestAnimationFrame(() => {
226
- F((f) => f.add(-1, "week")), B.current = requestAnimationFrame(() => {
227
- e.style.transition = "none", e.style.transform = "translate3d(0, 0, 0)", X.current = !0, q.current = !1;
220
+ if (e.style.cursor = "grab", !N.current) return;
221
+ N.current = !1, X.current = !1, C.current = !0;
222
+ const t = P.current, r = ae.current, l = r * 0.2;
223
+ e.style.transition = "transform 300ms cubic-bezier(0.25, 1, 0.5, 1)", t > l ? (e.style.transform = `translate3d(${r}px, 0, 0)`, S.current = (u) => {
224
+ u.propertyName === "transform" && (G.current = requestAnimationFrame(() => {
225
+ F((f) => f.add(-1, "week")), V.current = requestAnimationFrame(() => {
226
+ e.style.transition = "none", e.style.transform = "translate3d(0, 0, 0)", X.current = !0, C.current = !1;
228
227
  });
229
228
  }));
230
- }, e.addEventListener("transitionend", L.current)) : t < -u ? (e.style.transform = `translate3d(-${r}px, 0, 0)`, L.current = (c) => {
231
- c.propertyName === "transform" && (P.current = requestAnimationFrame(() => {
232
- F((f) => f.add(1, "week")), B.current = requestAnimationFrame(() => {
233
- e.style.transition = "none", e.style.transform = "translate3d(0, 0, 0)", X.current = !0, q.current = !1;
229
+ }, e.addEventListener("transitionend", S.current)) : t < -l ? (e.style.transform = `translate3d(-${r}px, 0, 0)`, S.current = (u) => {
230
+ u.propertyName === "transform" && (G.current = requestAnimationFrame(() => {
231
+ F((f) => f.add(1, "week")), V.current = requestAnimationFrame(() => {
232
+ e.style.transition = "none", e.style.transform = "translate3d(0, 0, 0)", X.current = !0, C.current = !1;
234
233
  });
235
234
  }));
236
- }, e.addEventListener("transitionend", L.current)) : (q.current = !1, X.current = !0, e.style.transform = "translate3d(0, 0, 0)");
237
- }, g = (t) => a(t.touches[0].clientX, t.touches[0].clientY), b = (t) => o(t.touches[0].clientX, t.touches[0].clientY, t), l = (t) => a(t.clientX, t.clientY), s = (t) => o(t.clientX, t.clientY, t);
238
- return window.addEventListener("resize", n), e.addEventListener("touchstart", g), e.addEventListener("touchmove", b), e.addEventListener("touchend", i), e.addEventListener("touchcancel", i), e.addEventListener("mousedown", l), e.addEventListener("mousemove", s), e.addEventListener("mouseup", i), e.addEventListener("mouseleave", i), () => {
239
- window.removeEventListener("resize", n), e.removeEventListener("touchstart", g), e.removeEventListener("touchmove", b), e.removeEventListener("touchend", i), e.removeEventListener("touchcancel", i), e.removeEventListener("mousedown", l), e.removeEventListener("mousemove", s), e.removeEventListener("mouseup", i), e.removeEventListener("mouseleave", i), L.current && e.removeEventListener("transitionend", L.current);
235
+ }, e.addEventListener("transitionend", S.current)) : (C.current = !1, X.current = !0, e.style.transform = "translate3d(0, 0, 0)");
236
+ }, b = (t) => a(t.touches[0].clientX, t.touches[0].clientY), y = (t) => o(t.touches[0].clientX, t.touches[0].clientY, t), c = (t) => a(t.clientX, t.clientY), s = (t) => o(t.clientX, t.clientY, t);
237
+ return window.addEventListener("resize", n), e.addEventListener("touchstart", b), e.addEventListener("touchmove", y), e.addEventListener("touchend", i), e.addEventListener("touchcancel", i), e.addEventListener("mousedown", c), e.addEventListener("mousemove", s), e.addEventListener("mouseup", i), e.addEventListener("mouseleave", i), () => {
238
+ window.removeEventListener("resize", n), e.removeEventListener("touchstart", b), e.removeEventListener("touchmove", y), e.removeEventListener("touchend", i), e.removeEventListener("touchcancel", i), e.removeEventListener("mousedown", c), e.removeEventListener("mousemove", s), e.removeEventListener("mouseup", i), e.removeEventListener("mouseleave", i), S.current && e.removeEventListener("transitionend", S.current);
240
239
  };
241
- }, []), N(() => {
240
+ }, []), W(() => {
242
241
  const e = p.current, n = (a) => {
243
- q.current && !X.current && a.stopPropagation();
242
+ C.current && !X.current && a.stopPropagation();
244
243
  };
245
244
  return e == null || e.addEventListener("click", n), () => {
246
245
  e == null || e.removeEventListener("click", n);
247
246
  };
248
- }, []), N(() => {
247
+ }, []), W(() => {
249
248
  D == null || D(M);
250
- }, [M, D]), N(() => () => {
251
- P.current && cancelAnimationFrame(P.current), B.current && cancelAnimationFrame(B.current), E.current && cancelAnimationFrame(E.current);
252
- }, []), /* @__PURE__ */ R(m, { ref: ee, flex: 1, flexDirection: "column", "aria-label": "일정 안내", ...U, children: [
253
- y && (y == null ? void 0 : y.length) > 0 && /* @__PURE__ */ h(
249
+ }, [M, D]), W(() => () => {
250
+ G.current && cancelAnimationFrame(G.current), V.current && cancelAnimationFrame(V.current), E.current && cancelAnimationFrame(E.current);
251
+ }, []), /* @__PURE__ */ A(m, { ref: ee, flex: 1, flexDirection: "column", "aria-label": "일정 안내", ...K, children: [
252
+ $ && ($ == null ? void 0 : $.length) > 0 && /* @__PURE__ */ h(
254
253
  m,
255
254
  {
256
255
  ref: re,
@@ -261,28 +260,28 @@ function He({
261
260
  pr: 4,
262
261
  role: "group",
263
262
  "aria-label": "일정 종류 안내",
264
- children: y == null ? void 0 : y.map(({ text: e, color: n }) => /* @__PURE__ */ R(m, { alignItems: "center", gap: 1, children: [
263
+ children: $ == null ? void 0 : $.map(({ text: e, color: n }) => /* @__PURE__ */ A(m, { alignItems: "center", gap: 1, children: [
265
264
  /* @__PURE__ */ h(
266
- me,
265
+ pe,
267
266
  {
268
267
  "aria-hidden": !0,
269
268
  inlineCSS: {
270
269
  width: 14,
271
270
  height: 14,
272
- border: `1px solid ${S[30]}`,
271
+ border: `1px solid ${L[30]}`,
273
272
  borderRadius: 4,
274
273
  backgroundColor: n
275
274
  }
276
275
  }
277
276
  ),
278
- /* @__PURE__ */ h(C, { variant: "c3R", color: "grey.70", children: e })
277
+ /* @__PURE__ */ h(q, { variant: "c3R", color: "grey.70", children: e })
279
278
  ] }, `legend-${e}-${n}`))
280
279
  }
281
280
  ),
282
- /* @__PURE__ */ R(
281
+ /* @__PURE__ */ A(
283
282
  m,
284
283
  {
285
- ref: V,
284
+ ref: J,
286
285
  alignItems: "center",
287
286
  pt: 1,
288
287
  pb: 2,
@@ -291,12 +290,12 @@ function He({
291
290
  position: "sticky",
292
291
  top: 0,
293
292
  zIndex: 2,
294
- borderBottom: `1px solid ${S[20]}`,
295
- backgroundColor: S.white
293
+ borderBottom: `1px solid ${L[20]}`,
294
+ backgroundColor: L.white
296
295
  },
297
296
  children: [
298
- /* @__PURE__ */ R(
299
- C,
297
+ /* @__PURE__ */ A(
298
+ q,
300
299
  {
301
300
  variant: "h4B",
302
301
  textAlign: "center",
@@ -309,7 +308,7 @@ function He({
309
308
  ]
310
309
  }
311
310
  ),
312
- /* @__PURE__ */ h(m, { alignItems: "center", flexGrow: 1, children: ce[1].days.map((e) => /* @__PURE__ */ R(
311
+ /* @__PURE__ */ h(m, { alignItems: "center", flexGrow: 1, children: ce[1].days.map((e) => /* @__PURE__ */ A(
313
312
  m,
314
313
  {
315
314
  flexDirection: "column",
@@ -318,8 +317,8 @@ function He({
318
317
  role: "columnheader",
319
318
  "aria-label": `${e.format("dddd")} (${e.format("D")}일)`,
320
319
  children: [
321
- /* @__PURE__ */ h(C, { variant: "c3R", children: e.format("ddd") }),
322
- /* @__PURE__ */ h(C, { variant: "c3M", children: e.format("D") })
320
+ /* @__PURE__ */ h(q, { variant: "c3R", children: e.format("ddd") }),
321
+ /* @__PURE__ */ h(q, { variant: "c3M", children: e.format("D") })
323
322
  ]
324
323
  },
325
324
  e.day()
@@ -327,8 +326,8 @@ function He({
327
326
  ]
328
327
  }
329
328
  ),
330
- /* @__PURE__ */ R(m, { flex: 1, children: [
331
- /* @__PURE__ */ R(
329
+ /* @__PURE__ */ A(m, { flex: 1, children: [
330
+ /* @__PURE__ */ A(
332
331
  m,
333
332
  {
334
333
  flexDirection: "column",
@@ -336,11 +335,11 @@ function He({
336
335
  position: "sticky",
337
336
  left: 0,
338
337
  maxHeight: "fit-content",
339
- backgroundColor: S.white,
338
+ backgroundColor: L.white,
340
339
  zIndex: 1
341
340
  },
342
341
  children: [
343
- A.map(({ time: e, label: n, isCurrentTime: a }) => /* @__PURE__ */ h(
342
+ R.map(({ time: e, label: n, isCurrentTime: a }) => /* @__PURE__ */ h(
344
343
  m,
345
344
  {
346
345
  justifyContent: "center",
@@ -350,12 +349,12 @@ function He({
350
349
  "aria-current": a ? "time" : void 0,
351
350
  style: {
352
351
  width: 48,
353
- height: H,
354
- minHeight: $,
352
+ height: Y,
353
+ minHeight: w,
355
354
  zIndex: 1
356
355
  },
357
356
  children: /* @__PURE__ */ h(
358
- C,
357
+ q,
359
358
  {
360
359
  variant: "c3M",
361
360
  color: "grey.70",
@@ -386,7 +385,7 @@ function He({
386
385
  ]
387
386
  }
388
387
  ),
389
- /* @__PURE__ */ R(
388
+ /* @__PURE__ */ A(
390
389
  m,
391
390
  {
392
391
  flex: 1,
@@ -413,11 +412,12 @@ function He({
413
412
  style: {
414
413
  display: "grid",
415
414
  gridTemplateColumns: "repeat(7, 1fr)",
416
- minWidth: "100%"
415
+ minWidth: "100%",
416
+ height: "100%"
417
417
  },
418
418
  children: e.map((o, i) => {
419
- const g = Re(n, o), b = Ae(
420
- g,
419
+ const b = Re(n, o), y = Fe(
420
+ b,
421
421
  o
422
422
  );
423
423
  return /* @__PURE__ */ h(
@@ -426,9 +426,9 @@ function He({
426
426
  role: "row",
427
427
  "aria-label": `${o.format("dddd")} ${o.format("D")}일`,
428
428
  style: {
429
- borderLeft: `1px solid ${S[20]}`
429
+ borderLeft: `1px solid ${L[20]}`
430
430
  },
431
- children: /* @__PURE__ */ R(
431
+ children: /* @__PURE__ */ A(
432
432
  m,
433
433
  {
434
434
  style: {
@@ -437,86 +437,86 @@ function He({
437
437
  flex: 1
438
438
  },
439
439
  children: [
440
- A.map(({ time: l, label: s, isCurrentTime: t }, r) => {
441
- const u = a === 1 && r === Y && i === z;
442
- if (typeof T == "function") {
443
- const c = T(
440
+ R.map(({ time: c, label: s, isCurrentTime: t }, r) => {
441
+ const l = a === 1 && r === z && i === I;
442
+ if (typeof H == "function") {
443
+ const u = H(
444
444
  o.format("YYYY-MM-DD"),
445
- l
445
+ c
446
446
  );
447
- return fe(c, {
448
- key: `schedule-block-${o}-${r}-${i}-${l}`,
449
- onKeyDown: ue,
450
- onFocus: le(o, s),
447
+ return he(u, {
448
+ key: `schedule-block-${o}-${r}-${i}-${c}`,
449
+ onKeyDown: le,
450
+ onFocus: ue(o, s),
451
451
  role: "gridcell",
452
452
  "data-row": r,
453
453
  "data-col": i,
454
454
  "data-week": a,
455
- "data-time": l,
455
+ "data-time": c,
456
456
  "aria-current": t ? "time" : void 0,
457
- tabIndex: u ? 0 : -1,
457
+ tabIndex: l ? 0 : -1,
458
458
  "aria-label": `${o.format("dddd")} ${o.format("D")}일 ${s}`,
459
- ...c.props,
459
+ ...u.props,
460
460
  style: {
461
- ...c.props.style,
462
- borderTop: r > 0 ? `1px solid ${S[20]}` : void 0,
463
- height: H,
464
- minHeight: $,
461
+ ...u.props.style,
462
+ borderTop: r > 0 ? `1px solid ${L[20]}` : void 0,
463
+ height: Y,
464
+ minHeight: w,
465
465
  zIndex: 0
466
466
  }
467
467
  });
468
468
  }
469
469
  return /* @__PURE__ */ h(
470
- me,
470
+ pe,
471
471
  {
472
- onKeyDown: ue,
473
- onFocus: le(o, s),
472
+ onKeyDown: le,
473
+ onFocus: ue(o, s),
474
474
  role: "gridcell",
475
475
  "data-row": r,
476
476
  "data-col": i,
477
477
  "data-week": a,
478
- "data-time": l,
478
+ "data-time": c,
479
479
  "aria-current": t ? "time" : void 0,
480
- tabIndex: u ? 0 : -1,
480
+ tabIndex: l ? 0 : -1,
481
481
  "aria-label": `${o.format("dddd")} ${o.format("D")}일 ${s}`,
482
482
  style: {
483
- borderTop: r > 0 ? `1px solid ${S[20]}` : void 0,
484
- height: H,
485
- minHeight: $,
483
+ borderTop: r > 0 ? `1px solid ${L[20]}` : void 0,
484
+ height: Y,
485
+ minHeight: w,
486
486
  zIndex: 0
487
487
  }
488
488
  },
489
- `schedule-block-${o}-${r}-${i}-${l}`
489
+ `schedule-block-${o}-${r}-${i}-${c}`
490
490
  );
491
491
  }),
492
- b.map(
493
- ({ children: l, startDate: s, endDate: t, totalColumns: r, columnIndex: u }) => {
494
- const c = he(s), f = he(t), x = Math.floor((c - 7 * 60) / 30), be = (c - 7 * 60) / 30 * H, ye = (f - c) / 30 * H, de = 100 / r, $e = u * de, Q = l;
492
+ y.map(
493
+ ({ children: c, startDate: s, endDate: t, totalColumns: r, columnIndex: l }) => {
494
+ const u = we(s), f = we(t), x = Math.floor((u - 7 * 60) / 30), Ee = (u - 7 * 60) / 30 * (Number(Y) || w), Le = (f - u) / 30 * (Number(Y) || w), de = 100 / r, Se = l * de, B = c;
495
495
  return /* @__PURE__ */ h(
496
496
  m,
497
497
  {
498
498
  style: {
499
499
  position: "absolute",
500
- top: `${be + (x > 0 ? 1 : 0)}px`,
501
- left: `${$e}%`,
500
+ top: `${Ee + (x > 0 ? 1 : 0)}px`,
501
+ left: `${Se}%`,
502
502
  width: `${de}%`,
503
- height: `${ye - (x > 0 ? 1 : 0)}px`,
503
+ height: `${Le - (x > 0 ? 1 : 0)}px`,
504
504
  zIndex: 1
505
505
  },
506
- children: fe(Q, {
506
+ children: he(B, {
507
507
  role: "button",
508
508
  tabIndex: a === 1 ? 0 : -1,
509
- onKeyDown: ge(Q.props.onKeyDown),
509
+ onKeyDown: ke(B.props.onKeyDown),
510
510
  "data-start-date": s,
511
511
  "data-start-time": v(s).format("HH:mm"),
512
512
  "data-end-date": t,
513
513
  "data-end-time": v(t).format("HH:mm"),
514
514
  "data-is-event": !0,
515
515
  "aria-label": `${v(s).format("dddd")} ${v(s).format("D")}일 ${v(s).format("A h시")}부터 ${v(t).format("dddd")} ${v(t).format("D")}일 ${v(t).format("A h시")}까지의 일정`,
516
- ...Q.props
516
+ ...B.props
517
517
  })
518
518
  },
519
- `${s}-${t}-${u}-${r}`
519
+ `${s}-${t}-${l}-${r}`
520
520
  );
521
521
  }
522
522
  )
@@ -532,14 +532,14 @@ function He({
532
532
  ))
533
533
  }
534
534
  ),
535
- G
535
+ $e
536
536
  ]
537
537
  }
538
538
  )
539
539
  ] }),
540
- /* @__PURE__ */ h(C, { role: "status", visuallyHidden: !0, children: ve })
540
+ /* @__PURE__ */ h(q, { role: "status", visuallyHidden: !0, children: be })
541
541
  ] });
542
542
  }
543
543
  export {
544
- He as default
544
+ Ye as default
545
545
  };