alif-ui 2.0.0-beta.1 → 2.0.0-beta.2
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/Alert/Alert.d.ts.map +1 -1
- package/dist/components/Alert/Alert.js +4 -3
- package/dist/components/Dates/InputDatePicker/DatePicker/DayView/DayView.d.ts.map +1 -1
- package/dist/components/Dates/InputDatePicker/DatePicker/DayView/DayView.js +19 -18
- package/dist/components/Dates/InputDatePicker/DatePicker/MonthView/MonthView.d.ts.map +1 -1
- package/dist/components/Dates/InputDatePicker/DatePicker/MonthView/MonthView.js +5 -4
- package/dist/components/Dates/InputDatePicker/DatePicker/YearView/YearView.d.ts.map +1 -1
- package/dist/components/Dates/InputDatePicker/DatePicker/YearView/YearView.js +15 -14
- package/dist/components/Dates/InputMonthPicker/MonthPicker/MonthPicker.d.ts.map +1 -1
- package/dist/components/Dates/InputMonthPicker/MonthPicker/MonthPicker.js +16 -15
- package/dist/components/Dates/InputMonthYearPicker/MonthYearPicker/MonthView/MonthView.d.ts.map +1 -1
- package/dist/components/Dates/InputMonthYearPicker/MonthYearPicker/MonthView/MonthView.js +10 -9
- package/dist/components/Dates/InputMonthYearPicker/MonthYearPicker/YearView/YearView.d.ts.map +1 -1
- package/dist/components/Dates/InputMonthYearPicker/MonthYearPicker/YearView/YearView.js +27 -26
- package/dist/components/Dates/InputYearPicker/YearPicker/YearPicker.d.ts.map +1 -1
- package/dist/components/Dates/InputYearPicker/YearPicker/YearPicker.js +5 -4
- package/dist/components/Field/InputBaseWrapper/InputBaseWrapper.d.ts.map +1 -1
- package/dist/components/Field/InputBaseWrapper/InputBaseWrapper.js +1 -0
- package/dist/components/Sidebar/SidebarHeader/SidebarHeader.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarHeader/SidebarHeader.js +1 -0
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.js +7 -6
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Alert/Alert.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAY3C,eAAO,MAAM,KAAK,iFAUf,UAAU,
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Alert/Alert.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAY3C,eAAO,MAAM,KAAK,iFAUf,UAAU,4CA6DZ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as u, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { classNames as x } from "../../utils/class-names.js";
|
|
3
|
-
import { getAlertStyles as
|
|
3
|
+
import { getAlertStyles as b, ARIA_CLOSE_LABEL as I } from "./Alert.utils.js";
|
|
4
4
|
import { useComponentId as g } from "../../hooks/useComponentId/useComponentId.js";
|
|
5
5
|
import { useLocale as A } from "../../providers/hooks/useLocale/useLocale.js";
|
|
6
6
|
import { Typography as _ } from "../Typography/Typography.js";
|
|
@@ -37,7 +37,7 @@ const L = "_root_8u4mx_1", N = "_outline_8u4mx_45", O = "_container_8u4mx_57", E
|
|
|
37
37
|
id: i,
|
|
38
38
|
"aria-labelledby": t ? a : void 0,
|
|
39
39
|
"aria-describedby": e ? d : void 0,
|
|
40
|
-
style: { ...
|
|
40
|
+
style: { ...b(l, s), ...p },
|
|
41
41
|
className: x(
|
|
42
42
|
r.root,
|
|
43
43
|
l === "outline" && r.outline,
|
|
@@ -72,9 +72,10 @@ const L = "_root_8u4mx_1", N = "_outline_8u4mx_45", O = "_container_8u4mx_57", E
|
|
|
72
72
|
c && /* @__PURE__ */ o(
|
|
73
73
|
B,
|
|
74
74
|
{
|
|
75
|
+
type: "button",
|
|
75
76
|
className: r.clearButton,
|
|
76
77
|
onClick: c,
|
|
77
|
-
"aria-label":
|
|
78
|
+
"aria-label": I[h],
|
|
78
79
|
children: /* @__PURE__ */ o(S, {})
|
|
79
80
|
}
|
|
80
81
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DayView.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/Dates/InputDatePicker/DatePicker/DayView/DayView.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAe,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKlE,UAAU,YAAY;IACrB,WAAW,EAAE,IAAI,CAAC;IAClB,KAAK,EAAE,IAAI,CAAC;IACZ,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5C,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,OAAO,yHAWjB,YAAY,
|
|
1
|
+
{"version":3,"file":"DayView.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/Dates/InputDatePicker/DatePicker/DayView/DayView.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAe,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKlE,UAAU,YAAY;IACrB,WAAW,EAAE,IAAI,CAAC;IAClB,KAAK,EAAE,IAAI,CAAC;IACZ,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5C,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,OAAO,yHAWjB,YAAY,4CA6Ed,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as m, jsxs as T } from "react/jsx-runtime";
|
|
2
2
|
import { resolveTypography as j } from "../../../../../utils/typography.js";
|
|
3
3
|
import { classNames as d } from "../../../../../utils/class-names.js";
|
|
4
|
-
import { dateMatcher as
|
|
4
|
+
import { dateMatcher as s } from "../DatePicker.utils.js";
|
|
5
5
|
import { WEEKDAYS as F } from "../DatePicker.constants.js";
|
|
6
6
|
import { getRangeMouseHandlers as I } from "../../../Dates.utils.js";
|
|
7
|
-
import { c as
|
|
7
|
+
import { c as t } from "../../../../../Dates.module-DMolkD_T.js";
|
|
8
8
|
import { useLocale as W } from "../../../../../providers/hooks/useLocale/useLocale.js";
|
|
9
9
|
import { Typography as Y } from "../../../../Typography/Typography.js";
|
|
10
10
|
const B = ({
|
|
@@ -17,29 +17,30 @@ const B = ({
|
|
|
17
17
|
isRange: S,
|
|
18
18
|
dayRange: r,
|
|
19
19
|
onSelectDate: M,
|
|
20
|
-
onHoverDate:
|
|
20
|
+
onHoverDate: u
|
|
21
21
|
}) => {
|
|
22
|
-
const { locale:
|
|
23
|
-
const o =
|
|
24
|
-
|
|
22
|
+
const { locale: w } = W(), a = l.getFullYear(), i = l.getMonth(), k = new Date(a, i + 1, 0).getDate(), g = new Date(a, i, 1).getDay(), v = g === 0 ? 6 : g - 1, E = (e) => s.isOutOfRange(e, h, D) || (n == null ? void 0 : n.some((o) => s.isSameDay(o, e))), R = (e) => {
|
|
23
|
+
const o = s.isSameDay(e, f), p = e.getDay() === 0 || e.getDay() === 6, O = !!y && s.isSameDay(y, e), x = r.isStart(e), A = r.isEnd(e), c = r.isMiddle(e), C = d(
|
|
24
|
+
t.dateCell,
|
|
25
25
|
"uiFont",
|
|
26
|
-
O &&
|
|
27
|
-
o &&
|
|
28
|
-
x &&
|
|
29
|
-
A &&
|
|
30
|
-
c &&
|
|
31
|
-
c && o &&
|
|
32
|
-
c && p &&
|
|
33
|
-
p &&
|
|
26
|
+
O && t.active,
|
|
27
|
+
o && t.today,
|
|
28
|
+
x && t.rangeStart,
|
|
29
|
+
A && t.rangeEnd,
|
|
30
|
+
c && t.rangeMiddle,
|
|
31
|
+
c && o && t.todayRangeMiddle,
|
|
32
|
+
c && p && t.weekendRangeMiddle,
|
|
33
|
+
p && t.weekend
|
|
34
34
|
);
|
|
35
35
|
return /* @__PURE__ */ m(
|
|
36
36
|
"button",
|
|
37
37
|
{
|
|
38
|
+
type: "button",
|
|
38
39
|
onClick: () => M(e),
|
|
39
40
|
disabled: E(e),
|
|
40
41
|
style: j("body", "s"),
|
|
41
42
|
className: C,
|
|
42
|
-
...I(S,
|
|
43
|
+
...I(S, u, e),
|
|
43
44
|
children: e.getDate()
|
|
44
45
|
},
|
|
45
46
|
e.toISOString()
|
|
@@ -51,14 +52,14 @@ const B = ({
|
|
|
51
52
|
(e, o) => R(new Date(a, i, o + 1))
|
|
52
53
|
)
|
|
53
54
|
];
|
|
54
|
-
return /* @__PURE__ */ T("div", { className: d(
|
|
55
|
-
F[
|
|
55
|
+
return /* @__PURE__ */ T("div", { className: d(t.days, t.calendarShadow), children: [
|
|
56
|
+
F[w].map((e) => /* @__PURE__ */ m(
|
|
56
57
|
Y,
|
|
57
58
|
{
|
|
58
59
|
size: "l",
|
|
59
60
|
element: "span",
|
|
60
61
|
variant: "description",
|
|
61
|
-
className:
|
|
62
|
+
className: t.weekday,
|
|
62
63
|
children: e
|
|
63
64
|
},
|
|
64
65
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MonthView.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/Dates/InputDatePicker/DatePicker/MonthView/MonthView.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAe,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKlE,UAAU,cAAc;IACvB,WAAW,EAAE,IAAI,CAAC;IAClB,KAAK,EAAE,IAAI,CAAC;IACZ,KAAK,EAAE,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC9C,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACpC,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,SAAS,sGAUnB,cAAc,
|
|
1
|
+
{"version":3,"file":"MonthView.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/Dates/InputDatePicker/DatePicker/MonthView/MonthView.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAe,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKlE,UAAU,cAAc;IACvB,WAAW,EAAE,IAAI,CAAC;IAClB,KAAK,EAAE,IAAI,CAAC;IACZ,KAAK,EAAE,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC9C,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACpC,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,SAAS,sGAUnB,cAAc,4CAqDhB,CAAC"}
|
|
@@ -14,8 +14,8 @@ const B = ({
|
|
|
14
14
|
maxDate: i,
|
|
15
15
|
isRange: g,
|
|
16
16
|
monthRange: s,
|
|
17
|
-
onMonthSelect:
|
|
18
|
-
onHoverDate:
|
|
17
|
+
onMonthSelect: y,
|
|
18
|
+
onHoverDate: S
|
|
19
19
|
}) => {
|
|
20
20
|
const { locale: u } = j(), c = h.getFullYear(), b = (a, o) => r && o < r || i && a > i, w = (a, o) => {
|
|
21
21
|
const e = new Date(c, o, 1), E = e, N = new Date(c, o + 1, 0), C = n instanceof Date && M.isSameMonth(n, e), d = M.isSameMonth(e, f), R = s.isStart(e), T = s.isEnd(e), l = s.isMiddle(e), v = p(
|
|
@@ -32,11 +32,12 @@ const B = ({
|
|
|
32
32
|
return /* @__PURE__ */ m(
|
|
33
33
|
"button",
|
|
34
34
|
{
|
|
35
|
+
type: "button",
|
|
35
36
|
disabled: b(E, N),
|
|
36
|
-
onClick: () =>
|
|
37
|
+
onClick: () => y(e),
|
|
37
38
|
style: D("body", "s"),
|
|
38
39
|
className: v,
|
|
39
|
-
...F(g,
|
|
40
|
+
...F(g, S, e),
|
|
40
41
|
children: a
|
|
41
42
|
},
|
|
42
43
|
o
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YearView.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/Dates/InputDatePicker/DatePicker/YearView/YearView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAe,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIlE,UAAU,aAAa;IACtB,KAAK,EAAE,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC;IAClC,KAAK,EAAE,IAAI,CAAC;IACZ,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC7C,SAAS,EAAE,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IAC/C,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC1C,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,QAAQ,kHAWlB,aAAa,
|
|
1
|
+
{"version":3,"file":"YearView.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/Dates/InputDatePicker/DatePicker/YearView/YearView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAe,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIlE,UAAU,aAAa;IACtB,KAAK,EAAE,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC;IAClC,KAAK,EAAE,IAAI,CAAC;IACZ,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC7C,SAAS,EAAE,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IAC/C,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC1C,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,QAAQ,kHAWlB,aAAa,4CAqDf,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { resolveTypography as
|
|
2
|
+
import { resolveTypography as R } from "../../../../../utils/typography.js";
|
|
3
3
|
import { classNames as g } from "../../../../../utils/class-names.js";
|
|
4
4
|
import { dateMatcher as m } from "../DatePicker.utils.js";
|
|
5
5
|
import { getRangeMouseHandlers as v } from "../../../Dates.utils.js";
|
|
@@ -11,39 +11,40 @@ const _ = ({
|
|
|
11
11
|
maxDate: o,
|
|
12
12
|
isRange: p,
|
|
13
13
|
yearRange: n,
|
|
14
|
-
targetRef:
|
|
15
|
-
isScrollTarget:
|
|
14
|
+
targetRef: u,
|
|
15
|
+
isScrollTarget: f,
|
|
16
16
|
onYearSelect: Y,
|
|
17
17
|
onHoverDate: S
|
|
18
18
|
}) => {
|
|
19
19
|
const c = (t == null ? void 0 : t.getFullYear()) ?? 1900, h = (o == null ? void 0 : o.getFullYear()) ?? 2100, M = Array.from(
|
|
20
20
|
{ length: h - c + 1 },
|
|
21
21
|
(r, e) => c + e
|
|
22
|
-
),
|
|
23
|
-
const e = new Date(r, 0, 1),
|
|
22
|
+
), y = (r) => {
|
|
23
|
+
const e = new Date(r, 0, 1), C = a instanceof Date && m.isSameYear(a, e), F = r === l.getFullYear(), b = m.isSameYear(e, l), w = n.isStart(e), E = n.isEnd(e), d = n.isMiddle(e), N = g(
|
|
24
24
|
s.dateCell,
|
|
25
25
|
"uiFont",
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
C && s.active,
|
|
27
|
+
F && s.today,
|
|
28
|
+
w && s.rangeStart,
|
|
29
|
+
E && s.rangeEnd,
|
|
30
30
|
d && s.rangeMiddle,
|
|
31
|
-
d &&
|
|
31
|
+
d && b && s.todayRangeMiddle
|
|
32
32
|
);
|
|
33
33
|
return /* @__PURE__ */ i(
|
|
34
34
|
"button",
|
|
35
35
|
{
|
|
36
|
-
|
|
36
|
+
type: "button",
|
|
37
|
+
ref: f(r) ? u : null,
|
|
37
38
|
onClick: () => Y(e),
|
|
38
|
-
style:
|
|
39
|
-
className:
|
|
39
|
+
style: R("body", "s"),
|
|
40
|
+
className: N,
|
|
40
41
|
...v(p, S, e),
|
|
41
42
|
children: r
|
|
42
43
|
},
|
|
43
44
|
r
|
|
44
45
|
);
|
|
45
46
|
};
|
|
46
|
-
return /* @__PURE__ */ i("div", { className: g(s.calendar, s.calendarShadow), children: M.map(
|
|
47
|
+
return /* @__PURE__ */ i("div", { className: g(s.calendar, s.calendarShadow), children: M.map(y) });
|
|
47
48
|
};
|
|
48
49
|
export {
|
|
49
50
|
_ as YearView
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MonthPicker.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/Dates/InputMonthPicker/MonthPicker/MonthPicker.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAc,gBAAgB,EAAc,MAAM,qBAAqB,CAAC;AAW/E,eAAO,MAAM,WAAW,+GAWrB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MonthPicker.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/Dates/InputMonthPicker/MonthPicker/MonthPicker.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAc,gBAAgB,EAAc,MAAM,qBAAqB,CAAC;AAW/E,eAAO,MAAM,WAAW,+GAWrB,gBAAgB,4CAiGlB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as U, jsx as
|
|
1
|
+
import { jsxs as U, jsx as y } from "react/jsx-runtime";
|
|
2
2
|
import { resolveTypography as _ } from "../../../../utils/typography.js";
|
|
3
|
-
import { classNames as
|
|
4
|
-
import { useState as
|
|
3
|
+
import { classNames as M } from "../../../../utils/class-names.js";
|
|
4
|
+
import { useState as e, useMemo as q } from "react";
|
|
5
5
|
import { MONTHS as G, MONTH_NUMBERS as I } from "./MonthPicker.constants.js";
|
|
6
|
-
import { normalizeRange as
|
|
6
|
+
import { normalizeRange as v } from "./MonthPicker.utils.js";
|
|
7
7
|
import { c as r } from "../../../../Dates.module-DMolkD_T.js";
|
|
8
8
|
import { getRangeBoundaries as J, getPickerStyles as K, getRangeMouseHandlers as Q } from "../../Dates.utils.js";
|
|
9
9
|
import { PickerOptions as V } from "../../PickerOptions/PickerOptions.js";
|
|
@@ -14,19 +14,19 @@ const C = ({
|
|
|
14
14
|
value: o,
|
|
15
15
|
isRange: m,
|
|
16
16
|
disabledMonths: d,
|
|
17
|
-
options:
|
|
18
|
-
pickerWidth:
|
|
17
|
+
options: x,
|
|
18
|
+
pickerWidth: H,
|
|
19
19
|
className: D,
|
|
20
20
|
style: E,
|
|
21
21
|
ref: T
|
|
22
22
|
}) => {
|
|
23
|
-
const { locale: i } = W(), j = (/* @__PURE__ */ new Date()).getMonth() + 1, [f, N] =
|
|
23
|
+
const { locale: i } = W(), j = (/* @__PURE__ */ new Date()).getMonth() + 1, [f, N] = e(null), [S, w] = e(null), B = G[i], c = q(
|
|
24
24
|
() => J(
|
|
25
25
|
o,
|
|
26
26
|
m,
|
|
27
27
|
f,
|
|
28
28
|
S,
|
|
29
|
-
|
|
29
|
+
v
|
|
30
30
|
),
|
|
31
31
|
[o, m, f, S]
|
|
32
32
|
), z = (t) => {
|
|
@@ -38,11 +38,11 @@ const C = ({
|
|
|
38
38
|
N([t, null]), s == null || s(t);
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
|
-
const [p] = f, u =
|
|
41
|
+
const [p] = f, u = v(p, t);
|
|
42
42
|
N(null), s == null || s(u), l == null || l(u);
|
|
43
43
|
}, A = (t) => {
|
|
44
44
|
const p = j === t, u = !m && t === o, F = m && (c == null ? void 0 : c[0]) === t, L = m && (c == null ? void 0 : c[1]) === t, O = m && c && t > c[0] && t < c[1];
|
|
45
|
-
return
|
|
45
|
+
return M(
|
|
46
46
|
r.dateCell,
|
|
47
47
|
"uiFont",
|
|
48
48
|
r.month,
|
|
@@ -58,12 +58,13 @@ const C = ({
|
|
|
58
58
|
"div",
|
|
59
59
|
{
|
|
60
60
|
ref: T,
|
|
61
|
-
style: K("month",
|
|
62
|
-
className:
|
|
61
|
+
style: K("month", H, E),
|
|
62
|
+
className: M(r.root, D),
|
|
63
63
|
children: [
|
|
64
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ y("div", { className: M(r.calendar, r.calendarShadow), children: I.map((t) => /* @__PURE__ */ y(
|
|
65
65
|
"button",
|
|
66
66
|
{
|
|
67
|
+
type: "button",
|
|
67
68
|
onClick: () => z(t),
|
|
68
69
|
...Q(m, w, t),
|
|
69
70
|
className: A(t),
|
|
@@ -73,10 +74,10 @@ const C = ({
|
|
|
73
74
|
},
|
|
74
75
|
t
|
|
75
76
|
)) }),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ y(
|
|
77
78
|
V,
|
|
78
79
|
{
|
|
79
|
-
options:
|
|
80
|
+
options: x,
|
|
80
81
|
isRange: m,
|
|
81
82
|
disabledOptions: d,
|
|
82
83
|
onChange: (t) => {
|
package/dist/components/Dates/InputMonthYearPicker/MonthYearPicker/MonthView/MonthView.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MonthView.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/Dates/InputMonthYearPicker/MonthYearPicker/MonthView/MonthView.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,UAAU,cAAc;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,YAAY,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;CACjD;AAED,eAAO,MAAM,SAAS,kIAYnB,cAAc,
|
|
1
|
+
{"version":3,"file":"MonthView.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/Dates/InputMonthYearPicker/MonthYearPicker/MonthView/MonthView.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,UAAU,cAAc;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,YAAY,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;CACjD;AAED,eAAO,MAAM,SAAS,kIAYnB,cAAc,4CAoFhB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
2
2
|
import { resolveTypography as k } from "../../../../../utils/typography.js";
|
|
3
|
-
import { classNames as
|
|
3
|
+
import { classNames as N } from "../../../../../utils/class-names.js";
|
|
4
4
|
import { MONTHS as E } from "../../../InputMonthPicker/MonthPicker/MonthPicker.constants.js";
|
|
5
5
|
import { getRangeMouseHandlers as F } from "../../../Dates.utils.js";
|
|
6
6
|
import { c as n } from "../../../../../Dates.module-DMolkD_T.js";
|
|
@@ -19,12 +19,12 @@ const U = ({
|
|
|
19
19
|
onMonthClick: S,
|
|
20
20
|
onHoverMonth: V
|
|
21
21
|
}) => {
|
|
22
|
-
const { locale:
|
|
22
|
+
const { locale: b } = q(), v = E[b], c = g ? i(g) : null, a = M ? i(M) : null, w = (t) => !!(c && (o < c.year || o === c.year && t < c.month) || a && (o > a.year || o === a.year && t > a.month)), H = (t) => {
|
|
23
23
|
const e = B(t, o);
|
|
24
|
-
return
|
|
25
|
-
},
|
|
24
|
+
return w(t) || (u == null ? void 0 : u.includes(e));
|
|
25
|
+
}, L = (t) => {
|
|
26
26
|
const [e, f] = O.map((T) => T && i(T)), j = B(t, o), l = p(o, t), s = e && p(e.year, e.month), m = f && p(f.year, f.month);
|
|
27
|
-
return
|
|
27
|
+
return N(
|
|
28
28
|
n.dateCell,
|
|
29
29
|
"uiFont",
|
|
30
30
|
n.month,
|
|
@@ -36,13 +36,14 @@ const U = ({
|
|
|
36
36
|
h === t && d === o && n.today
|
|
37
37
|
);
|
|
38
38
|
};
|
|
39
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ y("div", { className: N(n.calendar, n.calendarShadow), children: v.map((t, e) => /* @__PURE__ */ y(
|
|
40
40
|
"button",
|
|
41
41
|
{
|
|
42
|
-
|
|
42
|
+
type: "button",
|
|
43
|
+
className: L(e),
|
|
43
44
|
style: k("body", "s"),
|
|
44
45
|
onClick: () => S(e),
|
|
45
|
-
disabled:
|
|
46
|
+
disabled: H(e),
|
|
46
47
|
...F(r, V, {
|
|
47
48
|
month: e,
|
|
48
49
|
year: o
|
package/dist/components/Dates/InputMonthYearPicker/MonthYearPicker/YearView/YearView.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YearView.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/Dates/InputMonthYearPicker/MonthYearPicker/YearView/YearView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAKjD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,UAAU,aAAa;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC9B,SAAS,EAAE,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IAC/C,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC1C,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,YAAY,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;CACjD;AAED,eAAO,MAAM,QAAQ,yHAWlB,aAAa,
|
|
1
|
+
{"version":3,"file":"YearView.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/Dates/InputMonthYearPicker/MonthYearPicker/YearView/YearView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAKjD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,UAAU,aAAa;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC9B,SAAS,EAAE,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IAC/C,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC1C,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,YAAY,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;CACjD;AAED,eAAO,MAAM,QAAQ,yHAWlB,aAAa,4CAoDf,CAAC"}
|
|
@@ -4,51 +4,52 @@ import { classNames as f } from "../../../../../utils/class-names.js";
|
|
|
4
4
|
import { getRangeMouseHandlers as D } from "../../../Dates.utils.js";
|
|
5
5
|
import { c as e } from "../../../../../Dates.module-DMolkD_T.js";
|
|
6
6
|
import { parseValue as h } from "../MonthYearPicker.utils.js";
|
|
7
|
-
const
|
|
7
|
+
const F = ({
|
|
8
8
|
minYear: n,
|
|
9
|
-
maxYear:
|
|
9
|
+
maxYear: u,
|
|
10
10
|
currentYear: l,
|
|
11
11
|
value: c,
|
|
12
|
-
isRange:
|
|
13
|
-
boundaries:
|
|
14
|
-
targetRef:
|
|
15
|
-
isScrollTarget:
|
|
16
|
-
onYearClick:
|
|
17
|
-
onHoverMonth:
|
|
12
|
+
isRange: r,
|
|
13
|
+
boundaries: g,
|
|
14
|
+
targetRef: b,
|
|
15
|
+
isScrollTarget: C,
|
|
16
|
+
onYearClick: M,
|
|
17
|
+
onHoverMonth: N
|
|
18
18
|
}) => {
|
|
19
19
|
const v = Array.from(
|
|
20
|
-
{ length:
|
|
21
|
-
(
|
|
22
|
-
), w = (
|
|
20
|
+
{ length: u - n + 1 },
|
|
21
|
+
(t, s) => n + s
|
|
22
|
+
), w = (t) => {
|
|
23
23
|
var m;
|
|
24
|
-
const [s, d] =
|
|
24
|
+
const [s, d] = g.map((p) => p && h(p)), a = s && s.year, o = d && d.year, x = !r && typeof c == "string" && ((m = h(c)) == null ? void 0 : m.year) === t;
|
|
25
25
|
return f(
|
|
26
26
|
e.dateCell,
|
|
27
27
|
"uiFont",
|
|
28
28
|
x && e.active,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
l ===
|
|
29
|
+
r && a === t && e.rangeStart,
|
|
30
|
+
r && o === t && e.rangeEnd,
|
|
31
|
+
r && a && o && t > a && t < o && e.rangeMiddle,
|
|
32
|
+
r && a && o && t > a && t < o && l === t && e.todayRangeMiddle,
|
|
33
|
+
l === t && e.today
|
|
34
34
|
);
|
|
35
35
|
};
|
|
36
|
-
return /* @__PURE__ */ i("div", { className: f(e.calendar, e.calendarShadow), children: v.map((
|
|
36
|
+
return /* @__PURE__ */ i("div", { className: f(e.calendar, e.calendarShadow), children: v.map((t) => /* @__PURE__ */ i(
|
|
37
37
|
"button",
|
|
38
38
|
{
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
type: "button",
|
|
40
|
+
ref: C(t) ? b : null,
|
|
41
|
+
onClick: () => M(t),
|
|
41
42
|
style: A("body", "s"),
|
|
42
|
-
className: w(
|
|
43
|
-
...D(
|
|
43
|
+
className: w(t),
|
|
44
|
+
...D(r, N, {
|
|
44
45
|
month: 0,
|
|
45
|
-
year:
|
|
46
|
+
year: t
|
|
46
47
|
}),
|
|
47
|
-
children:
|
|
48
|
+
children: t
|
|
48
49
|
},
|
|
49
|
-
|
|
50
|
+
t
|
|
50
51
|
)) });
|
|
51
52
|
};
|
|
52
53
|
export {
|
|
53
|
-
|
|
54
|
+
F as YearView
|
|
54
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YearPicker.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/Dates/InputYearPicker/YearPicker/YearPicker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,eAAe,EAAa,MAAM,oBAAoB,CAAC;AAW5E,eAAO,MAAM,UAAU,gIAapB,eAAe,
|
|
1
|
+
{"version":3,"file":"YearPicker.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/Dates/InputYearPicker/YearPicker/YearPicker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,eAAe,EAAa,MAAM,oBAAoB,CAAC;AAW5E,eAAO,MAAM,UAAU,gIAapB,eAAe,4CAuHjB,CAAC"}
|
|
@@ -4,8 +4,8 @@ import { resolveTypography as Z } from "../../../../utils/typography.js";
|
|
|
4
4
|
import { classNames as M } from "../../../../utils/class-names.js";
|
|
5
5
|
import { makeScrollTargetYear as $, normalizeRange as j } from "./YearPicker.utils.js";
|
|
6
6
|
import { c as r } from "../../../../Dates.module-DMolkD_T.js";
|
|
7
|
-
import { PickerOptions as
|
|
8
|
-
import { getRangeBoundaries as
|
|
7
|
+
import { PickerOptions as b } from "../../PickerOptions/PickerOptions.js";
|
|
8
|
+
import { getRangeBoundaries as R, scrollToCenter as v, getPickerStyles as a, getRangeMouseHandlers as n } from "../../Dates.utils.js";
|
|
9
9
|
const lt = ({
|
|
10
10
|
maxYear: y = 2100,
|
|
11
11
|
minYear: i = 1900,
|
|
@@ -24,7 +24,7 @@ const lt = ({
|
|
|
24
24
|
() => Array.from({ length: y - i + 1 }, (t, f) => i + f),
|
|
25
25
|
[i, y]
|
|
26
26
|
), m = E(
|
|
27
|
-
() =>
|
|
27
|
+
() => R(
|
|
28
28
|
o,
|
|
29
29
|
c,
|
|
30
30
|
d,
|
|
@@ -70,6 +70,7 @@ const lt = ({
|
|
|
70
70
|
/* @__PURE__ */ S("div", { className: M(r.calendar, r.calendarShadow), children: q.map((t) => /* @__PURE__ */ S(
|
|
71
71
|
"button",
|
|
72
72
|
{
|
|
73
|
+
type: "button",
|
|
73
74
|
ref: G(t) ? x : null,
|
|
74
75
|
onClick: () => I(t),
|
|
75
76
|
className: J(t),
|
|
@@ -81,7 +82,7 @@ const lt = ({
|
|
|
81
82
|
t
|
|
82
83
|
)) }),
|
|
83
84
|
/* @__PURE__ */ S(
|
|
84
|
-
|
|
85
|
+
b,
|
|
85
86
|
{
|
|
86
87
|
options: w,
|
|
87
88
|
isRange: c,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputBaseWrapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/Field/InputBaseWrapper/InputBaseWrapper.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAKjE,eAAO,MAAM,gBAAgB,iOAsB1B,qBAAqB,
|
|
1
|
+
{"version":3,"file":"InputBaseWrapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/Field/InputBaseWrapper/InputBaseWrapper.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAKjE,eAAO,MAAM,gBAAgB,iOAsB1B,qBAAqB,4CA2FvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarHeader.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/Sidebar/SidebarHeader/SidebarHeader.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAI3D,eAAO,MAAM,aAAa,0CAKvB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"SidebarHeader.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/Sidebar/SidebarHeader/SidebarHeader.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAI3D,eAAO,MAAM,aAAa,0CAKvB,kBAAkB,4CAwCpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMjD,eAAO,MAAM,QAAQ,iJAgBlB,aAAa,
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMjD,eAAO,MAAM,QAAQ,iJAgBlB,aAAa,4CAiEf,CAAC"}
|
|
@@ -33,9 +33,9 @@ const E = "_root_31wfq_1", I = "_labelFloated_31wfq_72", O = "_disabled_31wfq_83
|
|
|
33
33
|
hintRightSection: m,
|
|
34
34
|
className: u,
|
|
35
35
|
style: w,
|
|
36
|
-
rows:
|
|
37
|
-
ref:
|
|
38
|
-
...
|
|
36
|
+
rows: y = 3,
|
|
37
|
+
ref: L,
|
|
38
|
+
...q
|
|
39
39
|
}) => {
|
|
40
40
|
const { locale: x } = B(), d = N(null), f = g(h), F = _(
|
|
41
41
|
e.root,
|
|
@@ -64,19 +64,20 @@ const E = "_root_31wfq_1", I = "_labelFloated_31wfq_72", O = "_disabled_31wfq_83
|
|
|
64
64
|
/* @__PURE__ */ t(
|
|
65
65
|
"textarea",
|
|
66
66
|
{
|
|
67
|
-
ref: v(d,
|
|
67
|
+
ref: v(d, L),
|
|
68
68
|
id: f,
|
|
69
69
|
value: o,
|
|
70
70
|
disabled: s,
|
|
71
71
|
className: "uiFont",
|
|
72
72
|
style: R("body", "m"),
|
|
73
|
-
rows:
|
|
74
|
-
...
|
|
73
|
+
rows: y,
|
|
74
|
+
...q
|
|
75
75
|
}
|
|
76
76
|
),
|
|
77
77
|
i && o && /* @__PURE__ */ t(
|
|
78
78
|
j,
|
|
79
79
|
{
|
|
80
|
+
type: "button",
|
|
80
81
|
disabled: s,
|
|
81
82
|
className: e.clearButton,
|
|
82
83
|
onMouseDown: (l) => l.preventDefault(),
|