lawgic-dev-kit 0.17.4 → 0.17.6
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.
- package/dist/_virtual/index2.js +2 -3
- package/dist/_virtual/index3.js +3 -3
- package/dist/_virtual/index4.js +3 -5
- package/dist/_virtual/index5.js +5 -2
- package/dist/components/atoms/TextInput/TextInput.js +9 -9
- package/dist/components/molecules/CalendarSelector/CalendarSelector.d.ts +3 -0
- package/dist/components/molecules/CalendarSelector/CalendarSelector.js +183 -148
- package/dist/components/molecules/CalendarSelector/CalendarSelector.styles.d.ts +36 -0
- package/dist/components/molecules/CalendarSelector/CalendarSelector.styles.js +37 -0
- package/dist/components/molecules/CalendarSelector/PeriodToggle.d.ts +10 -1
- package/dist/components/molecules/CalendarSelector/PeriodToggle.js +59 -46
- package/dist/components/molecules/UncontrolledDateInput/UncontrolledDateInput.d.ts +4 -1
- package/dist/components/molecules/UncontrolledDateInput/UncontrolledDateInput.js +69 -56
- package/dist/lawgic-dev-kit.css +1 -1
- package/dist/lawgic-dev-kit.umd.js +55 -56
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/yup/index.esm.js +3 -3
- package/dist/src/components/molecules/CalendarSelector/CalendarSelector.d.ts +14 -0
- package/dist/src/components/molecules/CalendarSelector/CalendarSelector.styles.d.ts +36 -0
- package/dist/src/components/molecules/CalendarSelector/PeriodToggle.d.ts +15 -0
- package/dist/src/components/molecules/UncontrolledDateInput/UncontrolledDateInput.d.ts +15 -0
- package/package.json +1 -1
package/dist/_virtual/index2.js
CHANGED
package/dist/_virtual/index3.js
CHANGED
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
var t = r();
|
|
4
|
-
const s = /* @__PURE__ */ o(t);
|
|
1
|
+
import { __require as r } from "../node_modules/tiny-case/index.js";
|
|
2
|
+
var a = r();
|
|
5
3
|
export {
|
|
6
|
-
|
|
4
|
+
a as t
|
|
7
5
|
};
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -6,21 +6,21 @@ const C = ({
|
|
|
6
6
|
control: d,
|
|
7
7
|
name: e,
|
|
8
8
|
placeholder: c,
|
|
9
|
-
className:
|
|
9
|
+
className: x = "",
|
|
10
10
|
disabled: t = !1,
|
|
11
11
|
leftSide: a,
|
|
12
12
|
rightSide: s,
|
|
13
|
-
translateKey:
|
|
14
|
-
...
|
|
13
|
+
translateKey: f = "",
|
|
14
|
+
...g
|
|
15
15
|
}) => {
|
|
16
16
|
const {
|
|
17
|
-
field: { value: n = "", onChange:
|
|
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(
|
|
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"} ${
|
|
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-
|
|
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) =>
|
|
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
|
-
...
|
|
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
|
|
3
|
-
import { faChevronLeft as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { FontAwesomeIcon as
|
|
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
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { faChevronDown as
|
|
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
|
|
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
|
|
19
|
-
import { motion as
|
|
20
|
-
import { startOfWeek as
|
|
21
|
-
import { startOfMonth as
|
|
22
|
-
import { endOfWeek as
|
|
23
|
-
import { endOfMonth as
|
|
24
|
-
import { eachDayOfInterval as
|
|
25
|
-
import { isSameDay as
|
|
26
|
-
import { isSameMonth as
|
|
27
|
-
import { isToday as
|
|
28
|
-
import { subMonths as
|
|
29
|
-
import { addMonths as
|
|
30
|
-
import { setHours as
|
|
31
|
-
import { setMinutes as
|
|
32
|
-
import { setSeconds as
|
|
33
|
-
import { formatDate as
|
|
34
|
-
import { es as
|
|
35
|
-
const
|
|
36
|
-
date:
|
|
37
|
-
onDateChange:
|
|
38
|
-
showTimeSelector:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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 [
|
|
44
|
-
|
|
45
|
-
), [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}, [
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
},
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
}, X = () => {
|
|
58
|
+
H(1), setTimeout(() => {
|
|
59
|
+
w(ke(n, 1));
|
|
56
60
|
}, 10);
|
|
57
|
-
},
|
|
58
|
-
if (
|
|
61
|
+
}, Z = (t) => {
|
|
62
|
+
if (C && t > C || u && t < u)
|
|
59
63
|
return;
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
const m = B(
|
|
65
|
+
V(q(t, 0), 0),
|
|
66
|
+
N === "AM" ? f % 12 : f % 12 + 12
|
|
63
67
|
);
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
|
|
72
|
-
},
|
|
75
|
+
j(m), E(m), F(!1);
|
|
76
|
+
}, te = (t) => {
|
|
73
77
|
A(t);
|
|
74
|
-
},
|
|
75
|
-
const t = /* @__PURE__ */ new Date(),
|
|
76
|
-
const o = new Date(t.getFullYear(), t.getMonth() -
|
|
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:
|
|
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: `${
|
|
88
|
+
displayName: `${h(o, "MMMM", { locale: v }).replace(
|
|
82
89
|
/^./,
|
|
83
90
|
(s) => s.toUpperCase()
|
|
84
91
|
)} ${o.getFullYear()}`
|
|
85
92
|
};
|
|
86
|
-
})),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
r[0].isIntersecting &&
|
|
90
|
-
const o =
|
|
91
|
-
const
|
|
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:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
-
(
|
|
99
|
-
)} ${
|
|
112
|
+
(P) => P.toUpperCase()
|
|
113
|
+
)} ${y.getFullYear()}`
|
|
100
114
|
};
|
|
101
115
|
});
|
|
102
|
-
return [...
|
|
116
|
+
return [...l, ...T];
|
|
103
117
|
});
|
|
104
|
-
}),
|
|
105
|
-
}, [
|
|
106
|
-
const
|
|
107
|
-
const o = new Date(
|
|
108
|
-
o.setMonth(r), o.setFullYear(
|
|
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:
|
|
111
|
-
const o =
|
|
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 ?
|
|
116
|
-
onClick: () =>
|
|
117
|
-
className:
|
|
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}-${
|
|
144
|
+
`${r.name}-${r.year}-${l}`
|
|
121
145
|
);
|
|
122
146
|
}) });
|
|
123
|
-
},
|
|
147
|
+
}, oe = () => /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center mb-8", children: [
|
|
124
148
|
/* @__PURE__ */ e.jsx(
|
|
125
|
-
|
|
149
|
+
R,
|
|
126
150
|
{
|
|
127
|
-
open:
|
|
128
|
-
onClose: () =>
|
|
129
|
-
component:
|
|
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: () =>
|
|
137
|
-
className: "
|
|
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:
|
|
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(
|
|
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
|
-
|
|
175
|
+
W,
|
|
152
176
|
{
|
|
153
177
|
variant: "transparent",
|
|
154
|
-
color:
|
|
155
|
-
icon:
|
|
156
|
-
onClick:
|
|
178
|
+
color: b,
|
|
179
|
+
icon: ce,
|
|
180
|
+
onClick: Q
|
|
157
181
|
}
|
|
158
182
|
),
|
|
159
183
|
/* @__PURE__ */ e.jsx(
|
|
160
|
-
|
|
184
|
+
W,
|
|
161
185
|
{
|
|
162
186
|
variant: "transparent",
|
|
163
|
-
color:
|
|
164
|
-
icon:
|
|
165
|
-
onClick:
|
|
187
|
+
color: b,
|
|
188
|
+
icon: le,
|
|
189
|
+
onClick: X
|
|
166
190
|
}
|
|
167
191
|
)
|
|
168
192
|
] })
|
|
169
|
-
] }),
|
|
170
|
-
const t =
|
|
171
|
-
return
|
|
172
|
-
const
|
|
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
|
-
|
|
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 &&
|
|
204
|
+
onClick: () => !s && Z(d),
|
|
182
205
|
initial: !1,
|
|
183
206
|
animate: {
|
|
184
|
-
backgroundColor:
|
|
185
|
-
color:
|
|
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 && !
|
|
196
|
-
backgroundColor:
|
|
218
|
+
whileHover: !s && !g ? {
|
|
219
|
+
backgroundColor: c.hoverLight
|
|
197
220
|
} : {},
|
|
198
221
|
whileTap: s ? {} : {
|
|
199
|
-
backgroundColor:
|
|
222
|
+
backgroundColor: g ? c.primaryDark : c.hoverLight
|
|
200
223
|
},
|
|
201
|
-
children:
|
|
224
|
+
children: h(d, "d")
|
|
202
225
|
},
|
|
203
|
-
|
|
226
|
+
M
|
|
204
227
|
);
|
|
205
228
|
}) });
|
|
206
|
-
},
|
|
207
|
-
const t = Array.from({ length: 12 }, (
|
|
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: () =>
|
|
211
|
-
className:
|
|
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(
|
|
247
|
+
String(a).padStart(2, "0"),
|
|
214
248
|
":00"
|
|
215
249
|
]
|
|
216
250
|
},
|
|
217
|
-
|
|
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:
|
|
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
|
-
|
|
257
|
+
R,
|
|
224
258
|
{
|
|
225
|
-
open:
|
|
226
|
-
onClose: () =>
|
|
227
|
-
component:
|
|
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
|
-
|
|
266
|
+
ue,
|
|
233
267
|
{
|
|
234
|
-
setHourMenuOpen:
|
|
235
|
-
hourMenuOpen:
|
|
236
|
-
selectedHour:
|
|
268
|
+
setHourMenuOpen: F,
|
|
269
|
+
hourMenuOpen: L,
|
|
270
|
+
selectedHour: f
|
|
237
271
|
}
|
|
238
272
|
)
|
|
239
273
|
}
|
|
240
274
|
),
|
|
241
275
|
/* @__PURE__ */ e.jsx(
|
|
242
|
-
|
|
276
|
+
pe,
|
|
243
277
|
{
|
|
244
|
-
selectedPeriod:
|
|
245
|
-
handlePeriodChange:
|
|
278
|
+
selectedPeriod: N,
|
|
279
|
+
handlePeriodChange: te,
|
|
280
|
+
colorVariants: c
|
|
246
281
|
}
|
|
247
282
|
)
|
|
248
283
|
] })
|
|
249
284
|
] });
|
|
250
|
-
},
|
|
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
|
-
|
|
286
|
-
/* @__PURE__ */ e.jsx(
|
|
287
|
-
|
|
320
|
+
oe(),
|
|
321
|
+
/* @__PURE__ */ e.jsx(xe, { initial: !1, mode: "popLayout", children: /* @__PURE__ */ e.jsx(
|
|
322
|
+
_.div,
|
|
288
323
|
{
|
|
289
|
-
variants:
|
|
290
|
-
initial:
|
|
324
|
+
variants: ae,
|
|
325
|
+
initial: k === 1 ? "slideNextEnter" : k === -1 ? "slidePrevEnter" : !1,
|
|
291
326
|
animate: "center",
|
|
292
|
-
exit:
|
|
327
|
+
exit: k === 1 ? "slideNextExit" : "slidePrevExit",
|
|
293
328
|
className: "w-full",
|
|
294
|
-
children:
|
|
329
|
+
children: ne()
|
|
295
330
|
},
|
|
296
|
-
|
|
331
|
+
h(n, "yyyy-MM")
|
|
297
332
|
) }),
|
|
298
|
-
|
|
333
|
+
z && se()
|
|
299
334
|
] });
|
|
300
335
|
};
|
|
301
336
|
export {
|
|
302
|
-
|
|
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
|
+
};
|