@dotss/tictoccroc 0.0.6 → 0.0.8

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.
@@ -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 ee, getDayScheduleEvents as Re, resolvePositionedScheduleEventsForDate as Fe, getMinutesFromMidnight as we } from "./Scheduler.utils.mjs";
8
+ const R = Array.from({ length: 33 }).map((_, P) => {
9
+ const $ = Math.floor((P + 14) / 2) % 24, w = (P + 14) % 2 === 0 ? "00" : "30", T = v().hour($).minute(parseInt(w)), H = v(), D = H.hour(), U = H.minute(), L = D === $ && (U < 30 && w === "00" || U >= 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: P = v(),
19
+ legend: $,
20
+ minScheduleBlockHeight: w = 20,
21
+ maxScheduleBlockHeight: T,
22
+ renderScheduleBlock: H,
22
23
  onDateChange: D,
23
- adornment: G,
24
24
  ...U
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(P.startOf("week")), [Y, ge] = j("100%"), [z, g] = j(0), [I, k] = j(0), [be, ye] = j(""), J = d(null), te = d(null), re = d(null), Q = d(null), ne = d(0), oe = d(0), N = d(!1), X = d(!1), C = d(!1), K = d(0), ae = d(0), se = d(0), ie = d(0), Z = d(!1), S = d(null), G = d(0), V = d(0), E = d(0), p = d(null), B = 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
+ ee(M.subtract(1, "week"), B),
40
+ ee(M, B),
41
+ ee(M.add(1, "week"), B)
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,20 @@ 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 (Q.current) {
194
+ const i = ((a = (n = J.current) == null ? void 0 : n.parentElement) == null ? void 0 : a.offsetHeight) ?? 0, b = Q.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(() => {
203
+ J.current;
204
204
  const e = te.current;
205
205
  if (!e) return;
206
206
  const n = () => {
@@ -208,49 +208,49 @@ function He({
208
208
  };
209
209
  n();
210
210
  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;
211
+ C.current || (S.current && (e.removeEventListener("transitionend", S.current), S.current = null), ne.current = t, oe.current = r, Z.current = !1, N.current = !0, K.current = 0);
212
+ }, o = (t, r, l) => {
213
+ if (!N.current) return;
214
+ const u = t - ne.current, f = r - oe.current;
215
+ if (K.current = u, !Z.current && (se.current = Math.abs(u), ie.current = Math.abs(f), Z.current = !0, ie.current > se.current)) {
216
+ N.current = !1;
217
217
  return;
218
218
  }
219
- u.cancelable && u.preventDefault(), e.style.transition = "none", e.style.transform = `translate3d(${K.current}px, 0, 0)`, e.style.cursor = "grabbing";
219
+ l.cancelable && l.preventDefault(), l.stopPropagation(), e.style.transition = "none", e.style.transform = `translate3d(${K.current}px, 0, 0)`, e.style.cursor = "grabbing";
220
220
  }, 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;
221
+ if (e.style.cursor = "grab", !N.current) return;
222
+ N.current = !1, X.current = !1, C.current = !0;
223
+ const t = K.current, r = ae.current, l = r * 0.2;
224
+ 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) => {
225
+ u.propertyName === "transform" && (G.current = requestAnimationFrame(() => {
226
+ F((f) => f.add(-1, "week")), V.current = requestAnimationFrame(() => {
227
+ e.style.transition = "none", e.style.transform = "translate3d(0, 0, 0)", X.current = !0, C.current = !1;
228
228
  });
229
229
  }));
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;
230
+ }, e.addEventListener("transitionend", S.current)) : t < -l ? (e.style.transform = `translate3d(-${r}px, 0, 0)`, S.current = (u) => {
231
+ u.propertyName === "transform" && (G.current = requestAnimationFrame(() => {
232
+ F((f) => f.add(1, "week")), V.current = requestAnimationFrame(() => {
233
+ e.style.transition = "none", e.style.transform = "translate3d(0, 0, 0)", X.current = !0, C.current = !1;
234
234
  });
235
235
  }));
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);
236
+ }, e.addEventListener("transitionend", S.current)) : (C.current = !1, X.current = !0, e.style.transform = "translate3d(0, 0, 0)");
237
+ }, 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);
238
+ 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), () => {
239
+ 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
240
  };
241
- }, []), N(() => {
241
+ }, []), W(() => {
242
242
  const e = p.current, n = (a) => {
243
- q.current && !X.current && a.stopPropagation();
243
+ C.current && !X.current && a.stopPropagation();
244
244
  };
245
245
  return e == null || e.addEventListener("click", n), () => {
246
246
  e == null || e.removeEventListener("click", n);
247
247
  };
248
- }, []), N(() => {
248
+ }, []), W(() => {
249
249
  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(
250
+ }, [M, D]), W(() => () => {
251
+ G.current && cancelAnimationFrame(G.current), V.current && cancelAnimationFrame(V.current), E.current && cancelAnimationFrame(E.current);
252
+ }, []), /* @__PURE__ */ A(m, { ref: J, flex: 1, flexDirection: "column", "aria-label": "일정 안내", ...U, children: [
253
+ $ && ($ == null ? void 0 : $.length) > 0 && /* @__PURE__ */ h(
254
254
  m,
255
255
  {
256
256
  ref: re,
@@ -261,28 +261,28 @@ function He({
261
261
  pr: 4,
262
262
  role: "group",
263
263
  "aria-label": "일정 종류 안내",
264
- children: y == null ? void 0 : y.map(({ text: e, color: n }) => /* @__PURE__ */ R(m, { alignItems: "center", gap: 1, children: [
264
+ children: $ == null ? void 0 : $.map(({ text: e, color: n }) => /* @__PURE__ */ A(m, { alignItems: "center", gap: 1, children: [
265
265
  /* @__PURE__ */ h(
266
- me,
266
+ pe,
267
267
  {
268
268
  "aria-hidden": !0,
269
269
  inlineCSS: {
270
270
  width: 14,
271
271
  height: 14,
272
- border: `1px solid ${S[30]}`,
272
+ border: `1px solid ${L[30]}`,
273
273
  borderRadius: 4,
274
274
  backgroundColor: n
275
275
  }
276
276
  }
277
277
  ),
278
- /* @__PURE__ */ h(C, { variant: "c3R", color: "grey.70", children: e })
278
+ /* @__PURE__ */ h(q, { variant: "c3R", color: "grey.70", children: e })
279
279
  ] }, `legend-${e}-${n}`))
280
280
  }
281
281
  ),
282
- /* @__PURE__ */ R(
282
+ /* @__PURE__ */ A(
283
283
  m,
284
284
  {
285
- ref: V,
285
+ ref: Q,
286
286
  alignItems: "center",
287
287
  pt: 1,
288
288
  pb: 2,
@@ -291,12 +291,12 @@ function He({
291
291
  position: "sticky",
292
292
  top: 0,
293
293
  zIndex: 2,
294
- borderBottom: `1px solid ${S[20]}`,
295
- backgroundColor: S.white
294
+ borderBottom: `1px solid ${L[20]}`,
295
+ backgroundColor: L.white
296
296
  },
297
297
  children: [
298
- /* @__PURE__ */ R(
299
- C,
298
+ /* @__PURE__ */ A(
299
+ q,
300
300
  {
301
301
  variant: "h4B",
302
302
  textAlign: "center",
@@ -309,7 +309,7 @@ function He({
309
309
  ]
310
310
  }
311
311
  ),
312
- /* @__PURE__ */ h(m, { alignItems: "center", flexGrow: 1, children: ce[1].days.map((e) => /* @__PURE__ */ R(
312
+ /* @__PURE__ */ h(m, { alignItems: "center", flexGrow: 1, children: ce[1].days.map((e) => /* @__PURE__ */ A(
313
313
  m,
314
314
  {
315
315
  flexDirection: "column",
@@ -318,8 +318,8 @@ function He({
318
318
  role: "columnheader",
319
319
  "aria-label": `${e.format("dddd")} (${e.format("D")}일)`,
320
320
  children: [
321
- /* @__PURE__ */ h(C, { variant: "c3R", children: e.format("ddd") }),
322
- /* @__PURE__ */ h(C, { variant: "c3M", children: e.format("D") })
321
+ /* @__PURE__ */ h(q, { variant: "c3R", children: e.format("ddd") }),
322
+ /* @__PURE__ */ h(q, { variant: "c3M", children: e.format("D") })
323
323
  ]
324
324
  },
325
325
  e.day()
@@ -327,8 +327,8 @@ function He({
327
327
  ]
328
328
  }
329
329
  ),
330
- /* @__PURE__ */ R(m, { flex: 1, children: [
331
- /* @__PURE__ */ R(
330
+ /* @__PURE__ */ A(m, { flex: 1, children: [
331
+ /* @__PURE__ */ A(
332
332
  m,
333
333
  {
334
334
  flexDirection: "column",
@@ -336,11 +336,11 @@ function He({
336
336
  position: "sticky",
337
337
  left: 0,
338
338
  maxHeight: "fit-content",
339
- backgroundColor: S.white,
339
+ backgroundColor: L.white,
340
340
  zIndex: 1
341
341
  },
342
342
  children: [
343
- A.map(({ time: e, label: n, isCurrentTime: a }) => /* @__PURE__ */ h(
343
+ R.map(({ time: e, label: n, isCurrentTime: a }) => /* @__PURE__ */ h(
344
344
  m,
345
345
  {
346
346
  justifyContent: "center",
@@ -350,12 +350,12 @@ function He({
350
350
  "aria-current": a ? "time" : void 0,
351
351
  style: {
352
352
  width: 48,
353
- height: H,
354
- minHeight: $,
353
+ height: Y,
354
+ minHeight: w,
355
355
  zIndex: 1
356
356
  },
357
357
  children: /* @__PURE__ */ h(
358
- C,
358
+ q,
359
359
  {
360
360
  variant: "c3M",
361
361
  color: "grey.70",
@@ -386,7 +386,7 @@ function He({
386
386
  ]
387
387
  }
388
388
  ),
389
- /* @__PURE__ */ R(
389
+ /* @__PURE__ */ A(
390
390
  m,
391
391
  {
392
392
  flex: 1,
@@ -413,11 +413,12 @@ function He({
413
413
  style: {
414
414
  display: "grid",
415
415
  gridTemplateColumns: "repeat(7, 1fr)",
416
- minWidth: "100%"
416
+ minWidth: "100%",
417
+ height: "100%"
417
418
  },
418
419
  children: e.map((o, i) => {
419
- const g = Re(n, o), b = Ae(
420
- g,
420
+ const b = Re(n, o), y = Fe(
421
+ b,
421
422
  o
422
423
  );
423
424
  return /* @__PURE__ */ h(
@@ -426,9 +427,9 @@ function He({
426
427
  role: "row",
427
428
  "aria-label": `${o.format("dddd")} ${o.format("D")}일`,
428
429
  style: {
429
- borderLeft: `1px solid ${S[20]}`
430
+ borderLeft: `1px solid ${L[20]}`
430
431
  },
431
- children: /* @__PURE__ */ R(
432
+ children: /* @__PURE__ */ A(
432
433
  m,
433
434
  {
434
435
  style: {
@@ -437,86 +438,86 @@ function He({
437
438
  flex: 1
438
439
  },
439
440
  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(
441
+ R.map(({ time: c, label: s, isCurrentTime: t }, r) => {
442
+ const l = a === 1 && r === z && i === I;
443
+ if (typeof H == "function") {
444
+ const u = H(
444
445
  o.format("YYYY-MM-DD"),
445
- l
446
+ c
446
447
  );
447
- return fe(c, {
448
- key: `schedule-block-${o}-${r}-${i}-${l}`,
449
- onKeyDown: ue,
450
- onFocus: le(o, s),
448
+ return he(u, {
449
+ key: `schedule-block-${o}-${r}-${i}-${c}`,
450
+ onKeyDown: le,
451
+ onFocus: ue(o, s),
451
452
  role: "gridcell",
452
453
  "data-row": r,
453
454
  "data-col": i,
454
455
  "data-week": a,
455
- "data-time": l,
456
+ "data-time": c,
456
457
  "aria-current": t ? "time" : void 0,
457
- tabIndex: u ? 0 : -1,
458
+ tabIndex: l ? 0 : -1,
458
459
  "aria-label": `${o.format("dddd")} ${o.format("D")}일 ${s}`,
459
- ...c.props,
460
+ ...u.props,
460
461
  style: {
461
- ...c.props.style,
462
- borderTop: r > 0 ? `1px solid ${S[20]}` : void 0,
463
- height: H,
464
- minHeight: $,
462
+ ...u.props.style,
463
+ borderTop: r > 0 ? `1px solid ${L[20]}` : void 0,
464
+ height: Y,
465
+ minHeight: w,
465
466
  zIndex: 0
466
467
  }
467
468
  });
468
469
  }
469
470
  return /* @__PURE__ */ h(
470
- me,
471
+ pe,
471
472
  {
472
- onKeyDown: ue,
473
- onFocus: le(o, s),
473
+ onKeyDown: le,
474
+ onFocus: ue(o, s),
474
475
  role: "gridcell",
475
476
  "data-row": r,
476
477
  "data-col": i,
477
478
  "data-week": a,
478
- "data-time": l,
479
+ "data-time": c,
479
480
  "aria-current": t ? "time" : void 0,
480
- tabIndex: u ? 0 : -1,
481
+ tabIndex: l ? 0 : -1,
481
482
  "aria-label": `${o.format("dddd")} ${o.format("D")}일 ${s}`,
482
483
  style: {
483
- borderTop: r > 0 ? `1px solid ${S[20]}` : void 0,
484
- height: H,
485
- minHeight: $,
484
+ borderTop: r > 0 ? `1px solid ${L[20]}` : void 0,
485
+ height: Y,
486
+ minHeight: w,
486
487
  zIndex: 0
487
488
  }
488
489
  },
489
- `schedule-block-${o}-${r}-${i}-${l}`
490
+ `schedule-block-${o}-${r}-${i}-${c}`
490
491
  );
491
492
  }),
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;
493
+ y.map(
494
+ ({ children: c, startDate: s, endDate: t, totalColumns: r, columnIndex: l }) => {
495
+ 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, O = c;
495
496
  return /* @__PURE__ */ h(
496
497
  m,
497
498
  {
498
499
  style: {
499
500
  position: "absolute",
500
- top: `${be + (x > 0 ? 1 : 0)}px`,
501
- left: `${$e}%`,
501
+ top: `${Ee + (x > 0 ? 1 : 0)}px`,
502
+ left: `${Se}%`,
502
503
  width: `${de}%`,
503
- height: `${ye - (x > 0 ? 1 : 0)}px`,
504
+ height: `${Le - (x > 0 ? 1 : 0)}px`,
504
505
  zIndex: 1
505
506
  },
506
- children: fe(Q, {
507
+ children: he(O, {
507
508
  role: "button",
508
509
  tabIndex: a === 1 ? 0 : -1,
509
- onKeyDown: ge(Q.props.onKeyDown),
510
+ onKeyDown: ke(O.props.onKeyDown),
510
511
  "data-start-date": s,
511
512
  "data-start-time": v(s).format("HH:mm"),
512
513
  "data-end-date": t,
513
514
  "data-end-time": v(t).format("HH:mm"),
514
515
  "data-is-event": !0,
515
516
  "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
517
+ ...O.props
517
518
  })
518
519
  },
519
- `${s}-${t}-${u}-${r}`
520
+ `${s}-${t}-${l}-${r}`
520
521
  );
521
522
  }
522
523
  )
@@ -532,14 +533,14 @@ function He({
532
533
  ))
533
534
  }
534
535
  ),
535
- G
536
+ $e
536
537
  ]
537
538
  }
538
539
  )
539
540
  ] }),
540
- /* @__PURE__ */ h(C, { role: "status", visuallyHidden: !0, children: ve })
541
+ /* @__PURE__ */ h(q, { role: "status", visuallyHidden: !0, children: be })
541
542
  ] });
542
543
  }
543
544
  export {
544
- He as default
545
+ Ye as default
545
546
  };