@mittwald/flow-react-components 0.1.0-alpha.17 → 0.1.0-alpha.19

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/Badge.js CHANGED
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  import o from "react";
4
4
  import { c as l } from "./clsx-DB4S2d7J.js";
5
- import { S as i } from "./StatusIcon-B3kq3jOT.js";
5
+ import { S as i } from "./StatusIcon-BBNE68gH.js";
6
6
  import { T as d } from "./Text--ofl9X5e.js";
7
7
  import "./propsContext-Dx7WKmmM.js";
8
8
  import { P as f } from "./PropsContextProvider-CEoxD8yK.js";
@@ -16,18 +16,19 @@ const g = "flow--badge", u = "flow--badge--content", p = "flow--badge--custom-ic
16
16
  success: I,
17
17
  warning: x,
18
18
  danger: N
19
- }, h = (n) => {
19
+ }, S = (n) => {
20
20
  const { children: s, className: c, variant: e = "info", ...a } = n, r = l(t.badge, t[e], c), m = {
21
21
  Icon: {
22
- className: t.customIcon
22
+ className: t.customIcon,
23
+ size: "s"
23
24
  },
24
25
  Text: {
25
26
  className: t.content
26
27
  }
27
28
  };
28
- return /* @__PURE__ */ o.createElement("div", { className: r, ...a }, /* @__PURE__ */ o.createElement(i, { className: t.statusIcon, variant: e }), /* @__PURE__ */ o.createElement(f, { props: m }, typeof s == "string" ? /* @__PURE__ */ o.createElement(d, null, s) : s));
29
+ return /* @__PURE__ */ o.createElement("div", { className: r, ...a }, /* @__PURE__ */ o.createElement(i, { size: "s", className: t.statusIcon, variant: e }), /* @__PURE__ */ o.createElement(f, { props: m }, typeof s == "string" ? /* @__PURE__ */ o.createElement(d, null, s) : s));
29
30
  };
30
31
  export {
31
- h as Badge,
32
- h as default
32
+ S as Badge,
33
+ S as default
33
34
  };
