@dotss/ui 0.0.12 → 1.0.1

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 (54) hide show
  1. package/Button/index.d.ts +1 -0
  2. package/DatePicker/DatePicker.cjs +40 -30
  3. package/DatePicker/DatePicker.d.ts +1 -0
  4. package/DatePicker/DatePicker.es.js +477 -301
  5. package/DatePicker/EventDotGroup/EventDotGroup.cjs +3 -3
  6. package/DatePicker/EventDotGroup/EventDotGroup.es.js +14 -14
  7. package/FormControlText/FormControlText.cjs +2 -2
  8. package/FormControlText/FormControlText.es.js +14 -14
  9. package/Icon/Icon.cjs +1 -1
  10. package/Icon/Icon.es.js +1 -1
  11. package/Menu/Menu.cjs +6 -6
  12. package/Menu/Menu.es.js +83 -79
  13. package/Menu/MenuBlock/MenuBlock.cjs +5 -11
  14. package/Menu/MenuBlock/MenuBlock.es.js +19 -29
  15. package/Menu/MenuButton/MenuButton.cjs +1 -1
  16. package/Menu/MenuButton/MenuButton.d.ts +1 -1
  17. package/Menu/MenuButton/MenuButton.es.js +38 -29
  18. package/Tooltip/Tooltip.cjs +5 -5
  19. package/Tooltip/Tooltip.d.ts +2 -0
  20. package/Tooltip/Tooltip.es.js +84 -84
  21. package/package.json +1 -1
  22. package/resources/tictoccroc/icons/fill/alphabet-fill.svg-CvfRsdBW.js +5 -0
  23. package/resources/tictoccroc/icons/fill/alphabet-fill.svg-HBXWjzrC.cjs +1 -0
  24. package/resources/tictoccroc/icons/fill/{certified-fill.svg-B_RVx6K_.cjs → certified-fill.svg-DA375i9-.cjs} +1 -1
  25. package/resources/tictoccroc/icons/fill/{certified-fill.svg-CK7UqYft.js → certified-fill.svg-DBC-EEKD.js} +1 -1
  26. package/resources/tictoccroc/icons/fill/check-fill.svg-0_5PrDLC.js +5 -0
  27. package/resources/tictoccroc/icons/fill/check-fill.svg-BKKTgIa3.cjs +1 -0
  28. package/resources/tictoccroc/icons/fill/index.d.ts +4 -0
  29. package/resources/tictoccroc/icons/fill/search-fill.svg-BvLNCg-N.cjs +1 -0
  30. package/resources/tictoccroc/icons/fill/search-fill.svg-DnxhncI6.js +5 -0
  31. package/resources/tictoccroc/icons/fill/time-fill.svg-CbMJxmhK.js +5 -0
  32. package/resources/tictoccroc/icons/fill/time-fill.svg-DcMfM75a.cjs +1 -0
  33. package/resources/tictoccroc/icons/index.ts-DI_CztBn.cjs +1 -0
  34. package/resources/tictoccroc/icons/index.ts-Dt89JG4Z.js +236 -0
  35. package/themes/tictoccroc/colors/background.d.ts +2 -2
  36. package/themes/tictoccroc/colors/blue.d.ts +1 -1
  37. package/themes/tictoccroc/colors/classType.d.ts +1 -1
  38. package/themes/tictoccroc/colors/etc.d.ts +2 -2
  39. package/themes/tictoccroc/colors/green.d.ts +1 -1
  40. package/themes/tictoccroc/colors/grey.d.ts +1 -1
  41. package/themes/tictoccroc/colors/pink.d.ts +1 -1
  42. package/themes/tictoccroc/colors/yellow.d.ts +1 -1
  43. package/themes/tictoccroc/parentLight.d.ts +1 -1
  44. package/themes/tictoccroc/teacherLight.d.ts +1 -1
  45. package/themes/tictoccroc/typography/body.d.ts +1 -1
  46. package/themes/tictoccroc/typography/caption.d.ts +1 -1
  47. package/themes/tictoccroc/typography/display.d.ts +1 -1
  48. package/themes/tictoccroc/typography/headline.d.ts +1 -1
  49. package/utils/getIconLabel/getIconLabel.cjs +1 -1
  50. package/utils/getIconLabel/getIconLabel.d.ts +1 -1
  51. package/utils/getIconLabel/getIconLabel.es.js +5 -1
  52. package/utils/getPaletteColor/getPaletteColor.d.ts +1 -1
  53. package/resources/tictoccroc/icons/index.ts-BmqvB_n6.cjs +0 -1
  54. package/resources/tictoccroc/icons/index.ts-CzTh-XsD.js +0 -228
@@ -1,18 +1,20 @@
1
- import { jsxs as H, jsx as u } from "@emotion/react/jsx-runtime";
2
- import { forwardRef as Pt, useState as Y, useRef as v, useCallback as te, useLayoutEffect as Yt, useEffect as Z } from "react";
3
- import ct from "../IconButton/IconButton.es.js";
4
- import ee from "../Menu/Menu.es.js";
5
- import ne from "../Menu/MenuBlock/MenuBlock.es.js";
6
- import "../Menu/MenuButton/MenuButton.es.js";
7
- import re from "../core/useTheme.es.js";
1
+ import { jsxs as S, jsx as f, Fragment as fe } from "@emotion/react/jsx-runtime";
2
+ import { forwardRef as de, useState as X, useRef as R, useCallback as he, useLayoutEffect as Bt, useEffect as nt } from "react";
3
+ import me from "../Flexbox/Flexbox.es.js";
4
+ import _t from "../Icon/Icon.es.js";
5
+ import Kt from "../IconButton/IconButton.es.js";
6
+ import pe from "../Menu/Menu.es.js";
7
+ import ge from "../Menu/MenuBlock/MenuBlock.es.js";
8
+ import qt from "../Menu/MenuButton/MenuButton.es.js";
9
+ import ye from "../core/useTheme.es.js";
8
10
  import x from "@emotion/styled";
9
- import P from "../utils/getContrastingTextColor/getContrastingTextColor.es.js";
10
- const ie = x.div`
11
+ import it from "../utils/getContrastingTextColor/getContrastingTextColor.es.js";
12
+ const De = x.div`
11
13
  position: relative;
12
14
  display: flex;
13
15
  flex-direction: column;
14
16
  gap: ${({ theme: { spacing: t } }) => t.content(2)}px;
15
- `, se = x.div`
17
+ `, Ut = x.div`
16
18
  display: inline-flex;
17
19
  align-items: center;
18
20
  justify-content: flex-start;
@@ -30,7 +32,7 @@ const ie = x.div`
30
32
  lineHeight: t.lineHeight,
31
33
  letterSpacing: t.letterSpacing
32
34
  })};
33
- `, oe = x.div`
35
+ `, $e = x.div`
34
36
  display: flex;
35
37
  align-items: center;
36
38
  justify-content: center;
@@ -46,7 +48,7 @@ const ie = x.div`
46
48
  lineHeight: t.lineHeight,
47
49
  letterSpacing: t.letterSpacing
48
50
  })};
