@mittwald/flow-react-components 0.1.0-alpha.240 → 0.1.0-alpha.242
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/CalendarHeader-Daht5eUN.js +17 -0
- package/dist/DatePicker.js +29 -27
- package/dist/DateRangePicker.js +29 -27
- package/dist/styles.css +1 -1
- package/dist/types/components/Calendar/index.d.ts +2 -1
- package/package.json +4 -4
- package/dist/CalendarHeader-DffUkgNw.js +0 -16
- package/dist/types/components/DatePicker/components/Calendar/index.d.ts +0 -3
- package/dist/types/components/DateRangePicker/components/RangeCalendar/index.d.ts +0 -3
- /package/dist/types/components/{DatePicker/components/Calendar → Calendar}/Calendar.d.ts +0 -0
- /package/dist/types/components/{DateRangePicker/components/RangeCalendar → Calendar}/RangeCalendar.d.ts +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import e from "react";
|
|
4
|
+
import { B as r } from "./Button-DPF2xiJl.js";
|
|
5
|
+
import * as a from "react-aria-components";
|
|
6
|
+
import "@tabler/icons-react";
|
|
7
|
+
import "./Icon-0QYDidQk.js";
|
|
8
|
+
import { I as n } from "./IconCalendar-BGo-M1_G.js";
|
|
9
|
+
import { I as t } from "./IconChevronRight-Dj3jk8WE.js";
|
|
10
|
+
const o = "flow--calendar", l = "flow--calendar--range", f = {
|
|
11
|
+
calendar: o,
|
|
12
|
+
range: l
|
|
13
|
+
}, u = () => /* @__PURE__ */ e.createElement("header", null, /* @__PURE__ */ e.createElement(r, { ariaSlot: "previous", variant: "plain", color: "secondary" }, /* @__PURE__ */ e.createElement(n, null)), /* @__PURE__ */ e.createElement(a.Heading, null), /* @__PURE__ */ e.createElement(r, { ariaSlot: "next", variant: "plain", color: "secondary" }, /* @__PURE__ */ e.createElement(t, null)));
|
|
14
|
+
export {
|
|
15
|
+
u as C,
|
|
16
|
+
f as s
|
|
17
|
+
};
|
package/dist/DatePicker.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
import e from "react";
|
|
4
|
-
import
|
|
4
|
+
import u from "clsx";
|
|
5
5
|
import "./propsContext-DzAKlmhS.js";
|
|
6
|
-
import { P as
|
|
6
|
+
import { P as f } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
7
7
|
import "@react-aria/utils";
|
|
8
8
|
import "remeda";
|
|
9
9
|
import * as r from "react-aria-components";
|
|
10
|
-
import {
|
|
11
|
-
import { B as C } from "./Button-DPF2xiJl.js";
|
|
10
|
+
import { B as E } from "./Button-DPF2xiJl.js";
|
|
12
11
|
import "@tabler/icons-react";
|
|
13
12
|
import "./Icon-0QYDidQk.js";
|
|
14
|
-
import { a as
|
|
15
|
-
import { F as
|
|
13
|
+
import { a as C } from "./IconCalendar-BGo-M1_G.js";
|
|
14
|
+
import { F as D } from "./FieldError-CEquAsls.js";
|
|
16
15
|
import { s as a } from "./FormField.module-DHK6nIcD.js";
|
|
17
|
-
import { P } from "./PopoverTrigger-BpW0w6yf.js";
|
|
16
|
+
import { P as N } from "./PopoverTrigger-BpW0w6yf.js";
|
|
18
17
|
import "mobx";
|
|
19
|
-
import { u as
|
|
20
|
-
import { f as
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
import { u as P } from "./useOverlayController-D8pgx8nV.js";
|
|
19
|
+
import { f as y } from "./flowComponent-DT1Ap-ot.js";
|
|
20
|
+
import { s as b, C as g } from "./CalendarHeader-Daht5eUN.js";
|
|
21
|
+
const v = "flow--date-picker--date-input", F = {
|
|
22
|
+
dateInput: v
|
|
23
|
+
}, I = (t) => {
|
|
24
24
|
const { isDisabled: l } = t;
|
|
25
|
-
return /* @__PURE__ */ e.createElement(r.Group, { className:
|
|
26
|
-
},
|
|
27
|
-
const { children: l, className: n, errorMessage:
|
|
25
|
+
return /* @__PURE__ */ e.createElement(r.Group, { className: F.dateInput }, /* @__PURE__ */ e.createElement(r.DateInput, null, (n) => /* @__PURE__ */ e.createElement(r.DateSegment, { segment: n })), /* @__PURE__ */ e.createElement(E, { variant: "plain", color: "secondary", isDisabled: l }, /* @__PURE__ */ e.createElement(C, null)));
|
|
26
|
+
}, h = () => /* @__PURE__ */ e.createElement(r.Calendar, { className: b.calendar }, /* @__PURE__ */ e.createElement(g, null), /* @__PURE__ */ e.createElement(r.CalendarGrid, { weekdayStyle: "short" }, (t) => /* @__PURE__ */ e.createElement(r.CalendarCell, { date: t }))), K = y("DatePicker", (t) => {
|
|
27
|
+
const { children: l, className: n, errorMessage: i, onChange: m, ...c } = t, p = u(a.formField, n), d = {
|
|
28
28
|
Label: {
|
|
29
29
|
className: a.label,
|
|
30
30
|
optional: !t.isRequired
|
|
@@ -35,31 +35,33 @@ const F = () => /* @__PURE__ */ e.createElement(r.Calendar, { className: f.calen
|
|
|
35
35
|
FieldError: {
|
|
36
36
|
className: a.customFieldError
|
|
37
37
|
}
|
|
38
|
-
}, o =
|
|
38
|
+
}, o = P("Popover");
|
|
39
39
|
return /* @__PURE__ */ e.createElement(
|
|
40
40
|
r.DatePicker,
|
|
41
41
|
{
|
|
42
|
-
...
|
|
43
|
-
className:
|
|
44
|
-
onOpenChange: (
|
|
42
|
+
...c,
|
|
43
|
+
className: p,
|
|
44
|
+
onOpenChange: (s) => o.setOpen(s),
|
|
45
45
|
isOpen: o.isOpen,
|
|
46
|
-
onChange:
|
|
46
|
+
onChange: (s) => {
|
|
47
|
+
m && m(s), o.close();
|
|
48
|
+
}
|
|
47
49
|
},
|
|
48
|
-
/* @__PURE__ */ e.createElement(
|
|
49
|
-
/* @__PURE__ */ e.createElement(
|
|
50
|
-
/* @__PURE__ */ e.createElement(
|
|
50
|
+
/* @__PURE__ */ e.createElement(I, { isDisabled: t.isDisabled }),
|
|
51
|
+
/* @__PURE__ */ e.createElement(f, { props: d }, l),
|
|
52
|
+
/* @__PURE__ */ e.createElement(D, { className: a.fieldError }, i),
|
|
51
53
|
/* @__PURE__ */ e.createElement(
|
|
52
|
-
|
|
54
|
+
N,
|
|
53
55
|
{
|
|
54
56
|
placement: "bottom end",
|
|
55
57
|
isDialogContent: !0,
|
|
56
58
|
controller: o
|
|
57
59
|
},
|
|
58
|
-
/* @__PURE__ */ e.createElement(
|
|
60
|
+
/* @__PURE__ */ e.createElement(h, null)
|
|
59
61
|
)
|
|
60
62
|
);
|
|
61
63
|
});
|
|
62
64
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
K as DatePicker,
|
|
66
|
+
K as default
|
|
65
67
|
};
|
package/dist/DateRangePicker.js
CHANGED
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import e from "react";
|
|
4
4
|
import { s as n } from "./FormField.module-DHK6nIcD.js";
|
|
5
|
-
import
|
|
5
|
+
import c from "clsx";
|
|
6
6
|
import "./propsContext-DzAKlmhS.js";
|
|
7
|
-
import { P as
|
|
7
|
+
import { P as f } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
8
8
|
import "@react-aria/utils";
|
|
9
9
|
import "remeda";
|
|
10
10
|
import * as t from "react-aria-components";
|
|
11
|
-
import { P as
|
|
12
|
-
import { s as
|
|
13
|
-
import { B as
|
|
11
|
+
import { P as g } from "./PopoverTrigger-BpW0w6yf.js";
|
|
12
|
+
import { s as i, C } from "./CalendarHeader-Daht5eUN.js";
|
|
13
|
+
import { B as D } from "./Button-DPF2xiJl.js";
|
|
14
14
|
import "@tabler/icons-react";
|
|
15
15
|
import "./Icon-0QYDidQk.js";
|
|
16
|
-
import { a as
|
|
17
|
-
import { F as
|
|
16
|
+
import { a as R } from "./IconCalendar-BGo-M1_G.js";
|
|
17
|
+
import { F as N } from "./FieldError-CEquAsls.js";
|
|
18
18
|
import "mobx";
|
|
19
|
-
import { u as
|
|
20
|
-
import { f as
|
|
21
|
-
const
|
|
22
|
-
dateRangeInput:
|
|
23
|
-
},
|
|
19
|
+
import { u as P } from "./useOverlayController-D8pgx8nV.js";
|
|
20
|
+
import { f as v } from "./flowComponent-DT1Ap-ot.js";
|
|
21
|
+
const I = () => /* @__PURE__ */ e.createElement(t.RangeCalendar, { className: c(i.calendar, i.range) }, /* @__PURE__ */ e.createElement(C, null), /* @__PURE__ */ e.createElement(t.CalendarGrid, null, (r) => /* @__PURE__ */ e.createElement(t.CalendarCell, { date: r }))), b = "flow--date-range-picker--date-range-input", F = {
|
|
22
|
+
dateRangeInput: b
|
|
23
|
+
}, h = (r) => {
|
|
24
24
|
const { isDisabled: l } = r;
|
|
25
|
-
return /* @__PURE__ */ e.createElement(t.Group, { className:
|
|
26
|
-
},
|
|
27
|
-
const { children: l, className: a, errorMessage:
|
|
25
|
+
return /* @__PURE__ */ e.createElement(t.Group, { className: F.dateRangeInput }, /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(t.DateInput, { slot: "start" }, (a) => /* @__PURE__ */ e.createElement(t.DateSegment, { segment: a })), /* @__PURE__ */ e.createElement("span", { "aria-hidden": "true" }, "–"), /* @__PURE__ */ e.createElement(t.DateInput, { slot: "end" }, (a) => /* @__PURE__ */ e.createElement(t.DateSegment, { segment: a }))), /* @__PURE__ */ e.createElement(D, { variant: "plain", color: "secondary", isDisabled: l }, /* @__PURE__ */ e.createElement(R, null)));
|
|
26
|
+
}, K = v("DateRangePicker", (r) => {
|
|
27
|
+
const { children: l, className: a, errorMessage: p, onChange: m, ...d } = r, u = c(n.formField, a), E = {
|
|
28
28
|
Label: {
|
|
29
29
|
className: n.label,
|
|
30
30
|
optional: !r.isRequired
|
|
@@ -35,31 +35,33 @@ const v = () => /* @__PURE__ */ e.createElement(t.RangeCalendar, { className: f.
|
|
|
35
35
|
FieldError: {
|
|
36
36
|
className: n.customFieldError
|
|
37
37
|
}
|
|
38
|
-
}, o =
|
|
38
|
+
}, o = P("Popover");
|
|
39
39
|
return /* @__PURE__ */ e.createElement(
|
|
40
40
|
t.DateRangePicker,
|
|
41
41
|
{
|
|
42
|
-
...
|
|
43
|
-
className:
|
|
44
|
-
onOpenChange: (
|
|
42
|
+
...d,
|
|
43
|
+
className: u,
|
|
44
|
+
onOpenChange: (s) => o.setOpen(s),
|
|
45
45
|
isOpen: o.isOpen,
|
|
46
|
-
onChange:
|
|
46
|
+
onChange: (s) => {
|
|
47
|
+
m && m(s), o.close();
|
|
48
|
+
}
|
|
47
49
|
},
|
|
48
|
-
/* @__PURE__ */ e.createElement(
|
|
49
|
-
/* @__PURE__ */ e.createElement(
|
|
50
|
-
/* @__PURE__ */ e.createElement(
|
|
50
|
+
/* @__PURE__ */ e.createElement(h, { isDisabled: r.isDisabled }),
|
|
51
|
+
/* @__PURE__ */ e.createElement(f, { props: E }, l),
|
|
52
|
+
/* @__PURE__ */ e.createElement(N, { className: n.fieldError }, p),
|
|
51
53
|
/* @__PURE__ */ e.createElement(
|
|
52
|
-
|
|
54
|
+
g,
|
|
53
55
|
{
|
|
54
56
|
placement: "bottom end",
|
|
55
57
|
isDialogContent: !0,
|
|
56
58
|
controller: o
|
|
57
59
|
},
|
|
58
|
-
/* @__PURE__ */ e.createElement(
|
|
60
|
+
/* @__PURE__ */ e.createElement(I, null)
|
|
59
61
|
)
|
|
60
62
|
);
|
|
61
63
|
});
|
|
62
64
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
K as DateRangePicker,
|
|
66
|
+
K as default
|
|
65
67
|
};
|