@mittwald/flow-react-components 0.1.0-alpha.42 → 0.1.0-alpha.43

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/Avatar.js CHANGED
@@ -2,13 +2,14 @@
2
2
  /* */
3
3
  import o, { isValidElement as l } from "react";
4
4
  import v from "clsx";
5
- import { P as m } from "./PropsContextProvider-C7Evvjhy.js";
5
+ import { P as c } from "./PropsContextProvider-C7Evvjhy.js";
6
6
  import "@react-aria/utils";
7
7
  import "remeda";
8
- import { hash as p } from "object-code";
9
- import { deepForEach as c } from "react-children-utilities";
10
- const f = "flow--avatar", z = "flow--avatar--initials", r = {
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
11
  avatar: f,
12
+ icon: w,
12
13
  initials: z,
13
14
  "size-m": "flow--avatar--size-m",
14
15
  "size-xs": "flow--avatar--size-xs",
@@ -18,33 +19,33 @@ const f = "flow--avatar", z = "flow--avatar--initials", r = {
18
19
  "variant-2": "flow--avatar--variant-2",
19
20
  "variant-3": "flow--avatar--variant-3",
20
21
  "variant-4": "flow--avatar--variant-4"
21
- }, w = (s) => {
22
+ }, d = (s) => {
22
23
  const a = [];
23
- c(s, (t) => {
24
+ p(s, (t) => {
24
25
  l(t) ? a.push({
25
26
  props: t.props,
26
27
  type: t.type
27
28
  }) : a.push(t);
28
29
  });
29
- const i = p(a);
30
+ const i = m(a);
30
31
  return Math.abs(i % 4) + 1;
31
- }, N = (s) => {
32
+ }, P = (s) => {
32
33
  const { children: a, className: i, size: t = "m" } = s, e = v(
33
34
  r.avatar,
34
35
  r[`size-${t}`],
35
36
  i,
36
- r[`variant-${w(a)}`]
37
+ r[`variant-${d(a)}`]
37
38
  ), n = {
38
39
  Initials: {
39
40
  className: r.initials
40
41
  },
41
42
  Icon: {
42
- size: "m"
43
+ className: r.icon
43
44
  }
44
45
  };
45
- return /* @__PURE__ */ o.createElement("div", { className: e }, /* @__PURE__ */ o.createElement(m, { props: n }, a));
46
+ return /* @__PURE__ */ o.createElement("div", { className: e }, /* @__PURE__ */ o.createElement(c, { props: n }, a));
46
47
  };
47
48
  export {
48
- N as Avatar,
49
- N as default
49
+ P as Avatar,
50
+ P as default
50
51
  };
package/dist/Heading.js CHANGED
@@ -1,22 +1,28 @@
1
1
  "use client"
2
2
  /* */
3
- import m from "react";
4
- import c from "clsx";
5
- import "./PropsContextProvider-C7Evvjhy.js";
6
- import "@react-aria/utils";
7
- import { u as i } from "./useProps-d5Do2me4.js";
8
- const l = "flow--heading", d = {
9
- heading: l
10
- }, N = (e) => {
3
+ import e from "react";
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 = {
8
+ heading: h,
9
+ icon: f
10
+ }, P = (s) => {
11
11
  const {
12
12
  children: t,
13
- className: s,
14
- level: o = 3,
15
- ...a
16
- } = i("Heading", e), n = c(d.heading, s), r = `h${o}`;
17
- return /* @__PURE__ */ m.createElement(r, { className: n, ...a }, t);
13
+ className: n,
14
+ level: a = 2,
15
+ ...r
16
+ } = p("Heading", s), c = m(o.heading, n), i = `h${a}`, l = {
17
+ Icon: {
18
+ "aria-hidden": !0,
19
+ size: "s",
20
+ className: o.icon
21
+ }
22
+ };
23
+ return /* @__PURE__ */ e.createElement(i, { className: c, ...r }, /* @__PURE__ */ e.createElement(d, { props: l }, t));
18
24
  };
19
25
  export {
20
- N as Heading,
21
- N as default
26
+ P as Heading,
27
+ P as default
22
28
  };