49
- `, ce = x.div`
51
+ `, we = x.div`
50
52
  display: flex;
51
53
  align-items: center;
52
54
  padding: 0 ${({ theme: { spacing: t }, edgeSpacing: n }) => t.content(n || 0)}px;
@@ -68,22 +70,22 @@ const ie = x.div`
68
70
  color: t[50]
69
71
  })};
70
72
  }
71
- `, ae = x.div`
73
+ `, be = x.div`
72
74
  overflow: hidden;
73
- `, le = x.div`
75
+ `, xe = x.div`
74
76
  display: flex;
75
77
  transform: translate3d(0, 0, 0);
76
- `, Ft = x.div`
78
+ `, Gt = x.div`
77
79
  display: flex;
78
80
  flex-direction: column;
79
81
  min-width: 100%;
80
82
  gap: ${({ theme: { spacing: t } }) => t.content(2)}px;
81
83
  padding: ${({ theme: { spacing: t } }) => t.content(2)}px
82
84
  ${({ theme: { spacing: t }, edgeSpacing: n }) => t.content(n || 0)}px;
83
- `, jt = x.div`
85
+ `, Vt = x.div`
84
86
  display: flex;
85
87
  width: 100%;
86
- `, Ot = x.div`
88
+ `, Jt = x.div`
87
89
  position: relative;
88
90
  display: inline-flex;
89
91
  align-items: center;
@@ -91,10 +93,20 @@ const ie = x.div`
91
93
  flex-direction: column;
92
94
  gap: ${({ theme: { spacing: t } }) => t.content(1)}px;
93
95
  flex: 1;
94
- cursor: ${({ disabled: t }) => t ? "not-allowed" : "pointer"};
95
- pointer-events: ${({ disabled: t }) => t ? "none" : "auto"};
96
+ cursor: pointer;
97
+ pointer-events: auto;
96
98
  min-width: 30px;
97
99
 
100
+ &:focus-visible {
101
+ outline: 2px solid ${({ theme: { palette: t } }) => t.grey.black};
102
+ z-index: 10;
103
+ }
104
+
105
+ &[aria-disabled='true'] {
106
+ cursor: not-allowed;
107
+ color: ${({ theme: { palette: t } }) => t.grey[30]};
108
+ }
109
+
98
110
  & > div:nth-of-type(1) {
99
111
  position: relative;
100
112
  display: inline-flex;
@@ -125,14 +137,13 @@ const ie = x.div`
125
137
  palette: { brand: t, grey: n }
126
138
  },
127
139
  variant: r,
128
- today: i,
129
- selected: o,
130
- disabled: l
140
+ today: a,
141
+ selected: c
131
142
  }) => {
132
- if (o) {
133
- let s = {
143
+ if (c) {
144
+ let h = {
134
145
  fontWeight: 700,
135
- color: P(t.primary.main, [n.white, n[100]]),
146
+ color: it(t.primary.main, [n.white, n[100]]),
136
147
  "& > div:nth-of-type(1):before": {
137
148
  content: '""',
138
149
  position: "absolute",
@@ -141,13 +152,16 @@ const ie = x.div`
141
152
  width: 30,
142
153
  height: 30,
143
154
  transform: "translate(-50%, -50%)",
144
- backgroundColor: l ? t.primary.disable : t.primary.main,
155
+ backgroundColor: t.primary.main,
145
156
  borderRadius: "50%"
157
+ },
158
+ '&[aria-disabled="true"] > div:nth-of-type(1):before': {
159
+ backgroundColor: t.primary.disable
146
160
  }
147
161
  };
148
- return r === "start" && (s = {
162
+ return r === "start" && (h = {
149
163
  fontWeight: 700,
150
- color: P(t.primary.main, [n.white, n[100]]),
164
+ color: it(t.primary.main, [n.white, n[100]]),
151
165
  overflow: "hidden",
152
166
  "& > div:nth-of-type(1):before": {
153
167
  content: '""',
@@ -157,23 +171,29 @@ const ie = x.div`
157
171
  width: 30,
158
172
  height: 30,
159
173
  transform: "translate(-50%, -50%)",
160
- backgroundColor: l ? t.primary.disable : t.primary.main,
174
+ backgroundColor: t.primary.main,
161
175
  borderTopLeftRadius: 100,
162
176
  borderBottomLeftRadius: 100
163
177
  },
178
+ '&[aria-disabled="true"] > div:nth-of-type(1):before': {
179
+ backgroundColor: t.primary.disable
180
+ },
164
181
  "& > div:nth-of-type(1):after": {
165
182
  content: '""',
166
183
  position: "absolute",
167
184
  top: "50%",
168
- left: 30,
185
+ left: "50%",
169
186
  width: "100%",
170
187
  height: 30,
171
188
  transform: "translateY(-50%)",
172
- backgroundColor: l ? t.primary.disable : t.primary.main
189
+ backgroundColor: t.primary.main
190
+ },
191
+ '&[aria-disabled="true"] > div:nth-of-type(1):after': {
192
+ backgroundColor: t.primary.disable
173
193
  }
174
- }), r === "end" && (s = {
194
+ }), r === "end" && (h = {
175
195
  fontWeight: 700,
176
- color: P(t.primary.main, [n.white, n[100]]),
196
+ color: it(t.primary.main, [n.white, n[100]]),
177
197
  overflow: "hidden",
178
198
  "& > div:nth-of-type(1):before": {
179
199
  content: '""',
@@ -183,10 +203,13 @@ const ie = x.div`
183
203
  width: 30,
184
204
  height: 30,
185
205
  transform: "translate(-50%, -50%)",
186
- backgroundColor: l ? t.primary.disable : t.primary.main,
206
+ backgroundColor: t.primary.main,
187
207
  borderTopRightRadius: 100,
188
208
  borderBottomRightRadius: 100
189
209
  },
210
+ '&[aria-disabled="true"] > div:nth-of-type(1):before': {
211
+ backgroundColor: t.primary.disable
212
+ },
190
213
  "& > div:nth-of-type(1):after": {
191
214
  content: '""',
192
215
  position: "absolute",
@@ -195,11 +218,14 @@ const ie = x.div`
195
218
  width: "100%",
196
219
  height: 30,
197
220
  transform: "translateY(-50%)",
198
- backgroundColor: l ? t.primary.disable : t.primary.main
221
+ backgroundColor: t.primary.main
222
+ },
223
+ '&[aria-disabled="true"] > div:nth-of-type(1):after': {
224
+ backgroundColor: t.primary.disable
199
225
  }
200
- }), r === "middle" && (s = {
226
+ }), r === "middle" && (h = {
201
227
  fontWeight: 700,
202
- color: P(t.primary.main, [n.white, n[100]]),
228
+ color: it(t.primary.main, [n.white, n[100]]),
203
229
  overflow: "hidden",
204
230
  "& > div:nth-of-type(1):after": {
205
231
  content: '""',
@@ -209,11 +235,14 @@ const ie = x.div`
209
235
  width: "calc(100% + 1px)",
210
236
  height: 30,
211
237
  transform: "translate(-50%, -50%)",
212
- backgroundColor: l ? t.primary.disable : t.primary.main
238
+ backgroundColor: t.primary.main
239
+ },
240
+ '&[aria-disabled="true"] > div:nth-of-type(1):after': {
241
+ backgroundColor: t.primary.disable
213
242
  }
214
- }), s;
243
+ }), h;
215
244
  }
