@mittwald/flow-react-components 0.1.0-alpha.26 → 0.1.0-alpha.28

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,14 @@
1
+ import { FC } from 'react';
2
+ import { PropsWithChildren } from 'react';
3
+
4
+ declare const ColumnLayout: FC<ColumnLayoutProps>;
5
+ export { ColumnLayout }
6
+ export default ColumnLayout;
7
+
8
+ export declare interface ColumnLayoutProps extends PropsWithChildren {
9
+ s?: number[];
10
+ m?: number[];
11
+ l?: number[];
12
+ }
13
+
14
+ export { }
@@ -0,0 +1,22 @@
1
+ "use client"
2
+ /* */
3
+ import s from "react";
4
+ const i = "flow--column-layout--column-layout-container", f = "flow--column-layout", e = {
5
+ columnLayoutContainer: i,
6
+ columnLayout: f
7
+ }, l = (n) => {
8
+ if (n.length < 1)
9
+ throw new Error("Column layout array is empty");
10
+ return n.map((o) => `${o}fr`).join(" ");
11
+ }, d = (n) => {
12
+ const { children: u, s: o, m: t, l: c } = n, a = o ? l(o) : void 0, m = t ? l(t) : o ? a : void 0, r = c ? l(c) : t || o ? m : void 0, y = {
13
+ "--column-layout--columns-s": a,
14
+ "--column-layout--columns-m": m,
15
+ "--column-layout--columns-l": r
16
+ };
17
+ return /* @__PURE__ */ s.createElement("div", { className: e.columnLayoutContainer, style: y }, /* @__PURE__ */ s.createElement("div", { className: e.columnLayout }, u));
18
+ };
19
+ export {
20
+ d as ColumnLayout,
21
+ d as default
22
+ };
@@ -0,0 +1,9 @@
1
+ "use client"
2
+ /* */
3
+ import o from "react";
4
+ import { IconX as t } from "@tabler/icons-react";
5
+ import { I as r } from "./Icon-C8UD3vMe.js";
6
+ const a = (e) => /* @__PURE__ */ o.createElement(r, { ...e }, /* @__PURE__ */ o.createElement(t, null));
7
+ export {
8
+ a as I
9
+ };
package/dist/Icons.js CHANGED
@@ -1,64 +1,65 @@
1
1
  "use client"
2
2
  /* */
3
3
  import e from "react";
4
- import { IconAppWindow as o, IconArrowLeft as l, IconClock as c, IconChevronLeft as a, IconChevronRight as r, IconX as I, IconCalendarCheck as m, IconBuilding as s, IconLayoutBoard as E, IconDatabase as u, IconCalendar as i, IconTrash as h, IconWorld as p, IconMail as C, IconExternalLink as d, IconFilter as S, IconEyeCancel as f, IconHome as L, IconList as g, IconPower as v, IconUsersGroup as k, IconBell as D, IconArchive as x, IconDice3 as b, IconSearch as $, IconListSearch as w, IconServer as H, IconSettings as y, IconEye as A, IconAdjustmentsHorizontal as B, IconDoor as F, IconHeadset as R, IconFileX as P, IconLayoutGrid as T } from "@tabler/icons-react";
4
+ import { IconAppWindow as o, IconArrowLeft as l, IconClock as c, IconChevronLeft as a, IconChevronRight as r, IconCalendarCheck as I, IconBuilding as m, IconLayoutBoard as s, IconDatabase as E, IconCalendar as u, IconTrash as i, IconWorld as h, IconMail as p, IconExternalLink as C, IconFilter as d, IconEyeCancel as S, IconHome as f, IconList as L, IconPower as g, IconUsersGroup as v, IconBell as k, IconArchive as x, IconDice3 as D, IconSearch as b, IconListSearch as $, IconServer as w, IconSettings as H, IconEye as y, IconAdjustmentsHorizontal as A, IconDoor as B, IconHeadset as F, IconFileX as R, IconLayoutGrid as P } from "@tabler/icons-react";
5
5
  import { I as t } from "./Icon-C8UD3vMe.js";
6
- import { I as ke } from "./IconCheck-QwbBte1y.js";
7
- import { I as xe, a as be } from "./IconUnchecked-CGdUugGS.js";
8
- import { I as we, a as He, b as ye, c as Ae } from "./IconPlus-DsWkdGaB.js";
6
+ import { I as ge } from "./IconCheck-QwbBte1y.js";
7
+ import { I as ke, a as xe } from "./IconUnchecked-CGdUugGS.js";
8
+ import { I as be, a as $e, b as we, c as He } from "./IconPlus-DsWkdGaB.js";
9
+ import { I as Ae } from "./IconClose-CA5yuJQ6.js";
9
10
  import { I as Fe } from "./IconCopy-C-PQMIfL.js";
10
11
  import { I as Pe, a as Te, b as je, c as Me } from "./IconWarning-Cum5bpEx.js";
11
12
  import { I as We, a as Ge, b as Ve } from "./IconSucceeded-aGBloDn9.js";
