@mittwald/flow-react-components 0.1.0-alpha.45 → 0.1.0-alpha.47

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.
Files changed (66) hide show
  1. package/dist/Avatar.js +22 -20
  2. package/dist/Button-IRdeGCc6.js +78 -0
  3. package/dist/Button.js +1 -1
  4. package/dist/Checkbox.js +9 -8
  5. package/dist/ClearPropsContext-CD1-9TZA.js +11 -0
  6. package/dist/ColumnLayout.js +17 -13
  7. package/dist/Content.js +9 -12
  8. package/dist/CopyButton.js +17 -17
  9. package/dist/FieldDescription.js +10 -10
  10. package/dist/FieldError-BFjashy7.js +21 -0
  11. package/dist/FieldError.js +1 -1
  12. package/dist/Header.js +8 -9
  13. package/dist/Heading.js +13 -12
  14. package/dist/{Icon-S-6j_Kl3.js → Icon-X0pOdlJY.js} +16 -16
  15. package/dist/Icon.js +1 -1
  16. package/dist/{IconCheck-1PRSXamm.js → IconCheck-BD6sGh4B.js} +1 -1
  17. package/dist/{IconChevronUp-_2GHUOdG.js → IconChevronUp-CyLNEJQy.js} +1 -1
  18. package/dist/{IconClose-D-8Y7fMZ.js → IconClose-mhahyKoS.js} +1 -1
  19. package/dist/{IconCopy-C1yg9WXZ.js → IconCopy-Bpp37OMK.js} +1 -1
  20. package/dist/{IconDanger-Dd6HnAx9.js → IconDanger-DH5QCYHj.js} +1 -1
  21. package/dist/{IconPlus-D0cizRQb.js → IconPlus-CnjtlT2f.js} +1 -1
  22. package/dist/{IconSucceeded-BvrlGH02.js → IconSucceeded-DQdtfEkv.js} +1 -1
  23. package/dist/{IconUnchecked-DuOQbrqC.js → IconUnchecked-BhOGDWAq.js} +1 -1
  24. package/dist/{IconWarning-h9MeCuZE.js → IconWarning-D7qa4Hmz.js} +1 -1
  25. package/dist/Icons.js +10 -10
  26. package/dist/Image.js +8 -5
  27. package/dist/Initials.js +11 -11
  28. package/dist/InlineAlert.js +15 -14
  29. package/dist/InlineCode-DZzyKdCm.js +17 -0
  30. package/dist/InlineCode.js +1 -1
  31. package/dist/Label-DIeeRQZQ.js +25 -0
  32. package/dist/Label.js +1 -1
  33. package/dist/LabeledValue.js +9 -7
  34. package/dist/LayoutCard.js +10 -11
  35. package/dist/Link.js +16 -16
  36. package/dist/List.js +7 -7
  37. package/dist/Navigation.js +8 -7
  38. package/dist/NumberField.js +21 -19
  39. package/dist/PropsContextProvider-B6QiUIPM.js +28 -0
  40. package/dist/RadioGroup.js +15 -14
  41. package/dist/Section.js +22 -12
  42. package/dist/StatusBadge.js +21 -13
  43. package/dist/StatusIcon-VLj9j54q.js +39 -0
  44. package/dist/StatusIcon.js +1 -1
  45. package/dist/Switch.js +23 -18
  46. package/dist/Text-BAkan-um.js +27 -0
  47. package/dist/Text.js +1 -1
  48. package/dist/TextArea.js +13 -9
  49. package/dist/TextField.js +14 -10
  50. package/dist/TextFieldBase-_wFIsQyH.js +30 -0
  51. package/dist/nextjs/LinkProvider.js +11 -10
  52. package/dist/propsContext-Dx7WKmmM.js +7 -0
  53. package/dist/styles.css +1 -1
  54. package/dist/types/components/propTypes/index.d.ts +5 -1
  55. package/dist/types/lib/propsContext/propsContext.d.ts +2 -0
  56. package/dist/types/lib/react/getPropsMerger.d.ts +6 -0
  57. package/dist/{useProps-d5Do2me4.js → useProps-4x7PxhiE.js} +13 -10
  58. package/package.json +2 -2
  59. package/dist/Button-FPl3fKiM.js +0 -77
  60. package/dist/FieldError-BK5ho6N9.js +0 -21
  61. package/dist/InlineCode-CVs3jCiw.js +0 -13
  62. package/dist/Label-B8RjhN8C.js +0 -25
  63. package/dist/PropsContextProvider-C7Evvjhy.js +0 -43
  64. package/dist/StatusIcon-ab4wFrRb.js +0 -38
  65. package/dist/Text-B5YK5s7t.js +0 -26
  66. package/dist/TextFieldBase-DSF3g83M.js +0 -28
