@memobit/libs 3.26.4 → 3.28.0
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/components/Banner/Banner2.js +15 -13
- package/dist/components/BoldText/BoldText.js +5 -0
- package/dist/components/Calendar/Calendar2.js +108 -135
- package/dist/components/ColorPicker/ColorPicker.css +1 -1
- package/dist/components/ColorPicker/ColorPicker2.js +114 -114
- package/dist/components/ConfirmDialog/ConfirmDialog2.js +13 -11
- package/dist/components/ConfirmPopover/ConfirmPopover2.js +26 -24
- package/dist/components/ContextMenu/ContextMenu2.js +46 -33
- package/dist/components/ControlPanel/ControlPanel2.js +95 -93
- package/dist/components/ControlPanel/ControlPanelFilter.js +205 -193
- package/dist/components/ControlPanel/ControlPanelOptions.js +190 -185
- package/dist/components/DataView/DataView.CardView.js +83 -81
- package/dist/components/DataView/DataView.ColumnSelector.js +27 -25
- package/dist/components/DataView/DataView.TableView.js +74 -72
- package/dist/components/DataView/DataView2.js +169 -167
- package/dist/components/DatePicker/DatePicker2.js +71 -69
- package/dist/components/Drawer/Drawer2.js +58 -55
- package/dist/components/Dropdown/Dropdown2.js +187 -189
- package/dist/components/InputDate/InputDate2.js +43 -41
- package/dist/components/InputSearch/InputSearch2.js +27 -25
- package/dist/components/MenuBar/MenuBar.css +1 -0
- package/dist/components/MenuBar/MenuBar2.js +46 -0
- package/dist/components/Modal/Modal2.js +49 -47
- package/dist/components/Pagination/Pagination2.js +44 -47
- package/dist/components/ScrollToTop/ScrollToTop2.js +18 -16
- package/dist/components/ThemeSettings/ThemeSettings2.js +131 -123
- package/dist/components/TipsOfTheDay/TipsOfTheDay2.js +16 -12
- package/dist/components/Toast/Toast2.js +38 -33
- package/dist/components/ToolButton/ToolButton.css +1 -0
- package/dist/components/ToolButton/ToolButton2.js +36 -0
- package/dist/components/ToolPalette/ToolPalette.css +1 -0
- package/dist/components/ToolPalette/ToolPalette2.js +83 -0
- package/dist/components/Toolbar/Toolbar2.js +58 -56
- package/dist/contexts/LanguageContext/LanguageContext.context.js +9 -0
- package/dist/contexts/LanguageContext/LanguageContext.js +19 -0
- package/dist/contexts/LanguageContext/libMessages.js +240 -0
- package/dist/helpers/Datetime.js +84 -68
- package/dist/helpers/Language.js +8 -0
- package/dist/helpers/Pagination.js +5 -4
- package/dist/helpers/VersionInfo.js +1 -1
- package/dist/hooks/useLanguage.js +16 -0
- package/dist/index.d.ts +133 -6
- package/dist/index.js +417 -399
- package/dist/memobit-icons.json +4 -0
- package/dist/version.js +2 -2
- package/dist/version.json +4 -4
- package/package.json +1 -1
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import './Banner.css';
|
|
2
2
|
import { Icon as b } from "../Icon/Icon2.js";
|
|
3
|
+
import { libMessages as v } from "../../contexts/LanguageContext/libMessages.js";
|
|
4
|
+
import { useMessages as N } from "../../hooks/useLanguage.js";
|
|
3
5
|
import { Button as n } from "../Button/Button2.js";
|
|
4
|
-
import { Tooltip as
|
|
6
|
+
import { Tooltip as x } from "../Tooltip/Tooltip2.js";
|
|
5
7
|
/* empty css */
|
|
6
|
-
import { useState as
|
|
8
|
+
import { useState as z } from "react";
|
|
7
9
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
8
|
-
var
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
const
|
|
12
|
-
u(!0),
|
|
10
|
+
var R = ({ action: s, secondaryAction: i, className: a = "", description: l, dismissLabel: m, onDismiss: o, showDismiss: d = !0, title: c, variant: t = "default" }) => {
|
|
11
|
+
const h = N(v), [p, u] = z(!1), f = s?.variant || (t === "default" ? "default" : t);
|
|
12
|
+
if (p) return null;
|
|
13
|
+
const _ = () => {
|
|
14
|
+
u(!0), o?.();
|
|
13
15
|
};
|
|
14
16
|
return /* @__PURE__ */ r("section", {
|
|
15
17
|
className: `banner banner--${t} ${a}`,
|
|
@@ -19,7 +21,7 @@ var $ = ({ action: s, secondaryAction: i, className: a = "", description: l, dis
|
|
|
19
21
|
className: "banner__copy",
|
|
20
22
|
children: [/* @__PURE__ */ e("h3", {
|
|
21
23
|
className: "banner__title",
|
|
22
|
-
children:
|
|
24
|
+
children: c
|
|
23
25
|
}), /* @__PURE__ */ e("div", {
|
|
24
26
|
className: "banner__description",
|
|
25
27
|
children: l
|
|
@@ -29,7 +31,7 @@ var $ = ({ action: s, secondaryAction: i, className: a = "", description: l, dis
|
|
|
29
31
|
children: [s && /* @__PURE__ */ e(n, {
|
|
30
32
|
...s,
|
|
31
33
|
size: s.size || "small",
|
|
32
|
-
variant:
|
|
34
|
+
variant: f,
|
|
33
35
|
children: s.text
|
|
34
36
|
}), i && /* @__PURE__ */ e(n, {
|
|
35
37
|
...i,
|
|
@@ -38,12 +40,12 @@ var $ = ({ action: s, secondaryAction: i, className: a = "", description: l, dis
|
|
|
38
40
|
children: i.text
|
|
39
41
|
})]
|
|
40
42
|
})]
|
|
41
|
-
}),
|
|
42
|
-
title: m,
|
|
43
|
+
}), d && /* @__PURE__ */ e(x, {
|
|
44
|
+
title: m ?? h.dismiss,
|
|
43
45
|
children: /* @__PURE__ */ e("button", {
|
|
44
46
|
className: "banner__dismiss",
|
|
45
47
|
type: "button",
|
|
46
|
-
onClick:
|
|
48
|
+
onClick: _,
|
|
47
49
|
children: /* @__PURE__ */ e(b, {
|
|
48
50
|
name: "clear",
|
|
49
51
|
size: "sm"
|
|
@@ -53,5 +55,5 @@ var $ = ({ action: s, secondaryAction: i, className: a = "", description: l, dis
|
|
|
53
55
|
});
|
|
54
56
|
};
|
|
55
57
|
export {
|
|
56
|
-
|
|
58
|
+
R as Banner
|
|
57
59
|
};
|
|
@@ -1,274 +1,247 @@
|
|
|
1
1
|
import './Calendar.css';
|
|
2
|
+
import { libMessages as he } from "../../contexts/LanguageContext/libMessages.js";
|
|
3
|
+
import { useLanguage as _e, useMessages as me } from "../../hooks/useLanguage.js";
|
|
2
4
|
import { Tooltip as _ } from "../Tooltip/Tooltip2.js";
|
|
3
|
-
import { addMonths as
|
|
5
|
+
import { addMonths as V, formatDate as fe, getMonthMatrix as ye, isAfter as ge, isBefore as S, isSameDay as m, isToday as pe, isWeekend as Ye } from "../../helpers/Datetime.js";
|
|
4
6
|
/* empty css */
|
|
5
|
-
import { useMemo as
|
|
6
|
-
import { Fragment as
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
"February",
|
|
10
|
-
"March",
|
|
11
|
-
"April",
|
|
12
|
-
"May",
|
|
13
|
-
"June",
|
|
14
|
-
"July",
|
|
15
|
-
"August",
|
|
16
|
-
"September",
|
|
17
|
-
"October",
|
|
18
|
-
"November",
|
|
19
|
-
"December"
|
|
20
|
-
], ge = [
|
|
21
|
-
"Sun",
|
|
22
|
-
"Mon",
|
|
23
|
-
"Tue",
|
|
24
|
-
"Wed",
|
|
25
|
-
"Thu",
|
|
26
|
-
"Fri",
|
|
27
|
-
"Sat"
|
|
28
|
-
], be = [
|
|
29
|
-
"Mon",
|
|
30
|
-
"Tue",
|
|
31
|
-
"Wed",
|
|
32
|
-
"Thu",
|
|
33
|
-
"Fri",
|
|
34
|
-
"Sat",
|
|
35
|
-
"Sun"
|
|
36
|
-
], we = ({ value: r, onChange: f, mode: i = "single", minDate: T, maxDate: v, disabledDates: p, firstDayOfWeek: D = 0, showToday: j = !0, yearOnly: R = !1, className: G = "", currentMonth: I, onMonthChange: c, showHeader: F = !0, rangeStart: J, onRangeStartChange: Y }) => {
|
|
37
|
-
const [P, u] = M(() => {
|
|
7
|
+
import { useMemo as be, useState as D } from "react";
|
|
8
|
+
import { Fragment as j, jsx as n, jsxs as f } from "react/jsx-runtime";
|
|
9
|
+
var u = 12, Te = ({ value: r, onChange: y, mode: o = "single", minDate: T, maxDate: I, disabledDates: N, firstDayOfWeek: F = 0, showToday: G = !0, yearOnly: v = !1, className: H = "", currentMonth: R, onMonthChange: c, showHeader: k = !0, rangeStart: B, onRangeStartChange: M }) => {
|
|
10
|
+
const i = me(he), { language: L } = _e(), [P, h] = D(() => {
|
|
38
11
|
if (r) {
|
|
39
12
|
if (r instanceof Date) return new Date(r.getFullYear(), r.getMonth(), 1);
|
|
40
13
|
if ("start" in r) return new Date(r.start.getFullYear(), r.start.getMonth(), 1);
|
|
41
14
|
if (Array.isArray(r) && r.length > 0) return new Date(r[0].getFullYear(), r[0].getMonth(), 1);
|
|
42
15
|
}
|
|
43
16
|
return new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1);
|
|
44
|
-
}), [
|
|
45
|
-
const e = (
|
|
46
|
-
return Math.floor(e /
|
|
47
|
-
}), [
|
|
17
|
+
}), [g, p] = D("days"), [Y, w] = D(() => {
|
|
18
|
+
const e = (R ?? P).getFullYear();
|
|
19
|
+
return Math.floor(e / u) * u;
|
|
20
|
+
}), [q, $] = D(null), a = R ?? P, d = B ?? q, z = be(() => ye(a.getFullYear(), a.getMonth(), F), [a, F]), J = F === 1 ? [...i.dayNamesShort.slice(1), i.dayNamesShort[0]] : i.dayNamesShort, x = (e) => T && S(e, T) || I && ge(e, I) ? !0 : N ? typeof N == "function" ? N(e) : N.some((t) => m(t, e)) : !1, K = (e) => {
|
|
48
21
|
if (!r) return !1;
|
|
49
|
-
if (
|
|
50
|
-
if (
|
|
51
|
-
if (
|
|
52
|
-
if (r && "start" in r) return
|
|
22
|
+
if (o === "single" && r instanceof Date) return m(e, r);
|
|
23
|
+
if (o === "range") {
|
|
24
|
+
if (d) return m(e, d);
|
|
25
|
+
if (r && "start" in r) return m(e, r.start) || m(e, r.end);
|
|
53
26
|
}
|
|
54
|
-
return
|
|
55
|
-
},
|
|
56
|
-
if (
|
|
27
|
+
return o === "multiple" && Array.isArray(r) ? r.some((t) => m(t, e)) : !1;
|
|
28
|
+
}, Q = (e) => {
|
|
29
|
+
if (o === "range" && r && "start" in r) {
|
|
57
30
|
const { start: t, end: l } = r, s = e.getTime();
|
|
58
31
|
return s > t.getTime() && s < l.getTime();
|
|
59
32
|
}
|
|
60
33
|
return !1;
|
|
61
|
-
},
|
|
62
|
-
if (!
|
|
63
|
-
if (
|
|
64
|
-
else if (
|
|
65
|
-
if (!
|
|
66
|
-
|
|
34
|
+
}, U = (e) => o === "range" && d ? e.getTime() > d.getTime() : !1, X = (e) => e.getMonth() === a.getMonth(), Z = (e) => {
|
|
35
|
+
if (!x(e)) {
|
|
36
|
+
if (o === "single") y?.(e);
|
|
37
|
+
else if (o === "range")
|
|
38
|
+
if (!d)
|
|
39
|
+
M ? M(e) : ($(e), y?.(void 0));
|
|
67
40
|
else {
|
|
68
|
-
const t =
|
|
69
|
-
|
|
41
|
+
const t = S(e, d) ? e : d, l = S(e, d) ? d : e;
|
|
42
|
+
y?.({
|
|
70
43
|
start: t,
|
|
71
44
|
end: l
|
|
72
|
-
}),
|
|
45
|
+
}), M ? M(null) : $(null);
|
|
73
46
|
}
|
|
74
|
-
else if (
|
|
75
|
-
const t = Array.isArray(r) ? r : [], l = t.findIndex((s) =>
|
|
47
|
+
else if (o === "multiple") {
|
|
48
|
+
const t = Array.isArray(r) ? r : [], l = t.findIndex((s) => m(s, e));
|
|
76
49
|
if (l >= 0) {
|
|
77
|
-
const s = t.filter((
|
|
78
|
-
|
|
79
|
-
} else
|
|
50
|
+
const s = t.filter((A, b) => b !== l);
|
|
51
|
+
y?.(s.length > 0 ? s : void 0);
|
|
52
|
+
} else y?.([...t, e]);
|
|
80
53
|
}
|
|
81
54
|
}
|
|
82
|
-
}, U = () => {
|
|
83
|
-
const e = H(a, -1);
|
|
84
|
-
c ? c(e) : u(e);
|
|
85
|
-
}, X = () => {
|
|
86
|
-
const e = H(a, 1);
|
|
87
|
-
c ? c(e) : u(e);
|
|
88
|
-
}, Z = () => {
|
|
89
|
-
const e = /* @__PURE__ */ new Date(), t = new Date(e.getFullYear(), e.getMonth(), 1);
|
|
90
|
-
c ? c(t) : u(t), g("days"), i === "single" && f?.(e);
|
|
91
55
|
}, C = () => {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
56
|
+
const e = V(a, -1);
|
|
57
|
+
c ? c(e) : h(e);
|
|
58
|
+
}, W = () => {
|
|
59
|
+
const e = V(a, 1);
|
|
60
|
+
c ? c(e) : h(e);
|
|
61
|
+
}, O = () => {
|
|
62
|
+
const e = /* @__PURE__ */ new Date(), t = new Date(e.getFullYear(), e.getMonth(), 1);
|
|
63
|
+
c ? c(t) : h(t), p("days"), o === "single" && y?.(e);
|
|
64
|
+
}, ee = () => {
|
|
65
|
+
k && p("months");
|
|
66
|
+
}, E = () => {
|
|
67
|
+
k && (w(Math.floor(a.getFullYear() / u) * u), p("years"));
|
|
98
68
|
}, te = (e) => {
|
|
69
|
+
const t = new Date(a.getFullYear(), e, 1);
|
|
70
|
+
c ? c(t) : h(t), p("days");
|
|
71
|
+
}, ne = (e) => {
|
|
99
72
|
const t = new Date(e, a.getMonth(), 1);
|
|
100
|
-
c ? c(t) :
|
|
101
|
-
}, ne = () => {
|
|
102
|
-
k(b - d);
|
|
73
|
+
c ? c(t) : h(t), p("months");
|
|
103
74
|
}, re = () => {
|
|
104
|
-
|
|
75
|
+
w(Y - u);
|
|
105
76
|
}, ae = () => {
|
|
106
|
-
|
|
107
|
-
c ? c(e) : u(e);
|
|
77
|
+
w(Y + u);
|
|
108
78
|
}, se = () => {
|
|
109
|
-
const e = new Date(a.getFullYear()
|
|
110
|
-
c ? c(e) :
|
|
79
|
+
const e = new Date(a.getFullYear() - 1, a.getMonth(), 1);
|
|
80
|
+
c ? c(e) : h(e);
|
|
111
81
|
}, le = () => {
|
|
82
|
+
const e = new Date(a.getFullYear() + 1, a.getMonth(), 1);
|
|
83
|
+
c ? c(e) : h(e);
|
|
84
|
+
}, ce = () => {
|
|
112
85
|
const e = [];
|
|
113
|
-
for (let t = 0; t <
|
|
86
|
+
for (let t = 0; t < u; t++) e.push(Y + t);
|
|
114
87
|
return e;
|
|
115
|
-
},
|
|
88
|
+
}, ie = (e) => {
|
|
116
89
|
const t = ["calendar__day"];
|
|
117
|
-
return
|
|
118
|
-
},
|
|
90
|
+
return X(e) ? (K(e) && t.push("calendar__day--selected"), Q(e) && t.push("calendar__day--in-range"), U(e) && t.push("calendar__day--hover-range")) : t.push("calendar__day--other-month"), pe(e) && t.push("calendar__day--today"), Ye(e) && t.push("calendar__day--weekend"), x(e) && t.push("calendar__day--disabled"), t.join(" ");
|
|
91
|
+
}, oe = () => g === "years" ? /* @__PURE__ */ f("div", {
|
|
119
92
|
className: "calendar__header",
|
|
120
93
|
children: [
|
|
121
94
|
/* @__PURE__ */ n(_, {
|
|
122
|
-
title:
|
|
95
|
+
title: i.previousYears,
|
|
123
96
|
children: /* @__PURE__ */ n("button", {
|
|
124
97
|
type: "button",
|
|
125
98
|
className: "calendar__nav-button",
|
|
126
|
-
onClick:
|
|
99
|
+
onClick: re,
|
|
127
100
|
children: "‹"
|
|
128
101
|
})
|
|
129
102
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ f("div", {
|
|
131
104
|
className: "calendar__month-year",
|
|
132
105
|
children: [
|
|
133
|
-
|
|
106
|
+
Y,
|
|
134
107
|
" - ",
|
|
135
|
-
|
|
108
|
+
Y + u - 1
|
|
136
109
|
]
|
|
137
110
|
}),
|
|
138
111
|
/* @__PURE__ */ n(_, {
|
|
139
|
-
title:
|
|
112
|
+
title: i.nextYears,
|
|
140
113
|
children: /* @__PURE__ */ n("button", {
|
|
141
114
|
type: "button",
|
|
142
115
|
className: "calendar__nav-button",
|
|
143
|
-
onClick:
|
|
116
|
+
onClick: ae,
|
|
144
117
|
children: "›"
|
|
145
118
|
})
|
|
146
119
|
})
|
|
147
120
|
]
|
|
148
|
-
}) :
|
|
121
|
+
}) : g === "months" ? /* @__PURE__ */ f("div", {
|
|
149
122
|
className: "calendar__header",
|
|
150
123
|
children: [
|
|
151
124
|
/* @__PURE__ */ n(_, {
|
|
152
|
-
title:
|
|
125
|
+
title: i.previousYear,
|
|
153
126
|
children: /* @__PURE__ */ n("button", {
|
|
154
127
|
type: "button",
|
|
155
128
|
className: "calendar__nav-button",
|
|
156
|
-
onClick:
|
|
129
|
+
onClick: se,
|
|
157
130
|
children: "‹"
|
|
158
131
|
})
|
|
159
132
|
}),
|
|
160
133
|
/* @__PURE__ */ n("button", {
|
|
161
134
|
type: "button",
|
|
162
135
|
className: "calendar__header-button",
|
|
163
|
-
onClick:
|
|
136
|
+
onClick: E,
|
|
164
137
|
children: a.getFullYear()
|
|
165
138
|
}),
|
|
166
139
|
/* @__PURE__ */ n(_, {
|
|
167
|
-
title:
|
|
140
|
+
title: i.nextYear,
|
|
168
141
|
children: /* @__PURE__ */ n("button", {
|
|
169
142
|
type: "button",
|
|
170
143
|
className: "calendar__nav-button",
|
|
171
|
-
onClick:
|
|
144
|
+
onClick: le,
|
|
172
145
|
children: "›"
|
|
173
146
|
})
|
|
174
147
|
})
|
|
175
148
|
]
|
|
176
|
-
}) : /* @__PURE__ */
|
|
149
|
+
}) : /* @__PURE__ */ f("div", {
|
|
177
150
|
className: "calendar__header",
|
|
178
151
|
children: [
|
|
179
152
|
/* @__PURE__ */ n(_, {
|
|
180
|
-
title:
|
|
153
|
+
title: i.previousMonth,
|
|
181
154
|
children: /* @__PURE__ */ n("button", {
|
|
182
155
|
type: "button",
|
|
183
156
|
className: "calendar__nav-button",
|
|
184
|
-
onClick:
|
|
157
|
+
onClick: C,
|
|
185
158
|
children: "‹"
|
|
186
159
|
})
|
|
187
160
|
}),
|
|
188
161
|
/* @__PURE__ */ n("div", {
|
|
189
162
|
className: "calendar__month-year",
|
|
190
|
-
children:
|
|
163
|
+
children: v ? /* @__PURE__ */ n("span", {
|
|
191
164
|
className: "calendar__header-label",
|
|
192
|
-
children:
|
|
193
|
-
}) : /* @__PURE__ */
|
|
165
|
+
children: i.monthNames[a.getMonth()]
|
|
166
|
+
}) : /* @__PURE__ */ f(j, { children: [/* @__PURE__ */ n("button", {
|
|
194
167
|
type: "button",
|
|
195
168
|
className: "calendar__header-button",
|
|
196
|
-
onClick:
|
|
197
|
-
children:
|
|
169
|
+
onClick: ee,
|
|
170
|
+
children: i.monthNames[a.getMonth()]
|
|
198
171
|
}), /* @__PURE__ */ n("button", {
|
|
199
172
|
type: "button",
|
|
200
173
|
className: "calendar__header-button",
|
|
201
|
-
onClick:
|
|
174
|
+
onClick: E,
|
|
202
175
|
children: a.getFullYear()
|
|
203
176
|
})] })
|
|
204
177
|
}),
|
|
205
178
|
/* @__PURE__ */ n(_, {
|
|
206
|
-
title:
|
|
179
|
+
title: i.nextMonth,
|
|
207
180
|
children: /* @__PURE__ */ n("button", {
|
|
208
181
|
type: "button",
|
|
209
182
|
className: "calendar__nav-button",
|
|
210
|
-
onClick:
|
|
183
|
+
onClick: W,
|
|
211
184
|
children: "›"
|
|
212
185
|
})
|
|
213
186
|
})
|
|
214
187
|
]
|
|
215
|
-
}),
|
|
216
|
-
const e =
|
|
188
|
+
}), de = () => {
|
|
189
|
+
const e = ce(), t = (/* @__PURE__ */ new Date()).getFullYear(), l = a.getFullYear();
|
|
217
190
|
return /* @__PURE__ */ n("div", {
|
|
218
191
|
className: "calendar__years-grid",
|
|
219
192
|
children: e.map((s) => /* @__PURE__ */ n("button", {
|
|
220
193
|
type: "button",
|
|
221
194
|
className: `calendar__year-item ${s === l ? "calendar__year-item--selected" : ""} ${s === t ? "calendar__year-item--current" : ""}`,
|
|
222
|
-
onClick: () =>
|
|
195
|
+
onClick: () => ne(s),
|
|
223
196
|
children: s
|
|
224
197
|
}, s))
|
|
225
198
|
});
|
|
226
|
-
},
|
|
199
|
+
}, ue = () => {
|
|
227
200
|
const e = (/* @__PURE__ */ new Date()).getMonth(), t = (/* @__PURE__ */ new Date()).getFullYear(), l = a.getMonth(), s = a.getFullYear();
|
|
228
201
|
return /* @__PURE__ */ n("div", {
|
|
229
202
|
className: "calendar__months-grid",
|
|
230
|
-
children:
|
|
203
|
+
children: i.monthNames.map((A, b) => /* @__PURE__ */ n("button", {
|
|
231
204
|
type: "button",
|
|
232
|
-
className: `calendar__month-item ${
|
|
233
|
-
onClick: () =>
|
|
234
|
-
children:
|
|
235
|
-
},
|
|
205
|
+
className: `calendar__month-item ${b === l && s === a.getFullYear() ? "calendar__month-item--selected" : ""} ${b === e && t === a.getFullYear() ? "calendar__month-item--current" : ""}`,
|
|
206
|
+
onClick: () => te(b),
|
|
207
|
+
children: A.substring(0, 3)
|
|
208
|
+
}, A))
|
|
236
209
|
});
|
|
237
210
|
};
|
|
238
|
-
return /* @__PURE__ */
|
|
239
|
-
className: `calendar ${
|
|
211
|
+
return /* @__PURE__ */ f("div", {
|
|
212
|
+
className: `calendar ${H}`,
|
|
240
213
|
children: [
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
214
|
+
k && oe(),
|
|
215
|
+
g === "years" && de(),
|
|
216
|
+
g === "months" && ue(),
|
|
217
|
+
g === "days" && /* @__PURE__ */ f(j, { children: [
|
|
218
|
+
G && !v && /* @__PURE__ */ n("div", {
|
|
246
219
|
className: "calendar__today-section",
|
|
247
220
|
children: /* @__PURE__ */ n("button", {
|
|
248
221
|
type: "button",
|
|
249
222
|
className: "calendar__today-button",
|
|
250
|
-
onClick:
|
|
251
|
-
children:
|
|
223
|
+
onClick: O,
|
|
224
|
+
children: i.today
|
|
252
225
|
})
|
|
253
226
|
}),
|
|
254
227
|
/* @__PURE__ */ n("div", {
|
|
255
228
|
className: "calendar__weekdays",
|
|
256
|
-
children:
|
|
229
|
+
children: J.map((e) => /* @__PURE__ */ n("div", {
|
|
257
230
|
className: "calendar__weekday",
|
|
258
231
|
children: e
|
|
259
232
|
}, e))
|
|
260
233
|
}),
|
|
261
234
|
/* @__PURE__ */ n("div", {
|
|
262
235
|
className: "calendar__days",
|
|
263
|
-
children:
|
|
236
|
+
children: z.map((e, t) => /* @__PURE__ */ n("div", {
|
|
264
237
|
className: "calendar__week",
|
|
265
238
|
children: e.map((l, s) => /* @__PURE__ */ n(_, {
|
|
266
|
-
title:
|
|
239
|
+
title: fe(l, "DD MMM YYYY", L),
|
|
267
240
|
children: /* @__PURE__ */ n("button", {
|
|
268
241
|
type: "button",
|
|
269
|
-
className:
|
|
270
|
-
onClick: () =>
|
|
271
|
-
disabled:
|
|
242
|
+
className: ie(l),
|
|
243
|
+
onClick: () => Z(l),
|
|
244
|
+
disabled: x(l),
|
|
272
245
|
children: l.getDate()
|
|
273
246
|
})
|
|
274
247
|
}, s))
|
|
@@ -279,5 +252,5 @@ var d = 12, S = [
|
|
|
279
252
|
});
|
|
280
253
|
};
|
|
281
254
|
export {
|
|
282
|
-
|
|
255
|
+
Te as Calendar
|
|
283
256
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.color-picker{gap:var(--spacing-12);border:1px solid var(--delimiter-color);border-radius:var(--radius);padding:var(--spacing-16);background:var(--card-background-color);flex-direction:column;width:320px;display:flex}.color-picker__swatches{gap:var(--spacing-6);flex-direction:column;display:flex}.color-picker__swatches-label{font-size:var(--font-size-xxs);color:var(--body-sub-title-color)}.color-picker__swatches-row{gap:var(--spacing-6);flex-wrap:wrap;display:flex}.color-picker__swatch{width:var(--spacing-20);height:var(--spacing-20);border:1px solid color-mix(in srgb, var(--body-color) 30%, transparent);cursor:pointer;transition:transform var(--transition-fast);border-radius:50%;padding:0}.color-picker__swatch:hover{transform:scale(1.15)}.color-picker__swatch.is-selected{outline:2px solid var(--body-accent-color);outline-offset:2px}.color-picker__preview{border-radius:var(--radius);border:1px solid var(--delimiter-color);width:100%;height:40px}.color-picker__controls{gap:var(--spacing-12);flex-direction:column;display:flex}.color-picker__sv{border-radius:var(--radius);cursor:crosshair;touch-action:none;-webkit-user-select:none;user-select:none;
|
|
1
|
+
.color-picker{gap:var(--spacing-12);border:1px solid var(--delimiter-color);border-radius:var(--radius);padding:var(--spacing-16);background:var(--card-background-color);flex-direction:column;width:320px;display:flex}.color-picker--bare{background:0 0;border:none;width:100%;padding:0}.color-picker__swatches{gap:var(--spacing-6);flex-direction:column;display:flex}.color-picker__swatches-label{font-size:var(--font-size-xxs);color:var(--body-sub-title-color)}.color-picker__swatches-row{gap:var(--spacing-6);flex-wrap:wrap;display:flex}.color-picker__swatch{width:var(--spacing-20);height:var(--spacing-20);border:1px solid color-mix(in srgb, var(--body-color) 30%, transparent);cursor:pointer;transition:transform var(--transition-fast);border-radius:50%;padding:0}.color-picker__swatch:hover{transform:scale(1.15)}.color-picker__swatch.is-selected{outline:2px solid var(--body-accent-color);outline-offset:2px}.color-picker__preview{border-radius:var(--radius);border:1px solid var(--delimiter-color);width:100%;height:40px}.color-picker__controls{gap:var(--spacing-12);flex-direction:column;display:flex}.color-picker__sv{width:100%;height:var(--color-picker-field-height,180px);border-radius:var(--radius);cursor:crosshair;touch-action:none;-webkit-user-select:none;user-select:none;position:relative;overflow:hidden}.color-picker__sv-white,.color-picker__sv-black{position:absolute;inset:0}.color-picker__sv-white{background:linear-gradient(90deg,#fff,#fff0)}.color-picker__sv-black{background:linear-gradient(#0000,#000)}.color-picker__sv-handle{border:2px solid #fff;border-radius:50%;width:12px;height:12px;position:absolute;transform:translate(-6px,-6px);box-shadow:0 0 0 1px #0000004d}.color-picker__slider input[type=range]{width:100%}.color-picker__mode-toggle{gap:var(--spacing-8);display:flex}.color-picker__mode-toggle .button{padding:6px 10px}.color-picker__mode-toggle .button.is-active{border:1px solid var(--body-accent-color);color:var(--body-accent-color)}.color-picker__fields{gap:var(--spacing-8);grid-template-columns:1fr;display:grid}.color-picker__fields .input-text-wrapper,.color-picker__fields .input-number-wrapper{width:100%}.color-picker__fields--rgb,.color-picker__fields--hsl,.color-picker__fields--hex{grid-template-columns:repeat(3,1fr)}.color-picker__fields--hex .input-text-wrapper{grid-column:span 3}
|