216
- return i ? {
245
+ return a ? {
217
246
  "& > div:nth-of-type(1):after": {
218
247
  content: '""',
219
248
  position: "absolute",
@@ -230,395 +259,542 @@ const ie = x.div`
230
259
 
231
260
  ${({
232
261
  theme: {
233
- palette: { grey: t, pink: n, brand: r }
262
+ palette: { pink: t, brand: n }
234
263
  },
235
- holiday: i,
236
- disabled: o,
237
- selected: l
264
+ holiday: r,
265
+ selected: a
238
266
  }) => {
239
- let s = null;
240
- return i && (s = {
241
- color: P(l ? r.primary.main : "transparent", [
242
- n[30],
243
- n[100]
244
- ])
245
- }), o && (s = {
246
- color: t[30]
247
- }), o && i && (s = {
248
- color: n[30]
249
- }), s;
267
+ let c = null;
268
+ return r && (c = {
269
+ color: it(a ? n.primary.main : "transparent", [
270
+ t[30],
271
+ t[100]
272
+ ]),
273
+ '&[aria-disabled="true"]': {
274
+ color: t[30]
275
+ }
276
+ }), c;
250
277
  }}
251
- `, fe = x.div`
278
+ `, Pt = x.div`
252
279
  display: flex;
253
280
  align-items: center;
254
281
  justify-content: center;
255
282
 
256
283
  cursor: ${({ clickable: t }) => t ? "pointer" : "default"};
257
- `, Xt = x.span`
284
+ `, Qt = x.span`
258
285
  width: 100%;
259
286
  min-width: 100%;
260
287
  height: 6px;
261
288
  min-height: 6px;
262
- `, ue = 30, xe = Pt(function({
289
+ `, ke = 30, Le = de(function({
263
290
  children: n,
264
291
  onChange: r,
265
- value: i,
266
- date: o,
267
- minDate: l,
268
- maxDate: s,
269
- holidayDates: h,
270
- disableDates: K,
271
- showWeekHead: at = !1,
292
+ value: a,
293
+ date: c,
294
+ minDate: h,
295
+ maxDate: d,
296
+ holidayDates: p,
297
+ disableDates: P,
298
+ showWeekHead: gt = !1,
272
299
  multiple: T = !1,
273
- period: tt = !1,
274
- enableMonthSelect: b = !1,
275
- showToday: At = !1,
276
- edgeSpacing: lt = 0,
277
- renderEvent: z,
278
- inlineCSS: Et,
279
- ...Nt
280
- }, qt) {
281
- const { spacing: St } = re(), [O, ft] = Y(
282
- (typeof o == "string" || typeof o == "number" ? new Date(o) : o) || /* @__PURE__ */ new Date()
283
- ), [g, U] = Y(() => Array.isArray(i) && i.length > 0 ? $(i[0]) : $(i)), [I, et] = Y(() => Array.isArray(i) && i.length > 1 ? $(i[i.length - 1]) : null), [M, vt] = Y(0), [w, X] = Y(1), [kt, Rt] = Y(!1), [ut, Wt] = Y(!1), dt = v(null), m = v(null), nt = v(0), R = v(0), A = v(!1), V = v(w), ht = v(), mt = v(null), pt = v(null), W = O.getFullYear(), rt = O.getMonth(), Ht = Tt(W, rt), C = j(rt), _ = $(i), B = $(h), E = $(K), yt = q(O, l) || _t(O, l), gt = F(O, s) || _t(O, s), it = new Date(W, rt - 1), st = new Date(W, rt + 1), J = `${W}. ${C}`, N = tt && !!g && !!I, bt = [
300
+ period: ot = !1,
301
+ enableMonthSelect: Q = !1,
302
+ showToday: Wt = !1,
303
+ edgeSpacing: yt = 0,
304
+ renderEvent: Y,
305
+ inlineCSS: ee,
306
+ monthProps: st,
307
+ ...re
308
+ }, ne) {
309
+ const { spacing: Ht } = ye(), [H, Dt] = X(
310
+ (typeof c == "string" || typeof c == "number" ? new Date(c) : c) || /* @__PURE__ */ new Date()
311
+ ), [$, Z] = X(() => Array.isArray(a) && a.length > 0 ? y(a[0]) : y(a)), [L, at] = X(() => Array.isArray(a) && a.length > 1 ? y(a[a.length - 1]) : null), [k, Ft] = X(0), [w, B] = X(1), [zt, Yt] = X(!1), [$t, wt] = X(!1), tt = R(null), g = R(null), ct = R(0), F = R(0), v = R(!1), et = R(w), bt = R(), lt = R(null), xt = R(null), M = H.getFullYear(), ut = H.getMonth(), Lt = Rt(M, ut), I = N(ut), _ = y(a), K = y(p), q = y(P), kt = V(H, h) || pt(H, h), Mt = C(H, d) || pt(H, d), ft = new Date(M, ut - 1), dt = new Date(M, ut + 1), O = `${M}. ${I}`, j = `${M}년 ${I}월`, U = ot && !!$ && !!L, It = [
284
312
  {
285
- year: it.getFullYear(),
286
- month: j(it.getMonth()),
287
- weeks: Tt(it.getFullYear(), it.getMonth())
313
+ year: ft.getFullYear(),
314
+ month: N(ft.getMonth()),
315
+ weeks: Rt(ft.getFullYear(), ft.getMonth())
288
316
  },
289
317
  {
290
- year: W,
291
- month: C,
292
- weeks: Ht
318
+ year: M,
319
+ month: I,
320
+ weeks: Lt
293
321
  },
294
322
  {
295
- year: st.getFullYear(),
296
- month: j(st.getMonth()),
297
- weeks: Tt(st.getFullYear(), st.getMonth())
323
+ year: dt.getFullYear(),
324
+ month: N(dt.getMonth()),
325
+ weeks: Rt(dt.getFullYear(), dt.getMonth())
298
326
  }
299
- ], Dt = typeof z == "function", Gt = bt[1].weeks.length * (ue + (Dt ? 10 : 0) + St.content(2)) + St.content(2), zt = (e) => () => {
300
- T && (m.current && (m.current.style.transition = "none", m.current.style.cursor = "grabbing"), nt.current = e, A.current = !0);
301
- }, L = te(() => {
302
- if (!A.current) return;
303
- const e = M - R.current, f = Math.abs(M - e), a = M * 0.1;
304
- m.current && (m.current.style.transform = `translate3d(-${M * w}px, 0, 0)`, m.current.style.cursor = "grab", m.current.style.transition = "transform 0.2s"), nt.current = 0, R.current = 0, A.current = !1, !(f <= a) && (M < e ? X((p) => p + 1) : M > e && X((p) => p - 1));
305
- }, [M, w]), It = (e) => () => {
306
- if (!(A.current || w !== 1)) {
307
- if (!tt) {
308
- r == null || r(e, $);
327
+ ], At = typeof Y == "function", ie = It[1].weeks.length * (ke + (At ? 10 : 0) + Ht.content(2)) + Ht.content(2), Ot = (e) => () => {
328
+ T && (g.current && (g.current.style.transition = "none", g.current.style.cursor = "grabbing"), ct.current = e, v.current = !0);
329
+ }, E = he(() => {
330
+ if (!v.current) return;
331
+ const e = k - F.current, u = Math.abs(k - e), o = k * 0.1;
332
+ g.current && (g.current.style.transform = `translate3d(-${k * w}px, 0, 0)`, g.current.style.cursor = "grab", g.current.style.transition = "transform 0.2s"), ct.current = 0, F.current = 0, v.current = !1, !(u <= o) && (k < e ? B((s) => s + 1) : k > e && B((s) => s - 1));
333
+ }, [k, w]), St = (e, u) => () => {
334
+ if (!(v.current || w !== 1) && !u) {
335
+ if (!ot) {
336
+ r == null || r(e, y);
309
337
  return;
310
338
  }
311
- if (k(e, g) && Array.isArray(i) && i.length === 1) {
312
- U(null), et(null), r == null || r([], $);
339
+ if (W(e, $) && Array.isArray(a) && a.length === 1) {
340
+ Z(null), at(null), r == null || r([], y);
313
341
  return;
314
- } else if (k(e, g) && !Array.isArray(i) && k(e, i)) {
315
- U(null), et(null), r == null || r([], $);
342
+ } else if (W(e, $) && !Array.isArray(a) && W(e, a)) {
343
+ Z(null), at(null), r == null || r([], y);
316
344
  return;
317
345
  }
318
- if (!g) {
319
- U(e), r == null || r(e, $);
346
+ if (!$) {
347
+ Z(e), r == null || r(e, y);
320
348
  return;
321
349
  }
322
- if (!I && g) {
323
- const [f, a] = F(e, g) ? [g, e] : [e, g];
324
- U(f), et(a);
325
- const p = Bt([f, a], K);
326
- r == null || r(p, $);
350
+ if (!L && $) {
351
+ const [o, s] = C(e, $) ? [$, e] : [e, $];
352
+ Z(o), at(s);
353
+ const i = te([o, s], P);
354
+ r == null || r(i, y);
327
355
  return;
328
356
  }
329
- g && I && (U(e), et(null), r == null || r(e, $));
357
+ $ && L && (Z(e), at(null), r == null || r(e, y));
330
358
  }
331
- }, Kt = (e) => zt(e.clientX)(), Ut = (e) => zt(e.touches[0].clientX)(), Vt = () => {
332
- kt || (m.current && (m.current.style.transition = "transform 0.2s"), X((e) => e - 1));
333
- }, Ct = () => {
334
- kt || (m.current && (m.current.style.transition = "transform 0.2s"), X((e) => e + 1));
335
- }, $t = () => Wt((e) => !e), Jt = (e) => {
359
+ }, oe = (e) => Ot(e.clientX)(), se = (e) => Ot(e.touches[0].clientX)(), jt = () => {
360
+ zt || (g.current && (g.current.style.transition = "transform 0.2s"), B((e) => e - 1));
361
+ }, Et = () => {
362
+ zt || (g.current && (g.current.style.transition = "transform 0.2s"), B((e) => e + 1));
363
+ }, ht = (e) => {
364
+ e.stopPropagation(), wt((u) => !u);
365
+ }, ae = () => wt(!1), ce = (e) => {
336
366
  if (!e) return;
337
- const [f, a] = e.toString().split(".").map(Number);
338
- ft(new Date(f, a - 1)), Wt(!1);
367
+ const [u, o] = e.toString().split(".").map(Number);
368
+ Dt(new Date(u, o - 1)), wt(!1);
369
+ }, Xt = (e, u) => (o) => {
370
+ const s = new Date(e);
371
+ let i = null;
372
+ if (o.stopPropagation(), o.key === "ArrowRight")
373
+ i = new Date(s), i.setDate(s.getDate() + 1);
374
+ else if (o.key === "ArrowLeft")
375
+ i = new Date(s), i.setDate(s.getDate() - 1);
376
+ else if (o.key === "ArrowDown")
377
+ i = new Date(s), i.setDate(s.getDate() + 7);
378
+ else if (o.key === "ArrowUp")
379
+ i = new Date(s), i.setDate(s.getDate() - 7);
380
+ else if (o.key === "Home")
381
+ i = new Date(s), i.setDate(s.getDate() - s.getDay());
382
+ else if (o.key === "End")
383
+ i = new Date(s), i.setDate(s.getDate() + (6 - s.getDay()));
384
+ else if (o.key === "PageUp")
385
+ i = new Date(s), i.setMonth(s.getMonth() - 1);
386
+ else if (o.key === "PageDown")
387
+ i = new Date(s), i.setMonth(s.getMonth() + 1);
388
+ else if (o.key === "Enter" || o.key === " ") {
389
+ o.preventDefault(), St(e, u)();
390
+ return;
391
+ } else if (o.key === "Escape") {
392
+ o.preventDefault(), r == null || r([], y);
393
+ return;
394
+ }
395
+ if (i && tt.current) {
396
+ const D = s.getMonth(), m = s.getFullYear(), b = i.getMonth(), l = i.getFullYear(), A = y(i), z = tt.current.querySelector(
397
+ `[data-date="${A}"]`
398
+ );
399
+ if (z) {
400
+ if (D !== b || m !== l) {
401
+ i > s ? (Et(), setTimeout(() => {
402
+ z.focus();
403
+ }, 0)) : (jt(), setTimeout(() => {
404
+ z.focus();
405
+ }, 0));
406
+ return;
407
+ }
408
+ z.focus();
409
+ }
410
+ }
339
411
  };
340
- return Yt(() => {
412
+ return Bt(() => {
341
413
  var e;
342
- vt(((e = dt.current) == null ? void 0 : e.clientWidth) || 0);
343
- }, [T]), Z(() => {
414
+ Ft(((e = tt.current) == null ? void 0 : e.clientWidth) || 0);
415
+ }, [T]), nt(() => {
344
416
  const e = () => {
345
- var f;
346
- vt(((f = dt.current) == null ? void 0 : f.clientWidth) || 0);
417
+ var u;
418
+ Ft(((u = tt.current) == null ? void 0 : u.clientWidth) || 0);
347
419
  };
348
420
  return window.addEventListener("resize", e), window.addEventListener("scroll", e), () => {
349
421
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e);
350
422
  };
351
- }, [T]), Z(() => {
352
- const e = m.current, f = (c, y, D) => {
353
- if (!e || !A.current) return;
354
- R.current = c - nt.current;
355
- const d = y - nt.current, S = 5;
356
- if (A.current = A.current || Math.abs(R.current) > S && Math.abs(d) < S * 2, D.cancelable && D.preventDefault(), A.current) {
357
- if (yt && R.current > 0) {
358
- L();
423
+ }, [T]), nt(() => {
424
+ const e = g.current, u = (i, D, m) => {
425
+ if (!e || !v.current) return;
426
+ F.current = i - ct.current;
427
+ const b = D - ct.current, l = 5;
428
+ if (v.current = v.current || Math.abs(F.current) > l && Math.abs(b) < l * 2, m.cancelable && m.preventDefault(), v.current) {
429
+ if (kt && F.current > 0) {
430
+ E();
359
431
  return;
360
432
  }
361
- if (gt && R.current < 0) {
362
- L();
433
+ if (Mt && F.current < 0) {
434
+ E();
363
435
  return;
364
436
  }
365
- Math.abs(R.current) >= 10 && (e.style.transform = `translate3d(${R.current - M * w}px, 0, 0)`, e.style.cursor = "grabbing");
437
+ Math.abs(F.current) >= 10 && (e.style.transform = `translate3d(${F.current - k * w}px, 0, 0)`, e.style.cursor = "grabbing");
366
438
  }
367
- }, a = (c) => f(c.touches[0].clientX, c.touches[0].clientY, c), p = (c) => {
368
- A.current && f(c.clientX, c.clientY, c);
439
+ }, o = (i) => u(i.touches[0].clientX, i.touches[0].clientY, i), s = (i) => {
440
+ v.current && u(i.clientX, i.clientY, i);
369
441
  };
370
- return e == null || e.addEventListener("mousemove", p), e == null || e.addEventListener("touchmove", a), () => {
371
- e == null || e.removeEventListener("mousemove", p), e == null || e.removeEventListener("touchmove", a);
442
+ return e == null || e.addEventListener("mousemove", s), e == null || e.addEventListener("touchmove", o), () => {
443
+ e == null || e.removeEventListener("mousemove", s), e == null || e.removeEventListener("touchmove", o);
372
444
  };
373
- }, [M, w, L, gt, yt]), Z(() => {
374
- Rt(!0), ht.current = setTimeout(() => {
375
- m.current && (m.current.style.transition = "none"), w > V.current ? (X(1), ft((e) => new Date(e.setMonth(e.getMonth() + 1))), V.current = 1) : w < V.current ? (ft((e) => new Date(e.setMonth(e.getMonth() - 1))), X(1), V.current = 1) : V.current = w, Rt(!1);
445
+ }, [k, w, E, Mt, kt]), nt(() => {
446
+ Yt(!0), bt.current = setTimeout(() => {
447
+ g.current && (g.current.style.transition = "none"), w > et.current ? (B(1), Dt((e) => new Date(e.setMonth(e.getMonth() + 1))), et.current = 1) : w < et.current ? (Dt((e) => new Date(e.setMonth(e.getMonth() - 1))), B(1), et.current = 1) : et.current = w, Yt(!1);
376
448
  }, 200);
377
- }, [w]), Yt(() => {
378
- if (!tt || !Array.isArray(i)) return;
379
- const e = Bt(i, K);
380
- i.length < e.length && (r == null || r(e, $));
381
- }, [tt, i, r, K]), Z(() => {
449
+ }, [w]), Bt(() => {
450
+ if (!ot || !Array.isArray(a)) return;
451
+ const e = te(a, P);
452
+ a.length < e.length && (r == null || r(e, y));
453
+ }, [ot, a, r, P]), nt(() => {
382
454
  let e;
383
- return ut && (e = setTimeout(() => {
384
- if (pt.current) {
385
- const f = pt.current.querySelector("ul"), a = f == null ? void 0 : f.querySelector(`[data-value="${J}"]`);
386
- a == null || a.scrollIntoView({
455
+ return $t && (e = setTimeout(() => {
456
+ if (xt.current) {
457
+ const u = xt.current.querySelector("ul"), o = u == null ? void 0 : u.querySelector(`[data-value="${O}"]`);
458
+ o == null || o.scrollIntoView({
387
459
  block: "start"
388
460
  });
389
461
  }
390
462
  }, 200)), () => {
391
463
  clearTimeout(e);
392
464
  };
393
- }, [ut, J]), Z(() => () => {
394
- ht.current && clearTimeout(ht.current);
395
- }, []), /* @__PURE__ */ H(ie, { ref: qt, ...Nt, css: Et, children: [
396
- T ? /* @__PURE__ */ H(oe, { children: [
397
- /* @__PURE__ */ u(
398
- ct,
465
+ }, [$t, O]), nt(() => () => {
466
+ bt.current && clearTimeout(bt.current);
467
+ }, []), /* @__PURE__ */ S(De, { ref: ne, "aria-label": "달력", role: "application", ...re, css: ee, children: [
468
+ T ? /* @__PURE__ */ S($e, { children: [
469
+ /* @__PURE__ */ f(
470
+ Kt,
399
471
  {
400
472
  name: "ChevronLeftLine",
401
473
  size: "small",
402
- onClick: Vt,
403
- disabled: yt
474
+ onClick: jt,
475
+ disabled: kt,
476
+ "aria-label": `이전 달로 이동, 현재 ${j}`
404
477
  }
405
478
  ),
406
- /* @__PURE__ */ H(
407
- fe,
479
+ Q && /* @__PURE__ */ S(
480
+ Pt,
408
481
  {
409
- ref: mt,
410
- clickable: !!b,
411
- onClick: b ? $t : void 0,
482
+ ref: lt,
483
+ clickable: !0,
484
+ onClick: ht,
485
+ "aria-label": j,
486
+ ...st,
412
487
  children: [
413
- J,
414
- b && /* @__PURE__ */ u(ct, { name: "ArrowDownFill", size: "xSmall" })
488
+ O,
489
+ /* @__PURE__ */ f(
490
+ qt,
491
+ {
492
+ iconOnly: !0,
493
+ isMenuOpen: !1,
494
+ size: "xSmall",
495
+ variant: "text",
496
+ menuId: "date-picker-month-menu",
497
+ onClick: ht,
498
+ "aria-label": `달 변경, 현재 ${j}`,
499
+ startAdornment: /* @__PURE__ */ f(_t, { name: "ArrowDownFill", size: "xSmall" })
500
+ }
501
+ )
415
502
  ]
416
503
  }
417
504
  ),
418
- /* @__PURE__ */ u(
419
- ct,
505
+ !Q && /* @__PURE__ */ f(
506
+ Pt,
507
+ {
508
+ ref: lt,
509
+ id: "date-picker-title",
510
+ clickable: !1,
511
+ "aria-label": j,
512
+ ...st,
513
+ children: O
514
+ }
515
+ ),
516
+ /* @__PURE__ */ f(
517
+ Kt,
420
518
  {
421
519
  name: "ChevronRightLine",
422
520
  size: "small",
423
- onClick: Ct,
424
- disabled: gt
521
+ onClick: Et,
522
+ disabled: Mt,
523
+ "aria-label": `다음 달로 이동, 현재 ${j}`
425
524
  }
426
525
  )
427
- ] }) : /* @__PURE__ */ H(
428
- se,
429
- {
430
- ref: mt,
431
- clickable: !!b,
432
- onClick: b ? $t : void 0,
433
- children: [
434
- J,
435
- b && /* @__PURE__ */ u(ct, { name: "ArrowDownFill", size: "xSmall" })
436
- ]
437
- }
438
- ),
439
- b && /* @__PURE__ */ u(
440
- ee,
526
+ ] }) : /* @__PURE__ */ S(fe, { children: [
527
+ Q && /* @__PURE__ */ S(
528
+ Ut,
529
+ {
530
+ ref: lt,
531
+ clickable: !0,
532
+ onClick: ht,
533
+ "aria-label": j,
534
+ ...st,
535
+ children: [
536
+ O,
537
+ /* @__PURE__ */ f(
538
+ qt,
539
+ {
540
+ iconOnly: !0,
541
+ isMenuOpen: !1,
542
+ size: "xSmall",
543
+ variant: "text",
544
+ menuId: "date-picker-month-menu",
545
+ onClick: ht,
546
+ "aria-label": `달 변경, 현재 ${j}`,
547
+ startAdornment: /* @__PURE__ */ f(_t, { name: "ArrowDownFill", size: "xSmall" })
548
+ }
549
+ )
550
+ ]
551
+ }
552
+ ),
553
+ !Q && /* @__PURE__ */ f(Ut, { id: "date-picker-title", clickable: !1, ...st, children: O })
554
+ ] }),
555
+ Q && /* @__PURE__ */ f(
556
+ pe,
441
557
  {
442
- anchorRef: mt,
443
- ref: pt,
444
- open: ut,
445
- onClose: $t,
446
- onChange: Jt,
447
- value: J,
558
+ id: "date-picker-month-menu",
559
+ anchorRef: lt,
560
+ ref: xt,
561
+ open: $t,
562
+ onClose: ae,
563
+ onChange: ce,
564
+ value: O,
448
565
  placement: T ? "bottom-center" : "bottom-left",
449
566
  width: 160,
450
567
  fitToAnchorWidth: !1,
451
568
  maxHeight: 368,
452
- children: Array.from({ length: 130 }, (e, f) => {
453
- const a = 1970 + f;
454
- return Array.from({ length: 12 }, (p, c) => {
455
- const y = c + 1, D = y < 10 ? `0${y}` : y, d = new Date(a, c + 1, 0).getDate(), S = `${a}-${D}-${d}`, Q = `${a}-${D}-01`;
456
- return q(S, l) || F(Q, s) ? null : /* @__PURE__ */ u(ne, { value: `${a}. ${D}`, children: `${a}. ${D}` }, `${a}-${D}`);
569
+ children: Array.from({ length: 130 }, (e, u) => {
570
+ const o = 1970 + u;
571
+ return Array.from({ length: 12 }, (s, i) => {
572
+ const D = i + 1, m = D < 10 ? `0${D}` : D, b = new Date(o, i + 1, 0).getDate(), l = `${o}-${m}-${b}`, A = `${o}-${m}-01`;
573
+ return V(l, h) || C(A, d) ? null : /* @__PURE__ */ f(
574
+ ge,
575
+ {
576
+ value: `${o}. ${m}`,
577
+ "aria-label": `${o}년 ${m}월 선택`,
578
+ children: `${o}. ${m}`
579
+ },
580
+ `${o}-${m}`
581
+ );
457
582
  });
458
583
  })
459
584
  }
460
585
  ),
461
- at && /* @__PURE__ */ H(ce, { edgeSpacing: lt, children: [
462
- /* @__PURE__ */ u("span", { children: "일" }),
463
- /* @__PURE__ */ u("span", { children: "월" }),
464
- /* @__PURE__ */ u("span", { children: "화" }),
465
- /* @__PURE__ */ u("span", { children: "수" }),
466
- /* @__PURE__ */ u("span", { children: "목" }),
467
- /* @__PURE__ */ u("span", { children: "금" }),
468
- /* @__PURE__ */ u("span", { children: "토" })
469
- ] }),
470
- /* @__PURE__ */ u(ae, { ref: dt, children: /* @__PURE__ */ H(
471
- le,
586
+ /* @__PURE__ */ S(
587
+ me,
472
588
  {
473
- ref: m,
474
- onMouseDown: Kt,
475
- onMouseUp: L,
476
- onMouseLeave: L,
477
- onTouchStart: Ut,
478
- onTouchEnd: L,
479
- onTouchCancel: L,
480
- style: {
481
- transform: T ? `translate3d(-${M * w}px, 0, 0)` : void 0,
482
- cursor: T ? "grab" : void 0,
483
- maxHeight: Gt
484
- },
589
+ flexDirection: "column",
590
+ role: "grid",
591
+ "aria-label": `${M}년 ${I}월 달력`,
485
592
  children: [
486
- T && bt.map(({ year: e, month: f, weeks: a }) => /* @__PURE__ */ u(
487
- Ft,
593
+ gt && /* @__PURE__ */ S(we, { id: "date-picker-week-head", role: "row", edgeSpacing: yt, children: [
594
+ /* @__PURE__ */ f("span", { role: "columnheader", children: "일" }),
595
+ /* @__PURE__ */ f("span", { role: "columnheader", children: "월" }),
596
+ /* @__PURE__ */ f("span", { role: "columnheader", children: "화" }),
597
+ /* @__PURE__ */ f("span", { role: "columnheader", children: "수" }),
598
+ /* @__PURE__ */ f("span", { role: "columnheader", children: "목" }),
599
+ /* @__PURE__ */ f("span", { role: "columnheader", children: "금" }),
600
+ /* @__PURE__ */ f("span", { role: "columnheader", children: "토" })
601
+ ] }),
602
+ /* @__PURE__ */ f(be, { ref: tt, role: "presentation", children: /* @__PURE__ */ S(
603
+ xe,
488
604
  {
489
- edgeSpacing: lt,
490
- children: a.map((p, c) => /* @__PURE__ */ u(jt, { children: p.map((y, D) => {
491
- const d = `${e}-${f}-${G(y || 0)}`, S = !y, Q = k(d, /* @__PURE__ */ new Date()), wt = Array.isArray(B) ? B.includes(d) : B === d, xt = Array.isArray(_) ? _.includes(d) : _ === d, Mt = !y || (Array.isArray(E) ? E.includes(d) : E === d) || F(d, s) || q(d, l), ot = N && k(d, g), Qt = N && k(d, I), Zt = N && F(d, g) && q(d, I), Lt = z == null ? void 0 : z(d);
492
- return /* @__PURE__ */ H(
493
- Ot,
605
+ role: "presentation",
606
+ ref: g,
607
+ onMouseDown: oe,
608
+ onMouseUp: E,
609
+ onMouseLeave: E,
610
+ onTouchStart: se,
611
+ onTouchEnd: E,
612
+ onTouchCancel: E,
613
+ style: {
614
+ transform: T ? `translate3d(-${k * w}px, 0, 0)` : void 0,
615
+ cursor: T ? "grab" : void 0,
616
+ maxHeight: ie
617
+ },
618
+ children: [
619
+ T && It.map(
620
+ ({ year: e, month: u, weeks: o }, s) => /* @__PURE__ */ f(
621
+ Gt,
622
+ {
623
+ role: "rowgroup",
624
+ edgeSpacing: yt,
625
+ className: s === 1 ? "week-body-current" : "",
626
+ children: o.map((i, D) => /* @__PURE__ */ f(
627
+ Vt,
628
+ {
629
+ role: "row",
630
+ children: i.map((m, b) => {
631
+ const l = `${e}-${u}-${J(m || 0)}`, A = !m, z = W(l, /* @__PURE__ */ new Date()), Tt = Array.isArray(K) ? K.includes(l) : K === l, rt = Array.isArray(_) ? _.includes(l) : _ === l, G = !m || (Array.isArray(q) ? q.includes(l) : q === l) || C(l, d) || V(l, h), vt = U && W(l, $), mt = U && W(l, L), le = U && C(l, $) && V(l, L), Ct = pt(l, H), ue = Ct && D === 0 && m === 1 || Ct && rt, Nt = Y == null ? void 0 : Y(l);
632
+ return /* @__PURE__ */ S(
633
+ Jt,
634
+ {
635
+ as: "button",
636
+ role: "gridcell",
637
+ variant: vt ? "start" : mt ? "end" : le ? "middle" : void 0,
638
+ onClick: St(l, G),
639
+ today: Wt && z,
640
+ holiday: Tt,
641
+ tabIndex: ue ? 0 : -1,
642
+ "aria-rowindex": D + 1,
643
+ "aria-colindex": b + 1,
644
+ selected: rt,
645
+ "aria-selected": rt,
646
+ "aria-disabled": G,
647
+ "aria-hidden": m === null,
648
+ "data-date": l,
649
+ onKeyDown: Xt(l, G),
650
+ children: [
651
+ /* @__PURE__ */ f("div", { "aria-label": `${Zt(l)}`, children: /* @__PURE__ */ f("span", { children: m }) }),
652
+ !A && Nt,
653
+ !A && At && !Nt && /* @__PURE__ */ f(Qt, {})
654
+ ]
655
+ },
656
+ `${e}-${u}-week-row-${b}-${m ? l : `${D}-${b}`}`
657
+ );
658
+ })
659
+ },
660
+ `${e}-${u}-week-row-${String(i)}`
661
+ ))
662
+ },
663
+ `week-body-${e}-${u}`
664
+ )
665
+ ),
666
+ !T && /* @__PURE__ */ f(Gt, { role: "rowgroup", edgeSpacing: yt, children: Lt.map((e, u) => /* @__PURE__ */ f(
667
+ Vt,
494
668
  {
495
- variant: ot ? "start" : Qt ? "end" : Zt ? "middle" : void 0,
496
- onClick: It(d),
497
- today: At && Q,
498
- holiday: wt,
499
- selected: xt,
500
- disabled: Mt,
501
- children: [
502
- /* @__PURE__ */ u("div", { children: /* @__PURE__ */ u("span", { children: y }) }),
503
- !S && Lt,
504
- !S && Dt && !Lt && /* @__PURE__ */ u(Xt, {})
505
- ]
669
+ role: "row",
670
+ children: e.map((o, s) => {
671
+ const i = `${M}-${I}-${J(o || 0)}`, D = !o, m = W(i, /* @__PURE__ */ new Date()), b = Array.isArray(K) ? K.includes(i) : K === i, l = Array.isArray(_) ? _.includes(i) : _ === i, A = !o || (Array.isArray(q) ? q.includes(i) : q === i) || C(i, d) || V(i, h), z = U && W(i, $), Tt = U && W(i, L), rt = U && C(i, $) && V(i, L), G = pt(i, H), vt = G && u === 0 && o === 1 || G && l, mt = Y == null ? void 0 : Y(i);
672
+ return /* @__PURE__ */ S(
673
+ Jt,
674
+ {
675
+ as: "button",
676
+ variant: z ? "start" : Tt ? "end" : rt ? "middle" : void 0,
677
+ role: "gridcell",
678
+ onClick: St(i, A),
679
+ today: Wt && m,
680
+ holiday: b,
681
+ "aria-rowindex": u + 1,
682
+ "aria-colindex": s + 1,
683
+ selected: l,
684
+ "aria-selected": l,
685
+ "aria-disabled": A,
686
+ "aria-hidden": o === null,
687
+ tabIndex: vt ? 0 : -1,
688
+ "data-date": i,
689
+ onKeyDown: Xt(i, A),
690
+ children: [
691
+ /* @__PURE__ */ f("div", { "aria-label": `${Zt(i)}`, children: /* @__PURE__ */ f("span", { children: o }) }),
692
+ !D && mt,
693
+ !D && At && !mt && /* @__PURE__ */ f(Qt, {})
694
+ ]
695
+ },
696
+ `${M}-${I}-week-row-${e}-${o ? i : `${u}-${s}`}`
697
+ );
698
+ })
506
699
  },
507
- `${e}-${f}-week-row-${D}-${y ? d : `${c}-${D}`}`
508
- );
509
- }) }, `${e}-${f}-week-row-${String(p)}`))
510
- },
511
- `week-body-${e}-${f}`
512
- )),
513
- !T && /* @__PURE__ */ u(Ft, { edgeSpacing: lt, children: Ht.map((e, f) => /* @__PURE__ */ u(jt, { children: e.map((a, p) => {
514
- const c = `${W}-${C}-${G(a || 0)}`, y = !a, D = k(c, /* @__PURE__ */ new Date()), d = Array.isArray(B) ? B.includes(c) : B === c, S = Array.isArray(_) ? _.includes(c) : _ === c, Q = !a || (Array.isArray(E) ? E.includes(c) : E === c) || F(c, s) || q(c, l), wt = N && k(c, g), xt = N && k(c, I), Mt = N && F(c, g) && q(c, I), ot = z == null ? void 0 : z(c);
515
- return /* @__PURE__ */ H(
516
- Ot,
517
- {
518
- variant: wt ? "start" : xt ? "end" : Mt ? "middle" : void 0,
519
- onClick: It(c),
520
- today: At && D,
521
- holiday: d,
522
- selected: S,
523
- disabled: Q,
524
- children: [
525
- /* @__PURE__ */ u("div", { children: /* @__PURE__ */ u("span", { children: a }) }),
526
- !y && ot,
527
- !y && Dt && !ot && /* @__PURE__ */ u(Xt, {})
528
- ]
529
- },
530
- `${W}-${C}-week-row-${e}-${a ? c : `${f}-${p}`}`
531
- );
532
- }) }, `${W}-${C}-week-row-${String(e)}`)) })
700
+ `${M}-${I}-week-row-${String(e)}`
701
+ )) })
702
+ ]
703
+ }
704
+ ) })
533
705
  ]
534
706
  }
535
- ) }),
707
+ ),
536
708
  n
537
709
  ] });
538
710
  });
539
- function Tt(t, n) {
711
+ function Rt(t, n) {
540
712
  let r = [];
541
- const i = new Date(t, n, 1), o = new Date(t, n + 1, 0).getDate(), l = i.getDay();
542
- let s = Array.from({ length: l }).fill(null);
543
- for (let h = 1; h <= o; h += 1)
544
- s.push(h), (s.length === 7 || h === o) && (r.push(s), s = []);
713
+ const a = new Date(t, n, 1), c = new Date(t, n + 1, 0).getDate(), h = a.getDay();
714
+ let d = Array.from({ length: h }).fill(null);
715
+ for (let p = 1; p <= c; p += 1)
716
+ d.push(p), (d.length === 7 || p === c) && (r.push(d), d = []);
545
717
  return r = r.map(
546
- (h) => Array.from({ length: 7 }).map((K, at) => h[at] || null)
718
+ (p) => Array.from({ length: 7 }).map((P, gt) => p[gt] || null)
547
719
  ), r;
548
720
  }
549
- function j(t) {
721
+ function N(t) {
550
722
  return String(t + 1).length === 1 ? `0${t + 1}` : t + 1;
551
723
  }
552
- function G(t) {
724
+ function J(t) {
553
725
  return String(t).length === 1 ? `0${t}` : t;
554
726
  }
555
- function $(t) {
727
+ function y(t) {
556
728
  if (Array.isArray(t))
557
- return t.map((n) => n instanceof Date ? `${n.getFullYear()}-${j(n.getMonth())}-${G(n.getDate())}` : n);
729
+ return t.map((n) => n instanceof Date ? `${n.getFullYear()}-${N(n.getMonth())}-${J(n.getDate())}` : n);
558
730
  if (t instanceof Date)
559
- return `${t.getFullYear()}-${j(t.getMonth())}-${G(t.getDate())}`;
731
+ return `${t.getFullYear()}-${N(t.getMonth())}-${J(t.getDate())}`;
560
732
  if (typeof t == "number") {
561
733
  const n = new Date(t);
562
- return `${n.getFullYear()}-${j(n.getMonth())}-${G(n.getDate())}`;
734
+ return `${n.getFullYear()}-${N(n.getMonth())}-${J(n.getDate())}`;
563
735
  }
564
736
  return t;
565
737
  }
566
- function F(t, n) {
738
+ function Zt(t) {
739
+ const [n, r, a] = t.split("-");
740
+ return `${n}년 ${Number(r)}월 ${Number(a)}일`;
741
+ }
742
+ function C(t, n) {
567
743
  if (!t || !n)
568
744
  return !1;
569
745
  const r = t instanceof Date ? t : new Date(t);
570
746
  r.setHours(0), r.setMinutes(0), r.setSeconds(0), r.setMilliseconds(0);
571
- const i = r.getTime(), o = n instanceof Date ? n : new Date(n);
572
- o.setHours(0), o.setMinutes(0), o.setSeconds(0), o.setMilliseconds(0);
573
- const l = o.getTime();
574
- return i > l;
747
+ const a = r.getTime(), c = n instanceof Date ? n : new Date(n);
748
+ c.setHours(0), c.setMinutes(0), c.setSeconds(0), c.setMilliseconds(0);
749
+ const h = c.getTime();
750
+ return a > h;
575
751
  }
576
- function q(t, n) {
752
+ function V(t, n) {
577
753
  if (!t || !n)
578
754
  return !1;
579
755
  const r = t instanceof Date ? t : new Date(t);
580
756
  r.setHours(0), r.setMinutes(0), r.setSeconds(0), r.setMilliseconds(0);
581
- const i = r.getTime(), o = n instanceof Date ? n : new Date(n);
582
- o.setHours(0), o.setMinutes(0), o.setSeconds(0), o.setMilliseconds(0);
583
- const l = o.getTime();
584
- return i < l;
757
+ const a = r.getTime(), c = n instanceof Date ? n : new Date(n);
758
+ c.setHours(0), c.setMinutes(0), c.setSeconds(0), c.setMilliseconds(0);
759
+ const h = c.getTime();
760
+ return a < h;
585
761
  }
586
- function _t(t, n) {
762
+ function pt(t, n) {
587
763
  if (!t || !n)
588
764
  return !1;
589
- const r = t instanceof Date ? t : new Date(t), i = n instanceof Date ? n : new Date(n);
590
- return `${r.getFullYear()}-${r.getMonth()}` == `${i.getFullYear()}-${i.getMonth()}`;
765
+ const r = t instanceof Date ? t : new Date(t), a = n instanceof Date ? n : new Date(n);
766
+ return `${r.getFullYear()}-${r.getMonth()}` == `${a.getFullYear()}-${a.getMonth()}`;
591
767
  }
592
- function k(t, n) {
768
+ function W(t, n) {
593
769
  if (!t || !n)
594
770
  return !1;
595
771
  const r = t instanceof Date ? t : new Date(t);
596
772
  r.setHours(0), r.setMinutes(0), r.setSeconds(0), r.setMilliseconds(0);
597
- const i = r.getTime(), o = n instanceof Date ? n : new Date(n);
598
- o.setHours(0), o.setMinutes(0), o.setSeconds(0), o.setMilliseconds(0);
599
- const l = o.getTime();
600
- return i === l;
773
+ const a = r.getTime(), c = n instanceof Date ? n : new Date(n);
774
+ c.setHours(0), c.setMinutes(0), c.setSeconds(0), c.setMilliseconds(0);
775
+ const h = c.getTime();
776
+ return a === h;
601
777
  }
602
- function Bt(t, n) {
778
+ function te(t, n) {
603
779
  if (!t || !Array.isArray(t) || t.length === 0)
604
780
  return [];
605
- const r = t.map((h) => h instanceof Date ? h : h === null ? /* @__PURE__ */ new Date() : new Date(h)), i = new Date(Math.min(...r.map((h) => h.getTime()))), o = new Date(Math.max(...r.map((h) => h.getTime()))), l = [], s = new Date(i);
606
- for (; s <= o; ) {
607
- if (Array.isArray(n) && n.includes(s)) {
608
- s.setDate(s.getDate() + 1);
781
+ const r = t.map((p) => p instanceof Date ? p : p === null ? /* @__PURE__ */ new Date() : new Date(p)), a = new Date(Math.min(...r.map((p) => p.getTime()))), c = new Date(Math.max(...r.map((p) => p.getTime()))), h = [], d = new Date(a);
782
+ for (; d <= c; ) {
783
+ if (Array.isArray(n) && n.includes(d)) {
784
+ d.setDate(d.getDate() + 1);
609
785
  continue;
610
- } else if (n === s) {
611
- s.setDate(s.getDate() + 1);
786
+ } else if (n === d) {
787
+ d.setDate(d.getDate() + 1);
612
788
  continue;
613
789
  }
614
- l.push(
615
- `${s.getFullYear()}-${j(s.getMonth())}-${G(
616
- s.getDate()
790
+ h.push(
791
+ `${d.getFullYear()}-${N(d.getMonth())}-${J(
792
+ d.getDate()
617
793
  )}`
618
- ), s.setDate(s.getDate() + 1);
794
+ ), d.setDate(d.getDate() + 1);
619
795
  }
620
- return l;
796
+ return h;
621
797
  }
622
798
  export {
623
- xe as default
799
+ Le as default
624
800
  };