package/dist/Avatar.js CHANGED
@@ -1,16 +1,18 @@
1
1
  "use client"
2
2
  /* */
3
- import o, { isValidElement as l } from "react";
4
- import v from "clsx";
5
- import { P as c } from "./PropsContextProvider-C7Evvjhy.js";
3
+ import i, { isValidElement as l } from "react";
4
+ import m from "clsx";
5
+ import { C as p } from "./ClearPropsContext-CD1-9TZA.js";
6
+ import { P as v } from "./PropsContextProvider-B6QiUIPM.js";
6
7
  import "@react-aria/utils";
8
+ import "./propsContext-Dx7WKmmM.js";
7
9
  import "remeda";
8
- import { hash as m } from "object-code";
9
- import { deepForEach as p } from "react-children-utilities";
10
- const f = "flow--avatar", w = "flow--avatar--icon", z = "flow--avatar--initials", r = {
11
- avatar: f,
12
- icon: w,
13
- initials: z,
10
+ import { hash as c } from "object-code";
11
+ import { deepForEach as f } from "react-children-utilities";
12
+ const w = "flow--avatar", z = "flow--avatar--icon", d = "flow--avatar--initials", r = {
13
+ avatar: w,
14
+ icon: z,
15
+ initials: d,
14
16
  "size-m": "flow--avatar--size-m",
15
17
  "size-xs": "flow--avatar--size-xs",
16
18
  "size-s": "flow--avatar--size-s",
@@ -19,22 +21,22 @@ const f = "flow--avatar", w = "flow--avatar--icon", z = "flow--avatar--initials"
19
21
  "variant-2": "flow--avatar--variant-2",
20
22
  "variant-3": "flow--avatar--variant-3",
21
23
  "variant-4": "flow--avatar--variant-4"
22
- }, d = (s) => {
24
+ }, h = (o) => {
23
25
  const a = [];
24
- p(s, (t) => {
26
+ f(o, (t) => {
25
27
  l(t) ? a.push({
26
28
  props: t.props,
27
29
  type: t.type
28
30
  }) : a.push(t);
29
31
  });
30
- const i = m(a);
31
- return Math.abs(i % 4) + 1;
32
- }, P = (s) => {
33
- const { children: a, className: i, size: t = "m" } = s, e = v(
32
+ const s = c(a);
33
+ return Math.abs(s % 4) + 1;
34
+ }, F = (o) => {
35
+ const { children: a, className: s, size: t = "m" } = o, e = m(
34
36
  r.avatar,
35
37
  r[`size-${t}`],
36
- i,
37
- r[`variant-${d(a)}`]
38
+ s,
39
+ r[`variant-${h(a)}`]
38
40
  ), n = {
39
41
  Initials: {
40
42
  className: r.initials
@@ -43,9 +45,9 @@ const f = "flow--avatar", w = "flow--avatar--icon", z = "flow--avatar--initials"
43
45
  className: r.icon
44
46
  }
45
47
  };
46
- return /* @__PURE__ */ o.createElement("div", { className: e }, /* @__PURE__ */ o.createElement(c, { props: n }, a));
48
+ return /* @__PURE__ */ i.createElement(p, null, /* @__PURE__ */ i.createElement("div", { className: e }, /* @__PURE__ */ i.createElement(v, { props: n }, a)));
47
49
  };
48
50
  export {
49
- P as Avatar,
50
- P as default
51
+ F as Avatar,
52
+ F as default
51
53
  };
@@ -0,0 +1,78 @@
1
+ "use client"
2
+ /* */
3
+ import o from "react";
4
+ import * as P from "react-aria-components";
5
+ import y from "clsx";
6
+ import { C as I } from "./ClearPropsContext-CD1-9TZA.js";
7
+ import { P as C } from "./PropsContextProvider-B6QiUIPM.js";
8
+ import { u as E } from "./useProps-4x7PxhiE.js";
9
+ import "@tabler/icons-react";
10
+ import "./Icon-X0pOdlJY.js";
11
+ import "html-react-parser";
12
+ import { b as N, I as S, a as F } from "./IconSucceeded-DQdtfEkv.js";
13
+ import { T as h } from "./Text-BAkan-um.js";
14
+ const z = "flow--button", B = "flow--button--icon", v = "flow--button--text", T = "flow--button--content", D = "flow--button--state-icon", A = "flow--button--is-succeeded", R = "flow--button--is-failed", W = "flow--button--is-pending", _ = "flow--button--plain", $ = "flow--button--primary", j = "flow--button--solid", k = "flow--button--accent", q = "flow--button--danger", G = "flow--button--secondary", H = "flow--button--soft", t = {
15
+ button: z,
16
+ icon: B,
17
+ text: v,
18
+ content: T,
19
+ stateIcon: D,
20
+ "size-s": "flow--button--size-s",
21
+ isSucceeded: A,
22
+ isFailed: R,
23
+ isPending: W,
24
+ plain: _,
25
+ primary: $,
26
+ solid: j,
27
+ accent: k,
28
+ danger: q,
29
+ secondary: G,
30
+ soft: H
31
+ }, u = (n) => {
32
+ const { if: s, children: e } = n;
33
+ return s ? e : e.props.children;
34
+ }, Z = (n) => {
35
+ const {
36
+ variant: s = "primary",
37
+ style: e = "solid",
38
+ children: l,
39
+ className: f,
40
+ size: c = "m",
41
+ isPending: i,
42
+ isDisabled: p,
43
+ isSucceeded: a,
44
+ isFailed: r,
45
+ ...b
46
+ } = E("Button", n), w = y(
47
+ t.button,
48
+ i && t.isPending,
49
+ a && t.isSucceeded,
50
+ r && t.isFailed,
51
+ t[`size-${c}`],
52
+ t[s],
53
+ t[e],
54
+ f
55
+ ), g = {
56
+ Icon: {
57
+ className: t.icon,
58
+ "aria-hidden": !0,
59
+ size: c
60
+ },
61
+ Text: {
62
+ className: t.text
63
+ }
64
+ }, d = a ? N : r ? S : i ? F : void 0, m = d && /* @__PURE__ */ o.createElement(d, { size: c, className: t.stateIcon }), x = typeof l == "string";
65
+ return /* @__PURE__ */ o.createElement(I, null, /* @__PURE__ */ o.createElement(
66
+ P.Button,
67
+ {
68
+ className: w,
69
+ isDisabled: p || i || a || r,
70
+ ...b
71
+ },
72
+ /* @__PURE__ */ o.createElement(u, { if: m }, /* @__PURE__ */ o.createElement("span", { className: t.content }, /* @__PURE__ */ o.createElement(u, { if: x }, /* @__PURE__ */ o.createElement(h, null, /* @__PURE__ */ o.createElement(C, { props: g }, l))))),
73
+ m
74
+ ));
75
+ };
76
+ export {
77
+ Z as B
78
+ };
package/dist/Button.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { B as o } from "./Button-FPl3fKiM.js";
3
+ import { B as o } from "./Button-IRdeGCc6.js";
4
4
  export {
5
5
  o as Button,
6
6
  o as default
package/dist/Checkbox.js CHANGED
@@ -4,19 +4,20 @@ import e from "react";
4
4
  import * as l from "react-aria-components";
5
5
  import n from "clsx";
6
6
  import "@tabler/icons-react";
7
- import "./Icon-S-6j_Kl3.js";
7
+ import "./Icon-X0pOdlJY.js";
8
8
  import "html-react-parser";
9
- import "./PropsContextProvider-C7Evvjhy.js";
9
+ import { C as i } from "./ClearPropsContext-CD1-9TZA.js";
10
+ import "./propsContext-Dx7WKmmM.js";
10
11
  import "@react-aria/utils";
11
12
  import "remeda";
12
- import { I as i, a as k } from "./IconUnchecked-DuOQbrqC.js";
13
+ import { I as p, a as k } from "./IconUnchecked-BhOGDWAq.js";
13
14
  const h = "flow--checkbox", c = {
14
15
  checkbox: h
15
- }, I = (o) => {
16
- const { children: t, className: r, ...m } = o, a = n(c.checkbox, r);
17
- return /* @__PURE__ */ e.createElement(l.Checkbox, { ...m, className: a }, ({ isSelected: s }) => /* @__PURE__ */ e.createElement(e.Fragment, null, s ? /* @__PURE__ */ e.createElement(i, { className: c.checkmark }) : /* @__PURE__ */ e.createElement(k, { className: c.checkmark }), t));
16
+ }, w = (t) => {
17
+ const { children: o, className: r, ...m } = t, a = n(c.checkbox, r);
18
+ return /* @__PURE__ */ e.createElement(i, null, /* @__PURE__ */ e.createElement(l.Checkbox, { ...m, className: a }, ({ isSelected: s }) => /* @__PURE__ */ e.createElement(e.Fragment, null, s ? /* @__PURE__ */ e.createElement(p, { className: c.checkmark }) : /* @__PURE__ */ e.createElement(k, { className: c.checkmark }), o)));
18
19
  };
19
20
  export {
20
- I as Checkbox,
21
- I as default
21
+ w as Checkbox,
22
+ w as default
22
23
  };
@@ -0,0 +1,11 @@
1
+ "use client"
2
+ /* */
3
+ import t from "react";
4
+ import { p as o } from "./propsContext-Dx7WKmmM.js";
5
+ const a = (r) => {
6
+ const { children: e } = r;
7
+ return /* @__PURE__ */ t.createElement(o.Provider, { value: {} }, e);
8
+ };
9
+ export {
10
+ a as C
11
+ };
@@ -1,22 +1,26 @@
1
1
  "use client"
2
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)
3
+ import l from "react";
4
+ import { C as y } from "./ClearPropsContext-CD1-9TZA.js";
5
+ import "./propsContext-Dx7WKmmM.js";
6
+ import "@react-aria/utils";
7
+ import "remeda";
8
+ const f = "flow--column-layout--column-layout-container", p = "flow--column-layout", s = {
9
+ columnLayoutContainer: f,
10
+ columnLayout: p
11
+ }, u = (t) => {
12
+ if (t.length < 1)
9
13
  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 = {
14
+ return t.map((o) => `${o}fr`).join(" ");
15
+ }, E = (t) => {
16
+ const { children: c, s: o, m: n, l: m } = t, a = o ? u(o) : void 0, e = n ? u(n) : o ? a : void 0, r = m ? u(m) : n || o ? e : void 0, i = {
13
17
  "--column-layout--columns-s": a,
14
- "--column-layout--columns-m": m,
18
+ "--column-layout--columns-m": e,
15
19
  "--column-layout--columns-l": r
16
20
  };
17
- return /* @__PURE__ */ s.createElement("div", { className: e.columnLayoutContainer, style: y }, /* @__PURE__ */ s.createElement("div", { className: e.columnLayout }, u));
21
+ return /* @__PURE__ */ l.createElement(y, null, /* @__PURE__ */ l.createElement("div", { className: s.columnLayoutContainer, style: i }, /* @__PURE__ */ l.createElement("div", { className: s.columnLayout }, c)));
18
22
  };
19
23
  export {
20
- d as ColumnLayout,
21
- d as default
24
+ E as ColumnLayout,
25
+ E as default
22
26
  };
package/dist/Content.js CHANGED
@@ -1,17 +1,14 @@
1
1
  "use client"
2
2
  /* */
3
- import r from "react";
4
- import { p as l } from "./PropsContextProvider-C7Evvjhy.js";
5
- import "@react-aria/utils";
6
- import { u as m } from "./useProps-d5Do2me4.js";
7
- const c = (e) => {
8
- const { children: t } = e;
9
- return /* @__PURE__ */ r.createElement(l.Provider, { value: {} }, t);
10
- }, d = (e) => {
11
- const { children: t, elementType: n = "div", ...o } = m("Content", e), s = n;
12
- return /* @__PURE__ */ r.createElement(s, { ...o }, /* @__PURE__ */ r.createElement(c, null, t));
3
+ import e from "react";
4
+ import { C as s } from "./ClearPropsContext-CD1-9TZA.js";
5
+ import "./propsContext-Dx7WKmmM.js";
6
+ import { u as l } from "./useProps-4x7PxhiE.js";
7
+ const u = (t) => {
8
+ const { children: r, elementType: o = "div", ...n } = l("Content", t), m = o;
9
+ return /* @__PURE__ */ e.createElement(s, null, /* @__PURE__ */ e.createElement(m, { ...n }, r));
13
10
  };
14
11
  export {
15
- d as Content,
16
- d as default
12
+ u as Content,
13
+ u as default
17
14
  };
@@ -2,33 +2,33 @@
2
2
  /* */
3
3
  import o from "react";
4
4
  import n from "copy-to-clipboard";
5
- import { B as i } from "./Button-FPl3fKiM.js";
5
+ import { B as a } from "./Button-IRdeGCc6.js";
6
6
  import "@tabler/icons-react";
7
- import "./Icon-S-6j_Kl3.js";
7
+ import "./Icon-X0pOdlJY.js";
8
8
  import "clsx";
9
9
  import "html-react-parser";
10
- import "./PropsContextProvider-C7Evvjhy.js";
11
- import "@react-aria/utils";
12
- import { u as a } from "./useProps-d5Do2me4.js";
13
- import { I as c } from "./IconCopy-C1yg9WXZ.js";
14
- import { useLocalizedStringFormatter as l } from "react-aria";
15
- import { T as s } from "./Tooltip-Co5h9sSt.js";
16
- import { T as u } from "./TooltipTrigger-7-ynWHZ9.js";
17
- import { onlyText as y } from "react-children-utilities";
18
- const f = {
10
+ import { C as i } from "./ClearPropsContext-CD1-9TZA.js";
11
+ import "./propsContext-Dx7WKmmM.js";
12
+ import { u as l } from "./useProps-4x7PxhiE.js";
13
+ import { I as c } from "./IconCopy-Bpp37OMK.js";
14
+ import { useLocalizedStringFormatter as s } from "react-aria";
15
+ import { T as u } from "./Tooltip-Co5h9sSt.js";
16
+ import { T as y } from "./TooltipTrigger-7-ynWHZ9.js";
17
+ import { onlyText as f } from "react-children-utilities";
18
+ const B = {
19
19
  "de-DE": {
20
20
  "copyButton.copy": "Kopieren"
21
21
  },
22
22
  "en-EN": {
23
23
  "copyButton.copy": "Copy"
24
24
  }
25
- }, R = (r) => {
26
- const { text: e, ...p } = a("CopyButton", r), t = l(f).format("copyButton.copy"), m = () => {
27
- n(y(e));
25
+ }, S = (r) => {
26
+ const { text: e, ...p } = l("CopyButton", r), t = s(B).format("copyButton.copy"), m = () => {
27
+ n(f(e));
28
28
  };
29
- return /* @__PURE__ */ o.createElement(u, null, /* @__PURE__ */ o.createElement(i, { onPress: m, "aria-label": t, ...p }, /* @__PURE__ */ o.createElement(c, null)), /* @__PURE__ */ o.createElement(s, null, t));
29
+ return /* @__PURE__ */ o.createElement(i, null, /* @__PURE__ */ o.createElement(y, null, /* @__PURE__ */ o.createElement(a, { onPress: m, "aria-label": t, ...p }, /* @__PURE__ */ o.createElement(c, null)), /* @__PURE__ */ o.createElement(u, null, t)));
30
30
  };
31
31
  export {
32
- R as CopyButton,
33
- R as default
32
+ S as CopyButton,
33
+ S as default
34
34
  };
@@ -1,16 +1,16 @@
1
1
  "use client"
2
2
  /* */
3
- import r from "react";
4
- import c from "clsx";
5
- import "./PropsContextProvider-C7Evvjhy.js";
6
- import "@react-aria/utils";
7
- import { u as l } from "./useProps-d5Do2me4.js";
8
- import { T as n } from "./Text-B5YK5s7t.js";
9
- const p = "flow--field-description", m = {
3
+ import e from "react";
4
+ import l from "clsx";
5
+ import { C as c } from "./ClearPropsContext-CD1-9TZA.js";
6
+ import "./propsContext-Dx7WKmmM.js";
7
+ import { u as n } from "./useProps-4x7PxhiE.js";
8
+ import { T as m } from "./Text-BAkan-um.js";
9
+ const p = "flow--field-description", a = {
10
10
  fieldDescription: p
11
- }, N = (e) => {
12
- const { children: t, className: o, ...s } = l("FieldDescription", e), i = c(m.fieldDescription, o);
13
- return /* @__PURE__ */ r.createElement(n, { slot: "description", ...s, className: i }, t);
11
+ }, N = (t) => {
12
+ const { children: o, className: s, ...r } = n("FieldDescription", t), i = l(a.fieldDescription, s);
13
+ return /* @__PURE__ */ e.createElement(c, null, /* @__PURE__ */ e.createElement(m, { slot: "description", ...r, className: i }, o));
14
14
  };
15
15
  export {
16
16
  N as FieldDescription,
@@ -0,0 +1,21 @@
1
+ "use client"
2
+ /* */
3
+ import r from "react";
4
+ import * as a from "react-aria-components";
5
+ import i from "clsx";
6
+ import { C as n } from "./ClearPropsContext-CD1-9TZA.js";
7
+ import "./propsContext-Dx7WKmmM.js";
8
+ import { u as c } from "./useProps-4x7PxhiE.js";
9
+ import "@tabler/icons-react";
10
+ import "./Icon-X0pOdlJY.js";
11
+ import "html-react-parser";
12
+ import { I as p } from "./IconDanger-DH5QCYHj.js";
13
+ const f = "flow--field-error", E = {
14
+ fieldError: f
15
+ }, h = (o) => {
16
+ const { children: e, className: t, ...l } = c("FieldError", o), s = i(E.fieldError, t);
17
+ return /* @__PURE__ */ r.createElement(n, null, /* @__PURE__ */ r.createElement(a.FieldError, { ...l, className: s }, ({ validationErrors: m }) => /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(p, { size: "s" }), /* @__PURE__ */ r.createElement("span", null, e || m.join(" ")))));
18
+ };
19
+ export {
20
+ h as F
21
+ };
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { F as o } from "./FieldError-BK5ho6N9.js";
3
+ import { F as o } from "./FieldError-BFjashy7.js";
4
4
  export {
5
5
  o as FieldError,
6
6
  o as default
package/dist/Header.js CHANGED
@@ -1,18 +1,17 @@
1
1
  "use client"
2
2
  /* */
3
- import a from "react";
4
- import "./PropsContextProvider-C7Evvjhy.js";
5
- import "@react-aria/utils";
6
- import { u as n } from "./useProps-d5Do2me4.js";
7
- const i = (e) => {
3
+ import m from "react";
4
+ import "./propsContext-Dx7WKmmM.js";
5
+ import { u as n } from "./useProps-4x7PxhiE.js";
6
+ const d = (e) => {
8
7
  const {
9
8
  children: r,
10
9
  elementType: t = "header",
11
10
  ...o
12
- } = n("Header", e), m = t;
13
- return /* @__PURE__ */ a.createElement(m, { ...o }, r);
11
+ } = n("Header", e), a = t;
12
+ return /* @__PURE__ */ m.createElement(a, { ...o }, r);
14
13
  };
15
14
  export {
16
- i as Header,
17
- i as default
15
+ d as Header,
16
+ d as default
18
17
  };
package/dist/Heading.js CHANGED
@@ -2,27 +2,28 @@
2
2
  /* */
3
3
  import e from "react";
4
4
  import m from "clsx";
5
- import { P as d } from "./PropsContextProvider-C7Evvjhy.js";
6
- import { u as p } from "./useProps-d5Do2me4.js";
7
- const h = "flow--heading", f = "flow--heading--icon", o = {
5
+ import { C as p } from "./ClearPropsContext-CD1-9TZA.js";
6
+ import { P as d } from "./PropsContextProvider-B6QiUIPM.js";
7
+ import { u as f } from "./useProps-4x7PxhiE.js";
8
+ const h = "flow--heading", g = "flow--heading--icon", o = {
8
9
  heading: h,
9
- icon: f
10
- }, P = (s) => {
10
+ icon: g
11
+ }, N = (t) => {
11
12
  const {
12
- children: t,
13
+ children: s,
13
14
  className: n,
14
- level: a = 2,
15
- ...r
16
- } = p("Heading", s), c = m(o.heading, n), i = `h${a}`, l = {
15
+ level: r = 2,
16
+ ...a
17
+ } = f("Heading", t), c = m(o.heading, n), i = `h${r}`, l = {
17
18
  Icon: {
18
19
  "aria-hidden": !0,
19
20
  size: "s",
20
21
  className: o.icon
21
22
  }
22
23
  };
23
- return /* @__PURE__ */ e.createElement(i, { className: c, ...r }, /* @__PURE__ */ e.createElement(d, { props: l }, t));
24
+ return /* @__PURE__ */ e.createElement(p, null, /* @__PURE__ */ e.createElement(i, { className: c, ...a }, /* @__PURE__ */ e.createElement(d, { props: l }, s)));
24
25
  };
25
26
  export {
26
- P as Heading,
27
- P as default
27
+ N as Heading,
28
+ N as default
28
29
  };
@@ -1,49 +1,49 @@
1
1
  "use client"
2
2
  /* */
3
- import s, { Children as f, useMemo as p } from "react";
3
+ import i, { Children as f, useMemo as p } from "react";
4
4
  import g from "clsx";
5
5
  import d from "html-react-parser";
6
- import "./PropsContextProvider-C7Evvjhy.js";
7
- import "@react-aria/utils";
8
- import { u } from "./useProps-d5Do2me4.js";
9
- const w = "flow--icon", c = {
10
- icon: w,
6
+ import { C as u } from "./ClearPropsContext-CD1-9TZA.js";
7
+ import "./propsContext-Dx7WKmmM.js";
8
+ import { u as w } from "./useProps-4x7PxhiE.js";
9
+ const z = "flow--icon", c = {
10
+ icon: z,
11
11
  "size-m": "flow--icon--size-m",
12
12
  "size-s": "flow--icon--size-s",
13
13
  "size-l": "flow--icon--size-l"
14
- }, z = (e) => {
14
+ }, b = (e) => {
15
15
  const t = f.toArray(d(e)).find(
16
16
  (o) => typeof o == "object" && "type" in o && o.type === "svg"
17
17
  );
18
18
  if (!t)
19
19
  throw new Error(`Invalid SVG string (got ${String(e)})`);
20
20
  return t;
21
- }, I = (e) => {
21
+ }, C = (e) => {
22
22
  const {
23
23
  className: t,
24
24
  "aria-label": o,
25
- children: i,
25
+ children: r,
26
26
  size: l = "m",
27
27
  ...a
28
- } = u("Icon", e), m = {
28
+ } = w("Icon", e), m = {
29
29
  ...a,
30
30
  focusable: "false",
31
31
  role: "img",
32
32
  "aria-hidden": !o,
33
33
  "aria-label": o,
34
34
  className: g(c.icon, t, c[`size-${l}`])
35
- }, r = typeof i == "string", n = p(
36
- () => r ? z(i) : i,
37
- [r, i]
35
+ }, s = typeof r == "string", n = p(
36
+ () => s ? b(r) : r,
37
+ [s, r]
38
38
  );
39
- if (!s.isValidElement(n))
39
+ if (!i.isValidElement(n))
40
40
  throw new Error(
41
41
  `Expected children of Icon component to be a valid React element (got ${String(
42
42
  n
43
43
  )})`
44
44
  );
45
- return s.cloneElement(n, m);
45
+ return /* @__PURE__ */ i.createElement(u, null, i.cloneElement(n, m));
46
46
  };
47
47
  export {
48
- I
48
+ C as I
49
49
  };
package/dist/Icon.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { I as a } from "./Icon-S-6j_Kl3.js";
3
+ import { I as a } from "./Icon-X0pOdlJY.js";
4
4
  export {
5
5
  a as Icon,
6
6
  a as default
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  import e from "react";
4
4
  import { IconCheck as c } from "@tabler/icons-react";
5
- import { I as t } from "./Icon-S-6j_Kl3.js";
5
+ import { I as t } from "./Icon-X0pOdlJY.js";
6
6
  const a = (o) => /* @__PURE__ */ e.createElement(t, { ...o }, /* @__PURE__ */ e.createElement(c, null));
7
7
  export {
8
8
  a as I
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  import o from "react";
4
4
  import { IconChevronDown as r, IconChevronUp as t } from "@tabler/icons-react";
5
- import { I as n } from "./Icon-S-6j_Kl3.js";
5
+ import { I as n } from "./Icon-X0pOdlJY.js";
6
6
  const I = (e) => /* @__PURE__ */ o.createElement(n, { ...e }, /* @__PURE__ */ o.createElement(r, null)), l = (e) => /* @__PURE__ */ o.createElement(n, { ...e }, /* @__PURE__ */ o.createElement(t, null));
7
7
  export {
8
8
  I,
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  import o from "react";
4
4
  import { IconX as t } from "@tabler/icons-react";
5
- import { I as r } from "./Icon-S-6j_Kl3.js";
5
+ import { I as r } from "./Icon-X0pOdlJY.js";
6
6
  const a = (e) => /* @__PURE__ */ o.createElement(r, { ...e }, /* @__PURE__ */ o.createElement(t, null));
7
7
  export {
8
8
  a as I
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  import o from "react";
4
4
  import { IconCopy as t } from "@tabler/icons-react";
5
- import { I as r } from "./Icon-S-6j_Kl3.js";
5
+ import { I as r } from "./Icon-X0pOdlJY.js";
6
6
  const p = (e) => /* @__PURE__ */ o.createElement(r, { ...e }, /* @__PURE__ */ o.createElement(t, null));
7
7
  export {
8
8
  p as I
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  import e from "react";
4
4
  import { IconAlertTriangle as o } from "@tabler/icons-react";
5
- import { I as t } from "./Icon-S-6j_Kl3.js";
5
+ import { I as t } from "./Icon-X0pOdlJY.js";
6
6
  const c = (r) => /* @__PURE__ */ e.createElement(t, { ...r }, /* @__PURE__ */ e.createElement(o, null));
7
7
  export {
8
8
  c as I
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  import e from "react";
4
4
  import { IconMinus as t, IconPlus as c } from "@tabler/icons-react";
5
- import { I as o } from "./Icon-S-6j_Kl3.js";
5
+ import { I as o } from "./Icon-X0pOdlJY.js";
6
6
  const r = (n) => /* @__PURE__ */ e.createElement(o, { ...n }, /* @__PURE__ */ e.createElement(t, null)), m = (n) => /* @__PURE__ */ e.createElement(o, { ...n }, /* @__PURE__ */ e.createElement(c, null));
7
7
  export {
8
8
  r as I,
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  import e from "react";
4
4
  import { IconX as t, IconLoader2 as o, IconCheck as a } from "@tabler/icons-react";
5
- import { I as c } from "./Icon-S-6j_Kl3.js";
5
+ import { I as c } from "./Icon-X0pOdlJY.js";
6
6
  const I = (n) => /* @__PURE__ */ e.createElement(c, { ...n }, /* @__PURE__ */ e.createElement(t, null)), s = (n) => /* @__PURE__ */ e.createElement(c, { ...n }, /* @__PURE__ */ e.createElement(o, null)), E = (n) => /* @__PURE__ */ e.createElement(c, { ...n }, /* @__PURE__ */ e.createElement(a, null));
7
7
  export {
8
8
  I,
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  import e from "react";
4
4
  import { IconSquareCheck as n, IconSquare as o } from "@tabler/icons-react";
5
- import { I as t } from "./Icon-S-6j_Kl3.js";
5
+ import { I as t } from "./Icon-X0pOdlJY.js";
6
6
  const l = (c) => /* @__PURE__ */ e.createElement(t, { ...c }, /* @__PURE__ */ e.createElement(n, null)), I = (c) => /* @__PURE__ */ e.createElement(t, { ...c }, /* @__PURE__ */ e.createElement(o, null));
7
7
  export {
8
8
  l as I,
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  import e from "react";
4
4
  import { IconInfoCircle as t, IconCircleCheck as o, IconAlertCircle as r } from "@tabler/icons-react";
5
- import { I as n } from "./Icon-S-6j_Kl3.js";
5
+ import { I as n } from "./Icon-X0pOdlJY.js";
6
6
  const I = (c) => /* @__PURE__ */ e.createElement(n, { ...c }, /* @__PURE__ */ e.createElement(t, null)), s = (c) => /* @__PURE__ */ e.createElement(n, { ...c }, /* @__PURE__ */ e.createElement(o, null)), i = (c) => /* @__PURE__ */ e.createElement(n, { ...c }, /* @__PURE__ */ e.createElement(r, null));
7
7
  export {
8
8
  I,