12
- const W = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(o, null)), G = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(l, null)), V = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(c, null)), X = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(a, null)), z = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(r, null)), N = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(I, null)), q = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(m, null)), J = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(s, null)), K = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(E, null)), O = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(u, null)), Q = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(i, null)), Y = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(h, null)), Z = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(p, null)), _ = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(C, null)), ee = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(d, null)), ne = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(S, null)), te = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(f, null)), ce = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(L, null)), oe = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(g, null)), le = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(v, null)), ae = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(k, null)), re = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(D, null)), Ie = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(x, null)), me = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(b, null)), se = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement($, null)), Ee = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(w, null)), ue = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(H, null)), ie = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(y, null)), he = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(A, null)), pe = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(B, null)), Ce = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(F, null)), de = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(R, null)), Se = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(P, null)), fe = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(T, null)), Le = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(c, null));
13
+ const U = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(o, null)), W = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(l, null)), G = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(c, null)), V = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(a, null)), z = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(r, null)), N = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(I, null)), X = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(m, null)), q = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(s, null)), J = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(E, null)), K = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(u, null)), O = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(i, null)), Q = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(h, null)), Y = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(p, null)), Z = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(C, null)), _ = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(d, null)), ee = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(S, null)), ne = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(f, null)), te = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(L, null)), ce = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(g, null)), oe = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(v, null)), le = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(k, null)), ae = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(x, null)), re = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(D, null)), Ie = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(b, null)), me = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement($, null)), se = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(w, null)), Ee = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(H, null)), ue = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(y, null)), ie = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(A, null)), he = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(B, null)), pe = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(F, null)), Ce = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(R, null)), de = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(P, null)), Se = (n) => /* @__PURE__ */ e.createElement(t, { ...n }, /* @__PURE__ */ e.createElement(c, null));
13
14
  export {
14
- W as IconApp,
15
- G as IconBackLink,
16
- V as IconBackup,
17
- ke as IconCheck,
18
- xe as IconChecked,
19
- we as IconChevronDown,
20
- X as IconChevronLeft,
15
+ U as IconApp,
16
+ W as IconBackLink,
17
+ G as IconBackup,
18
+ ge as IconCheck,
19
+ ke as IconChecked,
20
+ be as IconChevronDown,
21
+ V as IconChevronLeft,
21
22
  z as IconChevronRight,
22
- He as IconChevronUp,
23
- N as IconClose,
23
+ $e as IconChevronUp,
24
+ Ae as IconClose,
24
25
  Fe as IconCopy,
25
- q as IconCronjob,
26
- J as IconCustomer,
26
+ N as IconCronjob,
27
+ X as IconCustomer,
27
28
  Pe as IconDanger,
28
- K as IconDashboard,
29
- O as IconDatabase,
30
- Q as IconDate,
31
- Y as IconDelete,
32
- Z as IconDomain,
33
- _ as IconEmail,
34
- ee as IconExternalLink,
29
+ q as IconDashboard,
30
+ J as IconDatabase,
31
+ K as IconDate,
32
+ O as IconDelete,
33
+ Q as IconDomain,
34
+ Y as IconEmail,
35
+ Z as IconExternalLink,
35
36
  We as IconFailed,
36
- ne as IconFilter,
37
- te as IconHide,
38
- ce as IconHome,
37
+ _ as IconFilter,
38
+ ee as IconHide,
39
+ ne as IconHome,
39
40
  Te as IconInfo,
40
- oe as IconListView,
41
- le as IconLogout,
42
- ae as IconMember,
43
- ye as IconMinus,
44
- re as IconNotification,
41
+ te as IconListView,
42
+ ce as IconLogout,
43
+ oe as IconMember,
44
+ we as IconMinus,
45
+ le as IconNotification,
45
46
  Ge as IconPending,
46
- Ae as IconPlus,
47
- Ie as IconProject,
48
- me as IconRandom,
49
- se as IconSearch,
50
- Ee as IconSearchEngine,
51
- ue as IconServer,
52
- ie as IconSettings,
53
- he as IconShow,
54
- pe as IconSorting,
55
- Ce as IconSshSftp,
47
+ He as IconPlus,
48
+ ae as IconProject,
49
+ re as IconRandom,
50
+ Ie as IconSearch,
51
+ me as IconSearchEngine,
52
+ se as IconServer,
53
+ Ee as IconSettings,
54
+ ue as IconShow,
55
+ ie as IconSorting,
56
+ he as IconSshSftp,
56
57
  Ve as IconSucceeded,
57
58
  je as IconSuccess,
58
- de as IconSupport,
59
- Se as IconTerminate,
60
- fe as IconTileView,
61
- Le as IconTime,
62
- be as IconUnchecked,
59
+ pe as IconSupport,
60
+ Ce as IconTerminate,
61
+ de as IconTileView,
62
+ Se as IconTime,
63
+ xe as IconUnchecked,
63
64
  Me as IconWarning
64
65
  };
