lawgic-dev-kit 0.17.4 → 0.17.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.
@@ -6,21 +6,21 @@ const C = ({
6
6
  control: d,
7
7
  name: e,
8
8
  placeholder: c,
9
- className: g = "",
9
+ className: x = "",
10
10
  disabled: t = !1,
11
11
  leftSide: a,
12
12
  rightSide: s,
13
- translateKey: i = "",
14
- ...x
13
+ translateKey: f = "",
14
+ ...g
15
15
  }) => {
16
16
  const {
17
- field: { value: n = "", onChange: f, ref: p, onBlur: b },
17
+ field: { value: n = "", onChange: i, ref: p, onBlur: b },
18
18
  fieldState: { error: l }
19
- } = j({ name: e, control: d }), { t: o } = w(), h = o(e), m = o(i);
19
+ } = j({ name: e, control: d }), { t: o } = w(), h = o(e), m = o(f);
20
20
  return /* @__PURE__ */ r.jsxs(
21
21
  "label",
22
22
  {
23
- className: `flex flex-col group gap-8 select-none ${t && "cursor-not-allowed"} ${g}`,
23
+ className: `flex flex-col group gap-8 select-none ${t && "cursor-not-allowed"} ${x}`,
24
24
  htmlFor: e,
25
25
  children: [
26
26
  /* @__PURE__ */ r.jsx(
@@ -39,7 +39,7 @@ const C = ({
39
39
 
40
40
  ${l && "border-red-500!"}
41
41
 
42
- bg-light
42
+ !bg-blue-50
43
43
 
44
44
  w-full h-full rounded-full border
45
45
 
@@ -61,11 +61,11 @@ const C = ({
61
61
  disabled: t,
62
62
  placeholder: c,
63
63
  value: n,
64
- onChange: (y) => f(y.target.value),
64
+ onChange: (y) => i(y.target.value),
65
65
  onBlur: b,
66
66
  ref: p,
67
67
  className: "group bg-transparent w-full h-full font-600 placeholder:font-600 text-body-m disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-hidden",
68
- ...x
68
+ ...g
69
69
  }
70
70
  ),
71
71
  s && s
@@ -1,11 +1,14 @@
1
1
  import { default as React } from 'react';
2
+ import { CalendarColor } from './CalendarSelector.styles';
2
3
  export type CalendarSelectorProps = {
3
4
  date: Date;
4
5
  onDateChange: (date: Date) => void;
5
6
  showTimeSelector?: boolean;
7
+ minDate?: Date;
6
8
  maxDate?: Date;
7
9
  futureDates?: boolean;
8
10
  pastDates?: boolean;
11
+ color?: CalendarColor;
9
12
  };
10
13
  declare const CalendarSelector: React.FC<CalendarSelectorProps>;
11
14
  export default CalendarSelector;
@@ -1,146 +1,170 @@
1
1
  import { j as e } from "../../../_virtual/jsx-runtime.js";
2
- import { faChevronRight as se } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
3
- import { faChevronLeft as ae } from "../../../node_modules/@fortawesome/pro-solid-svg-icons/index.js";
4
- import { useState as u, useEffect as H, useRef as $ } from "react";
5
- import { FontAwesomeIcon as ie } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
2
+ import { faChevronRight as le } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
3
+ import { faChevronLeft as ce } from "../../../node_modules/@fortawesome/pro-solid-svg-icons/index.js";
4
+ import { useState as x, useEffect as I, useRef as U } from "react";
5
+ import { FontAwesomeIcon as me } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
6
6
  import "../../../_virtual/lodash.js";
7
- import { useTheme as le } from "../../../hooks/useTheme.js";
8
- import Y from "../FloatingMenu/FloatingMenu.js";
9
- import ce from "./PeriodToggle.js";
10
- import me from "./TimeDisplay.js";
11
- import { faChevronDown as de } from "../../../node_modules/@fortawesome/pro-regular-svg-icons/index.js";
7
+ import { useTheme as de } from "../../../hooks/useTheme.js";
8
+ import R from "../FloatingMenu/FloatingMenu.js";
9
+ import pe from "./PeriodToggle.js";
10
+ import ue from "./TimeDisplay.js";
11
+ import { faChevronDown as fe } from "../../../node_modules/@fortawesome/pro-regular-svg-icons/index.js";
12
+ import { getColorVariants as ge } from "./CalendarSelector.styles.js";
12
13
  import "react-hook-form";
13
14
  import "../InformationContainer/InformationContainer.js";
14
15
  import "../../../constants/countries.js";
15
- import I from "../../atoms/IconButton/IconButton.js";
16
+ import W from "../../atoms/IconButton/IconButton.js";
16
17
  import "../../atoms/ImageProfileInput/ImageProfileInput.validators.js";
17
18
  import "fuse.js";
18
- import { AnimatePresence as pe } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
19
- import { motion as B } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
20
- import { startOfWeek as ue } from "../../../node_modules/date-fns/startOfWeek.js";
21
- import { startOfMonth as fe } from "../../../node_modules/date-fns/startOfMonth.js";
22
- import { endOfWeek as xe } from "../../../node_modules/date-fns/endOfWeek.js";
23
- import { endOfMonth as he } from "../../../node_modules/date-fns/endOfMonth.js";
24
- import { eachDayOfInterval as ge } from "../../../node_modules/date-fns/eachDayOfInterval.js";
25
- import { isSameDay as Me } from "../../../node_modules/date-fns/isSameDay.js";
26
- import { isSameMonth as ye } from "../../../node_modules/date-fns/isSameMonth.js";
27
- import { isToday as ve } from "../../../node_modules/date-fns/isToday.js";
28
- import { subMonths as we } from "../../../node_modules/date-fns/subMonths.js";
29
- import { addMonths as be } from "../../../node_modules/date-fns/addMonths.js";
30
- import { setHours as U } from "../../../node_modules/date-fns/setHours.js";
31
- import { setMinutes as R } from "../../../node_modules/date-fns/setMinutes.js";
32
- import { setSeconds as L } from "../../../node_modules/date-fns/setSeconds.js";
33
- import { formatDate as f } from "../../../node_modules/date-fns/format.js";
34
- import { es as g } from "../../../node_modules/date-fns/locale/es.js";
35
- const nt = ({
36
- date: c,
37
- onDateChange: S,
38
- showTimeSelector: _ = !0,
39
- maxDate: M,
40
- futureDates: W = !1,
41
- pastDates: q = !0
19
+ import { AnimatePresence as xe } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
20
+ import { motion as _ } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
21
+ import { startOfWeek as he } from "../../../node_modules/date-fns/startOfWeek.js";
22
+ import { startOfMonth as Me } from "../../../node_modules/date-fns/startOfMonth.js";
23
+ import { endOfWeek as ye } from "../../../node_modules/date-fns/endOfWeek.js";
24
+ import { endOfMonth as ve } from "../../../node_modules/date-fns/endOfMonth.js";
25
+ import { eachDayOfInterval as Ce } from "../../../node_modules/date-fns/eachDayOfInterval.js";
26
+ import { isSameDay as we } from "../../../node_modules/date-fns/isSameDay.js";
27
+ import { isSameMonth as be } from "../../../node_modules/date-fns/isSameMonth.js";
28
+ import { isToday as je } from "../../../node_modules/date-fns/isToday.js";
29
+ import { subMonths as Ne } from "../../../node_modules/date-fns/subMonths.js";
30
+ import { addMonths as ke } from "../../../node_modules/date-fns/addMonths.js";
31
+ import { setHours as B } from "../../../node_modules/date-fns/setHours.js";
32
+ import { setMinutes as V } from "../../../node_modules/date-fns/setMinutes.js";
33
+ import { setSeconds as q } from "../../../node_modules/date-fns/setSeconds.js";
34
+ import { formatDate as h } from "../../../node_modules/date-fns/format.js";
35
+ import { es as v } from "../../../node_modules/date-fns/locale/es.js";
36
+ const ct = ({
37
+ date: p,
38
+ onDateChange: E,
39
+ showTimeSelector: z = !0,
40
+ minDate: u,
41
+ maxDate: C,
42
+ futureDates: G = !1,
43
+ pastDates: J = !0,
44
+ color: b = "blue"
42
45
  }) => {
43
- const [i, y] = u(c), [E, w] = u(c), [v, k] = u(c.getHours() % 12 || 12), [b, A] = u(
44
- c.getHours() >= 12 ? "PM" : "AM"
45
- ), [C, P] = u(0), { t: z } = le(), [O, j] = u(!1), [T, D] = u(!1);
46
- H(() => {
47
- y(c), w(c), k(c.getHours() % 12 || 12), A(c.getHours() >= 12 ? "PM" : "AM");
48
- }, [c]);
49
- const G = () => {
50
- P(-1), setTimeout(() => {
51
- y(we(i));
46
+ const [n, w] = x(p), [O, j] = x(p), [f, Y] = x(p.getHours() % 12 || 12), [N, A] = x(
47
+ p.getHours() >= 12 ? "PM" : "AM"
48
+ ), [k, H] = x(0), { t: K } = de(), c = ge(b), [L, F] = x(!1), [$, S] = x(!1);
49
+ I(() => {
50
+ w(p), j(p), Y(p.getHours() % 12 || 12), A(p.getHours() >= 12 ? "PM" : "AM");
51
+ }, [p]);
52
+ const Q = () => {
53
+ H(-1), setTimeout(() => {
54
+ const t = Ne(n);
55
+ (!u || t >= u) && w(t);
52
56
  }, 10);
53
- }, J = () => {
54
- P(1), setTimeout(() => {
55
- y(be(i, 1));
57
+ }, X = () => {
58
+ H(1), setTimeout(() => {
59
+ w(ke(n, 1));
56
60
  }, 10);
57
- }, K = (t) => {
58
- if (M && t > M)
61
+ }, Z = (t) => {
62
+ if (C && t > C || u && t < u)
59
63
  return;
60
- const a = U(
61
- R(L(t, 0), 0),
62
- b === "AM" ? v % 12 : v % 12 + 12
64
+ const m = B(
65
+ V(q(t, 0), 0),
66
+ N === "AM" ? f % 12 : f % 12 + 12
63
67
  );
64
- w(a), S(a);
65
- }, Q = (t) => {
66
- k(t);
67
- const a = U(
68
- R(L(E, 0), 0),
69
- b === "AM" ? t % 12 : t % 12 + 12
68
+ j(m), E(m);
69
+ }, ee = (t) => {
70
+ Y(t);
71
+ const m = B(
72
+ V(q(O, 0), 0),
73
+ N === "AM" ? t % 12 : t % 12 + 12
70
74
  );
71
- w(a), S(a), j(!1);
72
- }, V = (t) => {
75
+ j(m), E(m), F(!1);
76
+ }, te = (t) => {
73
77
  A(t);
74
- }, X = () => {
75
- const t = /* @__PURE__ */ new Date(), a = 20, m = 5, [d, l] = u(() => Array.from({ length: a + 1 }, (r, n) => {
76
- const o = new Date(t.getFullYear(), t.getMonth() - n, 1);
78
+ }, re = () => {
79
+ const t = /* @__PURE__ */ new Date(), m = 20, a = 5, [i, d] = x(() => Array.from({ length: m + 1 }, (r, l) => {
80
+ const o = new Date(t.getFullYear(), t.getMonth() - l, 1);
77
81
  return {
78
- name: f(o, "MMMM", { locale: g }).replace(/^./, (s) => s.toUpperCase()),
82
+ name: h(o, "MMMM", { locale: v }).replace(
83
+ /^./,
84
+ (s) => s.toUpperCase()
85
+ ),
79
86
  index: o.getMonth(),
80
87
  year: o.getFullYear(),
81
- displayName: `${f(o, "MMMM", { locale: g }).replace(
88
+ displayName: `${h(o, "MMMM", { locale: v }).replace(
82
89
  /^./,
83
90
  (s) => s.toUpperCase()
84
91
  )} ${o.getFullYear()}`
85
92
  };
86
- })), x = $(null), p = $(null);
87
- H(() => {
88
- x.current && x.current.disconnect(), x.current = new IntersectionObserver((r) => {
89
- r[0].isIntersecting && l((n) => {
90
- const o = n[n.length - 1], s = new Date(o.year, o.index - 1, 1), re = Array.from({ length: m }, (Ce, ne) => {
91
- const h = new Date(s.getFullYear(), s.getMonth() - ne, 1);
93
+ })), M = U(null), g = U(null);
94
+ I(() => {
95
+ M.current && M.current.disconnect(), M.current = new IntersectionObserver((r) => {
96
+ r[0].isIntersecting && d((l) => {
97
+ const o = l[l.length - 1], s = new Date(o.year, o.index - 1, 1), T = Array.from({ length: a }, (Fe, ie) => {
98
+ const y = new Date(
99
+ s.getFullYear(),
100
+ s.getMonth() - ie,
101
+ 1
102
+ );
92
103
  return {
93
- name: f(h, "MMMM", { locale: g }).replace(/^./, (F) => F.toUpperCase()),
94
- index: h.getMonth(),
95
- year: h.getFullYear(),
96
- displayName: `${f(h, "MMMM", { locale: g }).replace(
104
+ name: h(y, "MMMM", { locale: v }).replace(
105
+ /^./,
106
+ (P) => P.toUpperCase()
107
+ ),
108
+ index: y.getMonth(),
109
+ year: y.getFullYear(),
110
+ displayName: `${h(y, "MMMM", { locale: v }).replace(
97
111
  /^./,
98
- (F) => F.toUpperCase()
99
- )} ${h.getFullYear()}`
112
+ (P) => P.toUpperCase()
113
+ )} ${y.getFullYear()}`
100
114
  };
101
115
  });
102
- return [...n, ...re];
116
+ return [...l, ...T];
103
117
  });
104
- }), p.current && x.current.observe(p.current);
105
- }, [d]);
106
- const N = (r, n) => {
107
- const o = new Date(i);
108
- o.setMonth(r), o.setFullYear(n), y(o), D(!1);
118
+ }), g.current && M.current.observe(g.current);
119
+ }, [i]);
120
+ const D = (r, l) => {
121
+ const o = new Date(n);
122
+ o.setMonth(r), o.setFullYear(l), (!u || o >= u) && w(o), S(!1);
109
123
  };
110
- return /* @__PURE__ */ e.jsx("div", { className: "flex flex-col p-8 max-h-200 overflow-y-auto bg-light gap-4", children: d.map((r, n) => {
111
- const o = n === d.length - 1;
124
+ return /* @__PURE__ */ e.jsx("div", { className: "flex flex-col p-8 max-h-200 overflow-y-auto bg-light gap-4", children: i.map((r, l) => {
125
+ const o = l === i.length - 1;
112
126
  return /* @__PURE__ */ e.jsx(
113
127
  "button",
114
128
  {
115
- ref: o ? p : null,
116
- onClick: () => N(r.index, r.year),
117
- className: `text-start p-6 font-600 transition-all duration-100 rounded-lg hover:bg-gray-100 ${i.getMonth() === r.index && i.getFullYear() === r.year ? "bg-blue-100" : ""}`,
129
+ ref: o ? g : null,
130
+ onClick: () => D(r.index, r.year),
131
+ className: "text-start p-6 font-600 transition-all duration-100 rounded-lg",
132
+ style: {
133
+ backgroundColor: n.getMonth() === r.index && n.getFullYear() === r.year ? c.hoverLight : "transparent",
134
+ color: n.getMonth() === r.index && n.getFullYear() === r.year ? c.text : "inherit"
135
+ },
136
+ onMouseEnter: (s) => {
137
+ n.getMonth() === r.index && n.getFullYear() === r.year || (s.currentTarget.style.backgroundColor = "#F3F4F6");
138
+ },
139
+ onMouseLeave: (s) => {
140
+ n.getMonth() === r.index && n.getFullYear() === r.year || (s.currentTarget.style.backgroundColor = "transparent");
141
+ },
118
142
  children: r.displayName
119
143
  },
120
- `${r.name}-${r.year}-${n}`
144
+ `${r.name}-${r.year}-${l}`
121
145
  );
122
146
  }) });
123
- }, Z = () => /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center mb-8", children: [
147
+ }, oe = () => /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center mb-8", children: [
124
148
  /* @__PURE__ */ e.jsx(
125
- Y,
149
+ R,
126
150
  {
127
- open: T,
128
- onClose: () => D(!1),
129
- component: X,
151
+ open: $,
152
+ onClose: () => S(!1),
153
+ component: re,
130
154
  placement: "bottom",
131
155
  className: "!p-0 overflow-hidden bg-light",
132
156
  strategy: "fixed",
133
157
  children: /* @__PURE__ */ e.jsxs(
134
158
  "button",
135
159
  {
136
- onClick: () => D(!T),
137
- className: "hover:text-blue-500 transition-colors duration-150 flex gap-6 items-center",
160
+ onClick: () => S(!$),
161
+ className: "transition-colors duration-150 flex gap-6 items-center !text-black",
138
162
  children: [
139
- /* @__PURE__ */ e.jsx("h4", { className: "text-header-4", children: f(i, "MMMM yyyy", { locale: g }).replace(
163
+ /* @__PURE__ */ e.jsx("h4", { className: "text-header-4", children: h(n, "MMMM yyyy", { locale: v }).replace(
140
164
  /^./,
141
165
  (t) => t.toUpperCase()
142
166
  ) }),
143
- /* @__PURE__ */ e.jsx(ie, { icon: de, className: "w-12 h-12" })
167
+ /* @__PURE__ */ e.jsx(me, { icon: fe, className: "w-12 h-12" })
144
168
  ]
145
169
  }
146
170
  )
@@ -148,41 +172,40 @@ const nt = ({
148
172
  ),
149
173
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-8", children: [
150
174
  /* @__PURE__ */ e.jsx(
151
- I,
175
+ W,
152
176
  {
153
177
  variant: "transparent",
154
- color: "gray",
155
- icon: ae,
156
- onClick: G
178
+ color: b,
179
+ icon: ce,
180
+ onClick: Q
157
181
  }
158
182
  ),
159
183
  /* @__PURE__ */ e.jsx(
160
- I,
184
+ W,
161
185
  {
162
186
  variant: "transparent",
163
- color: "gray",
164
- icon: se,
165
- onClick: J
187
+ color: b,
188
+ icon: le,
189
+ onClick: X
166
190
  }
167
191
  )
168
192
  ] })
169
- ] }), ee = () => {
170
- const t = ue(fe(i)), a = xe(he(i)), m = ge({ start: t, end: a }), d = /* @__PURE__ */ new Date();
171
- return d.setHours(0, 0, 0, 0), /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-7 gap-2", children: m.map((l, x) => {
172
- const p = Me(l, E), N = ye(l, i), r = ve(l), n = l < d, o = l > d, s = !N || n && !q || o && !W || M && l > M;
193
+ ] }), ne = () => {
194
+ const t = he(Me(n)), m = ye(ve(n)), a = Ce({ start: t, end: m }), i = /* @__PURE__ */ new Date();
195
+ return i.setHours(0, 0, 0, 0), /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-7 gap-2", children: a.map((d, M) => {
196
+ const g = we(d, O), D = be(d, n), r = je(d), l = d < i, o = d > i, s = !D || l && !J || o && !G || u && d < u || C && d > C;
173
197
  return /* @__PURE__ */ e.jsx(
174
- B.div,
198
+ _.div,
175
199
  {
176
200
  className: `
177
201
  p-2 text-center w-[40px] h-[40px] rounded-full flex items-center justify-center font-600 select-none
178
202
  ${s ? "text-gray-400 pointer-events-none" : "cursor-pointer"}
179
- ${r && !p ? "text-blue-600" : ""}
180
203
  `,
181
- onClick: () => !s && K(l),
204
+ onClick: () => !s && Z(d),
182
205
  initial: !1,
183
206
  animate: {
184
- backgroundColor: p ? "#93C5FD" : "transparent",
185
- color: p ? "#FFFFFF" : r ? "#2563EB" : s ? "#9CA3AF" : "#000000"
207
+ backgroundColor: g ? c.primaryLight : "transparent",
208
+ color: g ? c.textLight : r ? c.text : s ? "#9CA3AF" : "#000000"
186
209
  },
187
210
  transition: {
188
211
  duration: 0.2,
@@ -192,62 +215,74 @@ const nt = ({
192
215
  ease: "easeOut"
193
216
  }
194
217
  },
195
- whileHover: !s && !p ? {
196
- backgroundColor: "#E5E7EB"
218
+ whileHover: !s && !g ? {
219
+ backgroundColor: c.hoverLight
197
220
  } : {},
198
221
  whileTap: s ? {} : {
199
- backgroundColor: p ? "#7AA5E0" : "#D1D5DB"
222
+ backgroundColor: g ? c.primaryDark : c.hoverLight
200
223
  },
201
- children: f(l, "d")
224
+ children: h(d, "d")
202
225
  },
203
- x
226
+ M
204
227
  );
205
228
  }) });
206
- }, te = () => {
207
- const t = Array.from({ length: 12 }, (m, d) => d + 1), a = () => /* @__PURE__ */ e.jsx("div", { className: "bg-white rounded-lg shadow-lg w-80 max-h-[150px] overflow-y-auto p-4 flex flex-col gap-4", children: t.map((m) => /* @__PURE__ */ e.jsxs(
229
+ }, se = () => {
230
+ const t = Array.from({ length: 12 }, (a, i) => i + 1), m = () => /* @__PURE__ */ e.jsx("div", { className: "bg-white rounded-lg shadow-lg w-80 max-h-[150px] overflow-y-auto p-4 flex flex-col gap-4", children: t.map((a) => /* @__PURE__ */ e.jsxs(
208
231
  "button",
209
232
  {
210
- onClick: () => Q(m),
211
- className: `w-full text-center py-2 transition-all duration-100 rounded-lg hover:bg-gray-100 ${m === v ? "text-blue-500 font-medium" : ""}`,
233
+ onClick: () => ee(a),
234
+ className: "w-full text-center py-2 transition-all duration-100 rounded-lg",
235
+ style: {
236
+ backgroundColor: a === f ? c.hoverLight : "transparent",
237
+ color: a === f ? c.text : "inherit",
238
+ fontWeight: a === f ? "500" : "normal"
239
+ },
240
+ onMouseEnter: (i) => {
241
+ a !== f && (i.currentTarget.style.backgroundColor = "#F3F4F6");
242
+ },
243
+ onMouseLeave: (i) => {
244
+ a !== f && (i.currentTarget.style.backgroundColor = "transparent");
245
+ },
212
246
  children: [
213
- String(m).padStart(2, "0"),
247
+ String(a).padStart(2, "0"),
214
248
  ":00"
215
249
  ]
216
250
  },
217
- m
251
+ a
218
252
  )) });
219
253
  return /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center mt-4 mb-4", children: [
220
- /* @__PURE__ */ e.jsx("h4", { className: "text-body-m font-medium", children: z("time") }),
254
+ /* @__PURE__ */ e.jsx("h4", { className: "text-body-m font-medium", children: K("time") }),
221
255
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-6", children: [
222
256
  /* @__PURE__ */ e.jsx(
223
- Y,
257
+ R,
224
258
  {
225
- open: O,
226
- onClose: () => j(!1),
227
- component: a,
259
+ open: L,
260
+ onClose: () => F(!1),
261
+ component: m,
228
262
  placement: "bottom",
229
263
  className: "!p-0 overflow-hidden",
230
264
  strategy: "fixed",
231
265
  children: /* @__PURE__ */ e.jsx(
232
- me,
266
+ ue,
233
267
  {
234
- setHourMenuOpen: j,
235
- hourMenuOpen: O,
236
- selectedHour: v
268
+ setHourMenuOpen: F,
269
+ hourMenuOpen: L,
270
+ selectedHour: f
237
271
  }
238
272
  )
239
273
  }
240
274
  ),
241
275
  /* @__PURE__ */ e.jsx(
242
- ce,
276
+ pe,
243
277
  {
244
- selectedPeriod: b,
245
- handlePeriodChange: V
278
+ selectedPeriod: N,
279
+ handlePeriodChange: te,
280
+ colorVariants: c
246
281
  }
247
282
  )
248
283
  ] })
249
284
  ] });
250
- }, oe = {
285
+ }, ae = {
251
286
  slideNextEnter: {
252
287
  x: 300,
253
288
  opacity: 0
@@ -282,22 +317,22 @@ const nt = ({
282
317
  }
283
318
  };
284
319
  return /* @__PURE__ */ e.jsxs("div", { className: "rounded-3xl max-w-[300px] mx-auto bg-white p-24 relative overflow-hidden", children: [
285
- Z(),
286
- /* @__PURE__ */ e.jsx(pe, { initial: !1, mode: "popLayout", children: /* @__PURE__ */ e.jsx(
287
- B.div,
320
+ oe(),
321
+ /* @__PURE__ */ e.jsx(xe, { initial: !1, mode: "popLayout", children: /* @__PURE__ */ e.jsx(
322
+ _.div,
288
323
  {
289
- variants: oe,
290
- initial: C === 1 ? "slideNextEnter" : C === -1 ? "slidePrevEnter" : !1,
324
+ variants: ae,
325
+ initial: k === 1 ? "slideNextEnter" : k === -1 ? "slidePrevEnter" : !1,
291
326
  animate: "center",
292
- exit: C === 1 ? "slideNextExit" : "slidePrevExit",
327
+ exit: k === 1 ? "slideNextExit" : "slidePrevExit",
293
328
  className: "w-full",
294
- children: ee()
329
+ children: ne()
295
330
  },
296
- f(i, "yyyy-MM")
331
+ h(n, "yyyy-MM")
297
332
  ) }),
298
- _ && te()
333
+ z && se()
299
334
  ] });
300
335
  };
301
336
  export {
302
- nt as default
337
+ ct as default
303
338
  };
@@ -0,0 +1,36 @@
1
+ export declare const blueVariants: {
2
+ primary: string;
3
+ primaryLight: string;
4
+ primaryDark: string;
5
+ hover: string;
6
+ hoverLight: string;
7
+ text: string;
8
+ textLight: string;
9
+ };
10
+ export declare const aquaVariants: {
11
+ primary: string;
12
+ primaryLight: string;
13
+ primaryDark: string;
14
+ hover: string;
15
+ hoverLight: string;
16
+ text: string;
17
+ textLight: string;
18
+ };
19
+ export type CalendarColor = 'blue' | 'aqua';
20
+ export declare const getColorVariants: (color: CalendarColor) => {
21
+ primary: string;
22
+ primaryLight: string;
23
+ primaryDark: string;
24
+ hover: string;
25
+ hoverLight: string;
26
+ text: string;
27
+ textLight: string;
28
+ } | {
29
+ primary: string;
30
+ primaryLight: string;
31
+ primaryDark: string;
32
+ hover: string;
33
+ hoverLight: string;
34
+ text: string;
35
+ textLight: string;
36
+ };
@@ -0,0 +1,37 @@
1
+ const t = {
2
+ primary: "#375ABC",
3
+ // blue-600
4
+ primaryLight: "#8FA9F3",
5
+ // blue-300
6
+ primaryDark: "#29438D",
7
+ // blue-700
8
+ hover: "#4570EB",
9
+ // blue-500
10
+ hoverLight: "#ECF1FD",
11
+ // blue-100
12
+ text: "#375ABC",
13
+ // blue-600
14
+ textLight: "#FFFFFF"
15
+ }, F = {
16
+ primary: "#06B6D4",
17
+ // cyan-500
18
+ primaryLight: "#67E8F9",
19
+ // cyan-300
20
+ primaryDark: "#0891B2",
21
+ // cyan-600
22
+ hover: "#0891B2",
23
+ // cyan-600
24
+ hoverLight: "#CFFAFE",
25
+ // cyan-100
26
+ text: "#06B6D4",
27
+ // cyan-500
28
+ textLight: "#FFFFFF"
29
+ }, a = (r) => ({
30
+ blue: t,
31
+ aqua: F
32
+ })[r];
33
+ export {
34
+ F as aquaVariants,
35
+ t as blueVariants,
36
+ a as getColorVariants
37
+ };
@@ -1,6 +1,15 @@
1
1
  interface PeriodToggleProps {
2
2
  selectedPeriod: string;
3
3
  handlePeriodChange: (period: string) => void;
4
+ colorVariants?: {
5
+ primary: string;
6
+ primaryLight: string;
7
+ primaryDark: string;
8
+ hover: string;
9
+ hoverLight: string;
10
+ text: string;
11
+ textLight: string;
12
+ };
4
13
  }
5
- declare const PeriodToggle: ({ selectedPeriod, handlePeriodChange, }: PeriodToggleProps) => import("react/jsx-runtime").JSX.Element;
14
+ declare const PeriodToggle: ({ selectedPeriod, handlePeriodChange, colorVariants, }: PeriodToggleProps) => import("react/jsx-runtime").JSX.Element;
6
15
  export default PeriodToggle;