@@ -0,0 +1,77 @@
1
+ "use client"
2
+ /* */
3
+ import o from "react";
4
+ import * as y from "react-aria-components";
5
+ import { c as I } from "./clsx-DB4S2d7J.js";
6
+ import "./propsContext-Dx7WKmmM.js";
7
+ import { P } from "./PropsContextProvider-CEoxD8yK.js";
8
+ import { u as E } from "./useProps-C7GIMcgB.js";
9
+ import "@tabler/icons-react";
10
+ import "./Icon-C8UD3vMe.js";
11
+ import "html-react-parser";
12
+ import { b as N, I as S, a as C } from "./IconSucceeded-aGBloDn9.js";
13
+ import { T as F } from "./Text--ofl9X5e.js";
14
+ const h = "flow--button", z = "flow--button--icon", B = "flow--button--content", v = "flow--button--state-icon", T = "flow--button--text", D = "flow--button--is-succeeded", A = "flow--button--is-failed", R = "flow--button--is-pending", W = "flow--button--plain", _ = "flow--button--primary", $ = "flow--button--solid", j = "flow--button--accent", k = "flow--button--danger", q = "flow--button--secondary", t = {
15
+ button: h,
16
+ icon: z,
17
+ content: B,
18
+ stateIcon: v,
19
+ text: T,
20
+ "size-s": "flow--button--size-s",
21
+ isSucceeded: D,
22
+ isFailed: A,
23
+ isPending: R,
24
+ plain: W,
25
+ primary: _,
26
+ solid: $,
27
+ accent: j,
28
+ danger: k,
29
+ secondary: q
30
+ }, u = (n) => {
31
+ const { if: s, children: e } = n;
32
+ return s ? e : e.props.children;
33
+ }, X = (n) => {
34
+ const {
35
+ variant: s = "primary",
36
+ style: e = "solid",
37
+ children: l,
38
+ className: p,
39
+ size: c = "m",
40
+ isPending: i,
41
+ isDisabled: f,
42
+ isSucceeded: a,
43
+ isFailed: r,
44
+ ...b
45
+ } = E("Button", n), w = I(
46
+ t.button,
47
+ i && t.isPending,
48
+ a && t.isSucceeded,
49
+ r && t.isFailed,
50
+ t[`size-${c}`],
51
+ t[s],
52
+ t[e],
53
+ p
54
+ ), g = {
55
+ Icon: {
56
+ className: t.icon,
57
+ "aria-hidden": !0,
58
+ size: c
59
+ },
60
+ Text: {
61
+ className: t.text
62
+ }
63
+ }, d = a ? N : r ? S : i ? C : void 0, m = d && /* @__PURE__ */ o.createElement(d, { size: c, className: t.stateIcon }), x = typeof l == "string";
64
+ return /* @__PURE__ */ o.createElement(
65
+ y.Button,
66
+ {
67
+ className: w,
68
+ isDisabled: f || i || a || r,
69
+ ...b
70
+ },
71
+ /* @__PURE__ */ o.createElement(P, { props: g }, /* @__PURE__ */ o.createElement(u, { if: m }, /* @__PURE__ */ o.createElement("span", { className: t.content }, /* @__PURE__ */ o.createElement(u, { if: x }, /* @__PURE__ */ o.createElement(F, null, l))))),
72
+ m
73
+ );
74
+ };
75
+ export {
76
+ X as B
77
+ };
package/dist/Button.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { B as o } from "./Button-D_qgEN7Z.js";
3
+ import { B as o } from "./Button-BH3d8Oz-.js";
4
4
  export {
5
5
  o as Button,
6
6
  o as default
package/dist/Checkbox.js CHANGED
@@ -1,71 +1,22 @@
1
1
  "use client"
2
2
  /* */
3
- import t from "react";
4
- import * as d from "react-aria-components";
5
- import { c as v } from "./clsx-DB4S2d7J.js";
6
- import { I as s } from "./Icon-Dp34FFi3.js";
7
- const k = "flow--checkbox", g = "flow--checkbox--checkmark", u = {
8
- checkbox: k,
9
- checkmark: g
10
- };
11
- var l = {}, o = {};
12
- (function(a) {
13
- Object.defineProperty(a, "__esModule", { value: !0 });
14
- var e = "far", i = "square-check", n = 448, h = 512, c = [9745, 9989, 61510, "check-square"], r = "f14a", f = "M64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H384c8.8 0 16-7.2 16-16V96c0-8.8-7.2-16-16-16H64zM0 96C0 60.7 28.7 32 64 32H384c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z";
15
- a.definition = {
16
- prefix: e,
17
- iconName: i,
18
- icon: [
19
- n,
20
- h,
21
- c,
22
- r,
23
- f
24
- ]
25
- }, a.faSquareCheck = a.definition, a.prefix = e, a.iconName = i, a.width = n, a.height = h, a.ligatures = c, a.unicode = r, a.svgPathData = f, a.aliases = c;
26
- })(o);
27
- (function(a) {
28
- Object.defineProperty(a, "__esModule", { value: !0 });
29
- var e = o;
30
- a.definition = {
31
- prefix: e.prefix,
32
- iconName: e.iconName,
33
- icon: [
34
- e.width,
35
- e.height,
36
- e.aliases,
37
- e.unicode,
38
- e.svgPathData
39
- ]
40
- }, a.faCheckSquare = a.definition, a.prefix = e.prefix, a.iconName = e.iconName, a.width = e.width, a.height = e.height, a.ligatures = e.aliases, a.unicode = e.unicode, a.svgPathData = e.svgPathData, a.aliases = e.aliases;
41
- })(l);
42
- var m = {};
43
- (function(a) {
44
- Object.defineProperty(a, "__esModule", { value: !0 });
45
- var e = "far", i = "square", n = 448, h = 512, c = [9632, 9723, 9724, 61590], r = "f0c8", f = "M384 80c8.8 0 16 7.2 16 16V416c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V96c0-8.8 7.2-16 16-16H384zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z";
46
- a.definition = {
47
- prefix: e,
48
- iconName: i,
49
- icon: [
50
- n,
51
- h,
52
- c,
53
- r,
54
- f
55
- ]
56
- }, a.faSquare = a.definition, a.prefix = e, a.iconName = i, a.width = n, a.height = h, a.ligatures = c, a.unicode = r, a.svgPathData = f, a.aliases = c;
57
- })(m);
58
- const C = (a) => {
59
- const { children: e, className: i, ...n } = a, h = v(u.checkbox, i);
60
- return /* @__PURE__ */ t.createElement(d.Checkbox, { ...n, className: h }, ({ isSelected: c }) => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
61
- s,
62
- {
63
- className: u.checkmark,
64
- faIcon: c ? l.faCheckSquare : m.faSquare
65
- }
66
- ), e));
3
+ import c from "react";
4
+ import * as k from "react-aria-components";
5
+ import { c as l } 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 n, a as h } from "./IconUnchecked-CGdUugGS.js";
12
+ const i = "flow--checkbox", p = "flow--checkbox--checkmark", e = {
13
+ checkbox: i,
14
+ checkmark: p
15
+ }, I = (o) => {
16
+ const { children: t, className: r, ...a } = o, m = l(e.checkbox, r);
17
+ return /* @__PURE__ */ c.createElement(k.Checkbox, { ...a, className: m }, ({ isSelected: s }) => /* @__PURE__ */ c.createElement(c.Fragment, null, s ? /* @__PURE__ */ c.createElement(n, { className: e.checkmark }) : /* @__PURE__ */ c.createElement(h, { className: e.checkmark }), t));
67
18
  };