@@ -0,0 +1,25 @@
1
+ "use client"
2
+ /* */
3
+ import i from "react";
4
+ import * as m from "react-aria-components";
5
+ import { c } from "./clsx-DB4S2d7J.js";
6
+ import "./propsContext-Dx7WKmmM.js";
7
+ import "@react-aria/utils";
8
+ import { u as p } from "./useProps-C7GIMcgB.js";
9
+ import { useLocalizedStringFormatter as b } from "react-aria";
10
+ const f = "flow--label", L = {
11
+ label: f
12
+ }, u = {
13
+ "de-DE": {
14
+ "label.optional": "(optional)"
15
+ },
16
+ "en-EN": {
17
+ "label.optional": "(optional)"
18
+ }
19
+ }, h = (o) => {
20
+ const { children: t, className: a, optional: l, ...e } = p("Label", o), r = b(u), s = c(L.label, a), n = " " + r.format("label.optional");
21
+ return /* @__PURE__ */ i.createElement(m.Label, { ...e, className: s }, t, l && n);
22
+ };
23
+ export {
24
+ h as L
25
+ };
package/dist/Label.js CHANGED
@@ -1,26 +1,7 @@
1
1
  "use client"
2
2
  /* */
3
- import i from "react";
4
- import * as m from "react-aria-components";
5
- import { c } from "./clsx-DB4S2d7J.js";
6
- import "./propsContext-Dx7WKmmM.js";
7
- import "@react-aria/utils";
8
- import { u as p } from "./useProps-C7GIMcgB.js";
9
- import { useLocalizedStringFormatter as b } from "react-aria";
10
- const f = "flow--label", u = {
11
- label: f
12
- }, d = {
13
- "de-DE": {
14
- "label.optional": "(optional)"
15
- },
16
- "en-EN": {
17
- "label.optional": "(optional)"
18
- }
19
- }, h = (o) => {
20
- const { children: t, className: a, optional: l, ...e } = p("Label", o), r = b(d), s = c(u.label, a), n = " " + r.format("label.optional");
21
- return /* @__PURE__ */ i.createElement(m.Label, { ...e, className: s }, t, l && n);
22
- };
3
+ import { L as e } from "./Label-Dnum8jdD.js";
23
4
  export {
24
- h as Label,
25
- h as default
5
+ e as Label,
6
+ e as default
26
7
  };
package/dist/Switch.d.ts CHANGED
@@ -9,8 +9,6 @@ export default Switch;
9
9
  export declare interface SwitchProps extends PropsWithChildren<Omit<Aria.SwitchProps, "children">> {
10
10
  /** @default "trailing" */
11
11
  labelPosition?: "leading" | "trailing";
12
- /** @default "success" */
13
- variant?: "success" | "danger";
14
12
  }
15
13
 
16
14
  export { }
package/dist/Switch.js CHANGED
@@ -1,30 +1,31 @@
1
1
  "use client"
2
2
  /* */
3
- import c from "react";
4
- import * as n from "react-aria-components";
5
- import { c as w } from "./clsx-DB4S2d7J.js";
6
- const d = "flow--switch--indicator", m = "flow--switch--success", h = "flow--switch--danger", s = {
3
+ import e from "react";
4
+ import * as m from "react-aria-components";
5
+ import { c as n } from "./clsx-DB4S2d7J.js";
6
+ import "@tabler/icons-react";
7
+ import "./Icon-C8UD3vMe.js";
8
+ import "html-react-parser";
9
+ import "./propsContext-Dx7WKmmM.js";
10
+ import "@react-aria/utils";
11
+ import { I as h } from "./IconCheck-QwbBte1y.js";
12
+ import { I as w } from "./IconClose-CA5yuJQ6.js";
13
+ import { L as f } from "./Label-Dnum8jdD.js";
14
+ const p = "flow--switch--track", d = "flow--switch--handle", b = "flow--switch--label", t = {
7
15
  switch: "flow--switch",
8
16
  "label-leading": "flow--switch--label-leading",
9
- indicator: d,
10
- success: m,
11
- danger: h
12
- }, u = (t) => {
13
- const {
14
- children: a,
15
- className: e,
16
- labelPosition: i = "trailing",
17
- variant: o = "success",
18
- ...l
19
- } = t, r = w(
20
- s.switch,
21
- s[`label-${i}`],
22
- s[o],
23
- e
17
+ track: p,
18
+ handle: d,
19
+ label: b
20
+ }, L = (a) => {
21
+ const { children: l, className: s, labelPosition: c = "trailing", ...o } = a, r = n(
22
+ t.switch,
23
+ t[`label-${c}`],
24
+ s
24
25
  );
25
- return /* @__PURE__ */ c.createElement(n.Switch, { ...l, className: r }, /* @__PURE__ */ c.createElement("div", { className: s.indicator }), a);
26
+ return /* @__PURE__ */ e.createElement(m.Switch, { ...o, className: r }, ({ isSelected: i }) => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: t.track }, /* @__PURE__ */ e.createElement("div", { className: t.handle }, i ? /* @__PURE__ */ e.createElement(h, { size: "s" }) : /* @__PURE__ */ e.createElement(w, { size: "s" }))), /* @__PURE__ */ e.createElement(f, { className: t.label }, l)));
26
27
  };
27
28
  export {
28
- u as Switch,
29
- u as default
29
+ L as Switch,
30
+ L as default
30
31
  };