@mittwald/flow-react-components 0.1.0-alpha.240 → 0.1.0-alpha.241

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.
@@ -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
+ };
@@ -1,30 +1,30 @@
1
1
  "use client"
2
2
  /* */
3
3
  import e from "react";
4
- import d from "clsx";
4
+ import u from "clsx";
5
5
  import "./propsContext-DzAKlmhS.js";
6
- import { P as u } from "./PropsContextProvider-C6Z4XGp6.js";
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 { s as f, C as E } from "./CalendarHeader-DffUkgNw.js";
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 D } from "./IconCalendar-BGo-M1_G.js";
15
- import { F as N } from "./FieldError-CEquAsls.js";
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 b } from "./useOverlayController-D8pgx8nV.js";
20
- import { f as v } from "./flowComponent-DT1Ap-ot.js";
21
- const F = () => /* @__PURE__ */ e.createElement(r.Calendar, { className: f.calendar }, /* @__PURE__ */ e.createElement(E, null), /* @__PURE__ */ e.createElement(r.CalendarGrid, null, (t) => /* @__PURE__ */ e.createElement(r.CalendarCell, { date: t }))), I = "flow--date-picker--date-input", g = {
22
- dateInput: I
23
- }, y = (t) => {
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: g.dateInput }, /* @__PURE__ */ e.createElement(r.DateInput, null, (n) => /* @__PURE__ */ e.createElement(r.DateSegment, { segment: n })), /* @__PURE__ */ e.createElement(C, { variant: "plain", color: "secondary", isDisabled: l }, /* @__PURE__ */ e.createElement(D, null)));
26
- }, J = v("DatePicker", (t) => {
27
- const { children: l, className: n, errorMessage: s, ...m } = t, i = d(a.formField, n), c = {
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 = b("Popover");
38
+ }, o = P("Popover");
39
39
  return /* @__PURE__ */ e.createElement(
40
40
  r.DatePicker,
41
41
  {
42
- ...m,
43
- className: i,
44
- onOpenChange: (p) => o.setOpen(p),
42
+ ...c,
43
+ className: p,
44
+ onOpenChange: (s) => o.setOpen(s),
45
45
  isOpen: o.isOpen,
46
- onChange: o.close
46
+ onChange: (s) => {
47
+ m && m(s), o.close();
48
+ }
47
49
  },
48
- /* @__PURE__ */ e.createElement(y, { isDisabled: t.isDisabled }),
49
- /* @__PURE__ */ e.createElement(u, { props: c }, l),
50
- /* @__PURE__ */ e.createElement(N, { className: a.fieldError }, s),
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
- P,
54
+ N,
53
55
  {
54
56
  placement: "bottom end",
55
57
  isDialogContent: !0,
56
58
  controller: o
57
59
  },
58
- /* @__PURE__ */ e.createElement(F, null)
60
+ /* @__PURE__ */ e.createElement(h, null)
59
61
  )
60
62
  );
61
63
  });
62
64
  export {
63
- J as DatePicker,
64
- J as default
65
+ K as DatePicker,
66
+ K as default
65
67
  };
@@ -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 d from "clsx";
5
+ import c from "clsx";
6
6
  import "./propsContext-DzAKlmhS.js";
7
- import { P as u } from "./PropsContextProvider-C6Z4XGp6.js";
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 E } from "./PopoverTrigger-BpW0w6yf.js";
12
- import { s as f, C as g } from "./CalendarHeader-DffUkgNw.js";
13
- import { B as C } from "./Button-DPF2xiJl.js";
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 D } from "./IconCalendar-BGo-M1_G.js";
17
- import { F as R } from "./FieldError-CEquAsls.js";
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 N } from "./useOverlayController-D8pgx8nV.js";
20
- import { f as P } from "./flowComponent-DT1Ap-ot.js";
21
- const v = () => /* @__PURE__ */ e.createElement(t.RangeCalendar, { className: f.calendar }, /* @__PURE__ */ e.createElement(g, null), /* @__PURE__ */ e.createElement(t.CalendarGrid, null, (r) => /* @__PURE__ */ e.createElement(t.CalendarCell, { date: r }))), I = "flow--date-range-picker--date-range-input", b = {
22
- dateRangeInput: I
23
- }, F = (r) => {
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: b.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(C, { variant: "plain", color: "secondary", isDisabled: l }, /* @__PURE__ */ e.createElement(D, null)));
26
- }, J = P("DateRangePicker", (r) => {
27
- const { children: l, className: a, errorMessage: s, ...m } = r, i = d(n.formField, a), c = {
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 = N("Popover");
38
+ }, o = P("Popover");
39
39
  return /* @__PURE__ */ e.createElement(
40
40
  t.DateRangePicker,
41
41
  {
42
- ...m,
43
- className: i,
44
- onOpenChange: (p) => o.setOpen(p),
42
+ ...d,
43
+ className: u,
44
+ onOpenChange: (s) => o.setOpen(s),
45
45
  isOpen: o.isOpen,
46
- onChange: o.close
46
+ onChange: (s) => {
47
+ m && m(s), o.close();
48
+ }
47
49
  },
48
- /* @__PURE__ */ e.createElement(F, { isDisabled: r.isDisabled }),
49
- /* @__PURE__ */ e.createElement(u, { props: c }, l),
50
- /* @__PURE__ */ e.createElement(R, { className: n.fieldError }, s),
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
- E,
54
+ g,
53
55
  {
54
56
  placement: "bottom end",
55
57
  isDialogContent: !0,
56
58
  controller: o
57
59
  },
58
- /* @__PURE__ */ e.createElement(v, null)
60
+ /* @__PURE__ */ e.createElement(I, null)
59
61
  )
60
62
  );
61
63
  });
62
64
  export {
63
- J as DateRangePicker,
64
- J as default
65
+ K as DateRangePicker,
66
+ K as default
65
67
  };