68
19
  export {
69
- C as Checkbox,
70
- C as default
20
+ I as Checkbox,
21
+ I as default
71
22
  };
@@ -1,18 +1,21 @@
1
1
  "use client"
2
2
  /* */
3
- import f, { isValidElement as s, Children as p, cloneElement as b } from "react";
4
- import { B as S } from "./Button-D_qgEN7Z.js";
5
- import { I as R } from "./Icon-Dp34FFi3.js";
6
- import { useLocalizedStringFormatter as B } from "react-aria";
7
- import { T as P } from "./Tooltip-BqyZAZgK.js";
8
- import { T as $ } from "./TooltipTrigger-7-ynWHZ9.js";
3
+ import f, { isValidElement as l, Children as u, cloneElement as v } from "react";
4
+ import { B as R } from "./Button-BH3d8Oz-.js";
5
+ import "@tabler/icons-react";
6
+ import "./Icon-C8UD3vMe.js";
7
+ import "html-react-parser";
9
8
  import "./propsContext-Dx7WKmmM.js";
10
9
  import "@react-aria/utils";
11
- import { u as H } from "./useProps-C7GIMcgB.js";
12
- function k(e) {
10
+ import { u as B } from "./useProps-C7GIMcgB.js";
11
+ import { I as N } from "./IconCopy-C-PQMIfL.js";
12
+ import { useLocalizedStringFormatter as $ } from "react-aria";
13
+ import { T as k } from "./Tooltip-BqyZAZgK.js";
14
+ import { T as P } from "./TooltipTrigger-7-ynWHZ9.js";
15
+ function F(e) {
13
16
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
14
17
  }
15
- var M = function() {
18
+ var I = function() {
16
19
  var e = document.getSelection();
17
20
  if (!e.rangeCount)
18
21
  return function() {
@@ -29,105 +32,88 @@ var M = function() {
29
32
  break;
30
33
  }
31
34
  return e.removeAllRanges(), function() {
32
- e.type === "Caret" && e.removeAllRanges(), e.rangeCount || r.forEach(function(n) {
33
- e.addRange(n);
35
+ e.type === "Caret" && e.removeAllRanges(), e.rangeCount || r.forEach(function(a) {
36
+ e.addRange(a);
34
37
  }), t && t.focus();
35
38
  };
36
- }, I = M, v = {
39
+ }, U = I, C = {
37
40
  "text/plain": "Text",
38
41
  "text/html": "Url",
39
42
  default: "Text"
40
- }, x = "Copy to clipboard: #{key}, Enter";
41
- function F(e) {
43
+ }, h = "Copy to clipboard: #{key}, Enter";
44
+ function V(e) {
42
45
  var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
43
46
  return e.replace(/#{\s*key\s*}/g, t);
44
47
  }
45
- function U(e, t) {
46
- var r, o, n, c, l, a, d = !1;
48
+ function M(e, t) {
49
+ var r, o, a, s, p, n, m = !1;
47
50
  t || (t = {}), r = t.debug || !1;
48
51
  try {
49
- n = I(), c = document.createRange(), l = document.getSelection(), a = document.createElement("span"), a.textContent = e, a.ariaHidden = "true", a.style.all = "unset", a.style.position = "fixed", a.style.top = 0, a.style.clip = "rect(0, 0, 0, 0)", a.style.whiteSpace = "pre", a.style.webkitUserSelect = "text", a.style.MozUserSelect = "text", a.style.msUserSelect = "text", a.style.userSelect = "text", a.addEventListener("copy", function(i) {
50
- if (i.stopPropagation(), t.format)
51
- if (i.preventDefault(), typeof i.clipboardData > "u") {
52
+ a = U(), s = document.createRange(), p = document.getSelection(), n = document.createElement("span"), n.textContent = e, n.ariaHidden = "true", n.style.all = "unset", n.style.position = "fixed", n.style.top = 0, n.style.clip = "rect(0, 0, 0, 0)", n.style.whiteSpace = "pre", n.style.webkitUserSelect = "text", n.style.MozUserSelect = "text", n.style.msUserSelect = "text", n.style.userSelect = "text", n.addEventListener("copy", function(c) {
53
+ if (c.stopPropagation(), t.format)
54
+ if (c.preventDefault(), typeof c.clipboardData > "u") {
52
55
  r && console.warn("unable to use e.clipboardData"), r && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
53
- var y = v[t.format] || v.default;
56
+ var y = C[t.format] || C.default;
54
57
  window.clipboardData.setData(y, e);
55
58
  } else
56
- i.clipboardData.clearData(), i.clipboardData.setData(t.format, e);
57
- t.onCopy && (i.preventDefault(), t.onCopy(i.clipboardData));
58
- }), document.body.appendChild(a), c.selectNodeContents(a), l.addRange(c);
59
- var V = document.execCommand("copy");
60
- if (!V)
59
+ c.clipboardData.clearData(), c.clipboardData.setData(t.format, e);
60
+ t.onCopy && (c.preventDefault(), t.onCopy(c.clipboardData));
61
+ }), document.body.appendChild(n), s.selectNodeContents(n), p.addRange(s);
62
+ var S = document.execCommand("copy");
63
+ if (!S)
61
64
  throw new Error("copy command was unsuccessful");
62
- d = !0;
63
- } catch (i) {
64
- r && console.error("unable to copy using execCommand: ", i), r && console.warn("trying IE specific stuff");
65
+ m = !0;
66
+ } catch (c) {
67
+ r && console.error("unable to copy using execCommand: ", c), r && console.warn("trying IE specific stuff");
65
68
  try {
66
- window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), d = !0;
69
+ window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), m = !0;
67
70
  } catch (y) {
68
- r && console.error("unable to copy using clipboardData: ", y), r && console.error("falling back to prompt"), o = F("message" in t ? t.message : x), window.prompt(o, e);
71
+ r && console.error("unable to copy using clipboardData: ", y), r && console.error("falling back to prompt"), o = V("message" in t ? t.message : h), window.prompt(o, e);
69
72
  }
70
73
  } finally {
71
- l && (typeof l.removeRange == "function" ? l.removeRange(c) : l.removeAllRanges()), a && document.body.removeChild(a), n();
74
+ p && (typeof p.removeRange == "function" ? p.removeRange(s) : p.removeAllRanges()), n && document.body.removeChild(n), a();
72
75
  }
73
- return d;
76
+ return m;
74
77
  }
75
- var z = U;
76
- const L = /* @__PURE__ */ k(z);
77
- var E = {};
78
- (function(e) {
79
- Object.defineProperty(e, "__esModule", { value: !0 });
80
- var t = "far", r = "copy", o = 448, n = 512, c = [], l = "f0c5", a = "M384 336H192c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16l140.1 0L400 115.9V320c0 8.8-7.2 16-16 16zM192 384H384c35.3 0 64-28.7 64-64V115.9c0-12.7-5.1-24.9-14.1-33.9L366.1 14.1c-9-9-21.2-14.1-33.9-14.1H192c-35.3 0-64 28.7-64 64V320c0 35.3 28.7 64 64 64zM64 128c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H256c35.3 0 64-28.7 64-64V416H272v32c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V192c0-8.8 7.2-16 16-16H96V128H64z";
81
- e.definition = {
82
- prefix: t,
83
- iconName: r,
84
- icon: [
85
- o,
86
- n,
87
- c,
88
- l,
89
- a
90
- ]
91
- }, e.faCopy = e.definition, e.prefix = t, e.iconName = r, e.width = o, e.height = n, e.ligatures = c, e.unicode = l, e.svgPathData = a, e.aliases = c;
92
- })(E);
93
- const O = {
78
+ var O = M;
79
+ const j = /* @__PURE__ */ F(O), z = {
94
80
  "de-DE": {
95
81
  "copyButton.copy": "Kopieren"
96
82
  },
97
83
  "en-EN": {
98
84
  "copyButton.copy": "Copy"
99
85
  }
100
- }, m = (e) => s(e) && !!e.props.children, _ = (e) => s(e) && m(e) && p.toArray(e.props.children).reduce((t, r) => t || s(r), !1), u = _, w = (e, t) => p.toArray(e).filter(t).map((r) => s(r) && u(r) ? b(r, {
86
+ }, d = (e) => l(e) && !!e.props.children, K = (e) => l(e) && d(e) && u.toArray(e.props.children).reduce((t, r) => t || l(r), !1), i = K, E = (e, t) => u.toArray(e).filter(t).map((r) => l(r) && i(r) ? v(r, {
101
87
  ...r.props,
102
- children: w(r.props.children, t)
103
- }) : r), D = w, T = (e, t) => {
88
+ children: E(r.props.children, t)
89
+ }) : r), w = E, T = (e, t) => {
104
90
  let r;
105
- return p.toArray(e).find((o, n, c) => t(o, n, c) ? (r = o, !0) : s(o) && u(o) ? (r = T(o.props.children, t), typeof r < "u") : !1), r;
106
- }, j = T, A = (e, t) => {
107
- p.forEach(e, (r, o) => {
108
- s(r) && u(r) && A(r.props.children, t), t(r, o);
91
+ return u.toArray(e).find((o, a, s) => t(o, a, s) ? (r = o, !0) : l(o) && i(o) ? (r = T(o.props.children, t), typeof r < "u") : !1), r;
92
+ }, L = T, D = (e, t) => {
93
+ u.forEach(e, (r, o) => {
94
+ l(r) && i(r) && D(r.props.children, t), t(r, o);
109
95
  });
110
- }, K = A, h = (e, t) => p.toArray(e).map((r, o, n) => s(r) && u(r) ? t(b(r, {
96
+ }, _ = D, A = (e, t) => u.toArray(e).map((r, o, a) => l(r) && i(r) ? t(v(r, {
111
97
  ...r.props,
112
- children: h(r.props.children, t)
113
- })) : t(r, o, n)), J = h, X = (e, t) => p.toArray(e).filter(t), q = X, G = (e) => s(e) ? typeof e.type == "string" ? e.type : e.type.name : null, N = G, Q = (e, t = [], r = "rest") => {
114
- const o = t.map((n) => typeof n == "string" ? n : n.name);
115
- return p.toArray(e).reduce((n, c) => {
116
- const l = N(c), a = l !== null && o.includes(l) ? l : r;
117
- return typeof n[a] > "u" && (n[a] = []), n[a] = [...n[a], c], n;
98
+ children: A(r.props.children, t)
99
+ })) : t(r, o, a)), H = A, J = (e, t) => u.toArray(e).filter(t), X = J, q = (e) => l(e) ? typeof e.type == "string" ? e.type : e.type.name : null, x = q, G = (e, t = [], r = "rest") => {
100
+ const o = t.map((a) => typeof a == "string" ? a : a.name);
101
+ return u.toArray(e).reduce((a, s) => {
102
+ const p = x(s), n = p !== null && o.includes(p) ? p : r;
103
+ return typeof a[n] > "u" && (a[n] = []), a[n] = [...a[n], s], a;
118
104
  }, {});
119
- }, W = Q, C = (e) => typeof e > "u" || e === null || typeof e == "boolean" || JSON.stringify(e) === "{}" ? "" : e.toString(), g = (e) => !(e instanceof Array) && !s(e) ? C(e) : p.toArray(e).reduce((t, r) => {
105
+ }, Q = G, b = (e) => typeof e > "u" || e === null || typeof e == "boolean" || JSON.stringify(e) === "{}" ? "" : e.toString(), g = (e) => !(e instanceof Array) && !l(e) ? b(e) : u.toArray(e).reduce((t, r) => {
120
106
  let o = "";
121
- return m(r) ? o = g(r.props.children) : s(r) ? o = "" : o = C(r), t.concat(o);
122
- }, ""), Y = (e) => D(e, (t) => s(t)), Z = Y;
107
+ return d(r) ? o = g(r.props.children) : l(r) ? o = "" : o = b(r), t.concat(o);
108
+ }, ""), W = (e) => w(e, (t) => l(t)), Y = W;
123
109
  ({
124
- ...p
110
+ ...u
125
111
  });
126
112
  const ie = (e) => {
127
- const { text: t, ...r } = H("CopyToClipboard", e), n = B(O).format("copyButton.copy"), c = () => {
128
- L(g(t));
113
+ const { text: t, ...r } = B("CopyToClipboard", e), a = $(z).format("copyButton.copy"), s = () => {
114
+ j(g(t));
129
115
  };
130
- return /* @__PURE__ */ f.createElement($, null, /* @__PURE__ */ f.createElement(S, { onPress: c, "aria-label": n, ...r }, /* @__PURE__ */ f.createElement(R, { faIcon: E.faCopy })), /* @__PURE__ */ f.createElement(P, null, n));
116
+ return /* @__PURE__ */ f.createElement(P, null, /* @__PURE__ */ f.createElement(R, { onPress: s, "aria-label": a, ...r }, /* @__PURE__ */ f.createElement(N, null)), /* @__PURE__ */ f.createElement(k, null, a));
131
117
  };
132
118
  export {
133
119
  ie as CopyToClipboardButton,
@@ -0,0 +1,49 @@
1
+ "use client"
2
+ /* */
3
+ import s, { Children as f, useMemo as p } from "react";
4
+ import { c as g } from "./clsx-DB4S2d7J.js";
5
+ import d from "html-react-parser";
6
+ import "./propsContext-Dx7WKmmM.js";
7
+ import "@react-aria/utils";
8
+ import { u } from "./useProps-C7GIMcgB.js";
9
+ const w = "flow--icon", c = {
10
+ icon: w,
11
+ "size-m": "flow--icon--size-m",
12
+ "size-s": "flow--icon--size-s",
13
+ "size-l": "flow--icon--size-l"
14
+ }, z = (e) => {
15
+ const t = f.toArray(d(e)).find(
16
+ (o) => typeof o == "object" && "type" in o && o.type === "svg"
17
+ );
18
+ if (!t)
19
+ throw new Error(`Invalid SVG string (got ${String(e)})`);
20
+ return t;
21
+ }, I = (e) => {
22
+ const {
23
+ className: t,
24
+ "aria-label": o,
25
+ children: i,
26
+ size: a = "m",
27
+ ...l
28
+ } = u("Icon", e), m = {
29
+ ...l,
30
+ focusable: "false",
31
+ role: "img",
32
+ "aria-hidden": !o,
33
+ "aria-label": o,
34
+ className: g(c.icon, t, c[`size-${a}`])
35
+ }, r = typeof i == "string", n = p(
36
+ () => r ? z(i) : i,
37
+ [r, i]
38
+ );
39
+ if (!s.isValidElement(n))
40
+ throw new Error(
41
+ `Expected children of Icon component to be a valid React element (got ${String(
42
+ n
43
+ )})`
44
+ );
45
+ return s.cloneElement(n, m);
46
+ };
47
+ export {
48
+ I
49
+ };
package/dist/Icon.d.ts CHANGED
@@ -1,6 +1,4 @@
1
- import { BackwardCompatibleOmit } from '@fortawesome/react-fontawesome';
2
1
  import { FC } from 'react';
3
- import { IconLookup } from '@fortawesome/fontawesome-svg-core';
4
2
  import { PropsWithChildren } from 'react';
5
3
  import { SVGAttributes } from 'react';
6
4
 
@@ -8,11 +6,11 @@ declare const Icon: FC<IconProps>;
8
6
  export { Icon }
9
7
  export default Icon;
10
8
 
11
- export declare interface IconProps extends PropsWithChildren<SvgAttributeProps> {
12
- faIcon?: IconLookup;
13
- fixedWidth?: boolean;
9
+ export declare interface IconProps extends PropsWithChildren<Omit<SvgAttributeProps, "name">> {
10
+ /** @default "m" */
11
+ size?: "s" | "m" | "l";
14
12
  }
15
13
 
16
- declare type SvgAttributeProps = BackwardCompatibleOmit<SVGAttributes<SVGSVGElement>, "children" | "mask" | "transform">;
14
+ declare type SvgAttributeProps = SVGAttributes<SVGSVGElement>;
17
15
 
18
16
  export { }
package/dist/Icon.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { I as a } from "./Icon-Dp34FFi3.js";
3
+ import { I as a } from "./Icon-C8UD3vMe.js";
4
4
  export {
5
5
  a as Icon,
6
6
  a as default
@@ -0,0 +1,9 @@
1
+ "use client"
2
+ /* */
3
+ import e from "react";
4
+ import { IconCheck as c } from "@tabler/icons-react";
5
+ import { I as t } from "./Icon-C8UD3vMe.js";
6
+ const a = (o) => /* @__PURE__ */ e.createElement(t, { ...o }, /* @__PURE__ */ e.createElement(c, null));
7
+ export {
8
+ a as I
9
+ };
@@ -0,0 +1,9 @@
1
+ "use client"
2
+ /* */
3
+ import o from "react";
4
+ import { IconCopy as t } from "@tabler/icons-react";
5
+ import { I as r } from "./Icon-C8UD3vMe.js";
6
+ const p = (e) => /* @__PURE__ */ o.createElement(r, { ...e }, /* @__PURE__ */ o.createElement(t, null));
7
+ export {
8
+ p as I
9
+ };
@@ -0,0 +1,12 @@
1
+ "use client"
2
+ /* */
3
+ import n from "react";
4
+ import { IconChevronDown as c, IconChevronUp as t, IconMinus as r, IconPlus as a } from "@tabler/icons-react";
5
+ import { I as o } from "./Icon-C8UD3vMe.js";
6
+ const m = (e) => /* @__PURE__ */ n.createElement(o, { ...e }, /* @__PURE__ */ n.createElement(c, null)), u = (e) => /* @__PURE__ */ n.createElement(o, { ...e }, /* @__PURE__ */ n.createElement(t, null)), E = (e) => /* @__PURE__ */ n.createElement(o, { ...e }, /* @__PURE__ */ n.createElement(r, null)), p = (e) => /* @__PURE__ */ n.createElement(o, { ...e }, /* @__PURE__ */ n.createElement(a, null));
7
+ export {
8
+ m as I,
9
+ u as a,
10
+ E as b,
11
+ p as c
12
+ };
@@ -0,0 +1,11 @@
1
+ "use client"
2
+ /* */
3
+ import e from "react";
4
+ import { IconX as t, IconLoader2 as o, IconCheck as a } from "@tabler/icons-react";
5
+ import { I as c } from "./Icon-C8UD3vMe.js";
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
+ export {
8
+ I,
9
+ s as a,
10
+ E as b
11
+ };
@@ -0,0 +1,10 @@
1
+ "use client"
2
+ /* */
3
+ import e from "react";
4
+ import { IconSquareCheck as n, IconSquare as o } from "@tabler/icons-react";
5
+ import { I as t } from "./Icon-C8UD3vMe.js";
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
+ export {
8
+ l as I,
9
+ I as a
10
+ };
@@ -0,0 +1,12 @@
1
+ "use client"
2
+ /* */
3
+ import e from "react";
4
+ import { IconAlertTriangle as t, IconInfoCircle as r, IconCircleCheck as l, IconAlertCircle as o } from "@tabler/icons-react";
5
+ import { I as c } from "./Icon-C8UD3vMe.js";
6
+ const s = (n) => /* @__PURE__ */ e.createElement(c, { ...n }, /* @__PURE__ */ e.createElement(t, null)), i = (n) => /* @__PURE__ */ e.createElement(c, { ...n }, /* @__PURE__ */ e.createElement(r, null)), E = (n) => /* @__PURE__ */ e.createElement(c, { ...n }, /* @__PURE__ */ e.createElement(l, null)), f = (n) => /* @__PURE__ */ e.createElement(c, { ...n }, /* @__PURE__ */ e.createElement(o, null));
7
+ export {
8
+ s as I,
9
+ i as a,
10
+ E as b,
11
+ f as c
12
+ };