@mittwald/flow-react-components 0.1.0-alpha.400 → 0.1.0-alpha.402

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.1.0-alpha.400",
3
+ "version": "0.1.0-alpha.402",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -425,7 +425,7 @@
425
425
  "@chakra-ui/live-region": "^2.1.0",
426
426
  "@internationalized/date": "^3.6.0",
427
427
  "@internationalized/string-compiler": "^3.2.6",
428
- "@mittwald/react-tunnel": "^0.1.0-alpha.400",
428
+ "@mittwald/react-tunnel": "^0.1.0-alpha.402",
429
429
  "@mittwald/react-use-promise": "^2.6.0",
430
430
  "@react-aria/form": "^3.0.11",
431
431
  "@react-aria/utils": "^3.26.0",
@@ -456,7 +456,7 @@
456
456
  },
457
457
  "devDependencies": {
458
458
  "@faker-js/faker": "^9.2.0",
459
- "@mittwald/flow-design-tokens": "^0.1.0-alpha.400",
459
+ "@mittwald/flow-design-tokens": "^0.1.0-alpha.402",
460
460
  "@mittwald/react-use-promise": "^2.6.0",
461
461
  "@nx/storybook": "^20.1.3",
462
462
  "@storybook/addon-a11y": "^8.4.5",
@@ -551,5 +551,5 @@
551
551
  }
552
552
  }
553
553
  },
554
- "gitHead": "d9770bfa2cecfe492c12c2809e363f1580579633"
554
+ "gitHead": "cd1cb82332e85eb26864439d1d581269e6a2c5ad"
555
555
  }
@@ -1,62 +0,0 @@
1
- "use client"
2
- /* */
3
- import l, { isValidElement as f } from "react";
4
- import v from "clsx";
5
- import { C as w } from "./ClearPropsContext-CUvsbMn8.js";
6
- import { PropsContextProvider as u } from "./PropsContextProvider.js";
7
- import "@react-aria/utils";
8
- import "./propsContext-DzAKlmhS.js";
9
- import "remeda";
10
- import { hash as C } from "object-code";
11
- import { deepForEach as d } from "react-children-utilities";
12
- import { f as h } from "./flowComponent-BQs9wMX_.js";
13
- import { d as z } from "./deepHas-KHS5X1F_.js";
14
- import { I as b } from "./Initials-CSvhEbyw.js";
15
- const g = "flow--avatar", x = "flow--avatar--icon", E = "flow--avatar--initials", I = "flow--avatar--blue", N = "flow--avatar--teal", y = "flow--avatar--green", P = "flow--avatar--violet", A = "flow--avatar--lilac", o = {
16
- avatar: g,
17
- icon: x,
18
- initials: E,
19
- "size-m": "flow--avatar--size-m",
20
- "size-xs": "flow--avatar--size-xs",
21
- "size-s": "flow--avatar--size-s",
22
- "size-l": "flow--avatar--size-l",
23
- blue: I,
24
- teal: N,
25
- green: y,
26
- violet: P,
27
- lilac: A
28
- }, F = (e) => {
29
- const a = [];
30
- d(e, (t) => {
31
- f(t) ? a.push({
32
- props: t.props,
33
- type: t.type
34
- }) : a.push(t);
35
- });
36
- const s = C(a), r = Math.abs(s % (i.length - 1));
37
- return i[r];
38
- }, i = [
39
- "blue",
40
- "teal",
41
- "green",
42
- "violet",
43
- "lilac"
44
- ], J = h("Avatar", (e) => {
45
- const { children: a, className: s, color: r, size: t = "m", refProp: n } = e, c = z(a, b), m = v(
46
- o.avatar,
47
- o[`size-${t}`],
48
- s,
49
- o[r ?? (c ? F(a) : "blue")]
50
- ), p = {
51
- Initials: {
52
- className: o.initials
53
- },
54
- Icon: {
55
- className: o.icon
56
- }
57
- };
58
- return /* @__PURE__ */ l.createElement(w, null, /* @__PURE__ */ l.createElement("div", { className: m, ref: n }, /* @__PURE__ */ l.createElement(u, { props: p }, a)));
59
- });
60
- export {
61
- J as A
62
- };
@@ -1,29 +0,0 @@
1
- "use client"
2
- /* */
3
- import o from "react";
4
- import a from "clsx";
5
- import { C as p } from "./ClearPropsContext-CUvsbMn8.js";
6
- import { PropsContextProvider as b } from "./PropsContextProvider.js";
7
- import "@react-aria/utils";
8
- import "./propsContext-DzAKlmhS.js";
9
- import "remeda";
10
- import { C as x } from "./Checkbox-BU4YHXyk.js";
11
- import { f } from "./flowComponent-BQs9wMX_.js";
12
- const C = "flow--checkbox-button", i = "flow--checkbox-button--label", h = "flow--checkbox-button--content", t = {
13
- checkboxButton: C,
14
- label: i,
15
- content: h
16
- }, y = f("CheckboxButton", (e) => {
17
- const { children: c, className: n, refProp: r, ...s } = e, l = a(t.checkboxButton, n), m = {
18
- Text: {
19
- className: t.label
20
- },
21
- Content: {
22
- className: t.content
23
- }
24
- };
25
- return /* @__PURE__ */ o.createElement(p, null, /* @__PURE__ */ o.createElement(x, { ...s, className: l, ref: r }, /* @__PURE__ */ o.createElement(b, { props: m }, c)));
26
- });
27
- export {
28
- y as C
29
- };
@@ -1,20 +0,0 @@
1
- "use client"
2
- /* */
3
- import e from "react";
4
- import c from "clsx";
5
- import { C as f } from "./ClearPropsContext-CUvsbMn8.js";
6
- import "./propsContext-DzAKlmhS.js";
7
- import "@react-aria/utils";
8
- import "remeda";
9
- import "dot-prop";
10
- import { onlyText as C } from "react-children-utilities";
11
- import { f as x } from "./flowComponent-BQs9wMX_.js";
12
- const u = (i) => i.replace(/[^\p{L}\s]/giu, "").split(" ").map((t) => t.trim()[0]).filter((t) => t !== void 0).map((t) => t.toUpperCase()).slice(0, 2), E = "flow--initials", I = {
13
- initials: E
14
- }, k = x("Initials", (i) => {
15
- const { children: t, className: s, refProp: r } = i, o = C(t), n = u(o), a = c(I.initials, s), l = n.map((m, p) => /* @__PURE__ */ e.createElement("span", { key: p }, m));
16
- return /* @__PURE__ */ e.createElement(f, null, /* @__PURE__ */ e.createElement("div", { "aria-label": o, className: a, ref: r }, l));
17
- });
18
- export {
19
- k as I
20
- };
@@ -1,64 +0,0 @@
1
- "use client"
2
- /* */
3
- import e from "react";
4
- import * as x from "react-aria-components";
5
- import i from "clsx";
6
- import "./propsContext-DzAKlmhS.js";
7
- import { PropsContextProvider as p } from "./PropsContextProvider.js";
8
- import "@react-aria/utils";
9
- import "remeda";
10
- import "@tabler/icons-react";
11
- import "./Icon--OEo4TjW.js";
12
- import { I as E, a as d } from "./IconCheckboxEmpty-CZrD3f3O.js";
13
- import { I as v, a as C } from "./IconRadioOn-D7w6KLWm.js";
14
- import { T as u } from "./Text-Dh4iy9qD.js";
15
- import { d as f } from "./deepHas-KHS5X1F_.js";
16
- import { W as N } from "./Wrap-DGT1h1o3.js";
17
- import { A as M } from "./Avatar-w4MD020Q.js";
18
- import { S as I } from "./Switch-BhDMHWjv.js";
19
- import { f as A } from "./flowComponent-BQs9wMX_.js";
20
- const R = "flow--menu-item", S = "flow--menu-item--icon", g = "flow--menu-item--text", y = "flow--menu-item--control-icon", O = "flow--menu-item--avatar", t = {
21
- menuItem: R,
22
- switch: "flow--menu-item--switch",
23
- icon: S,
24
- text: g,
25
- controlIcon: y,
26
- avatar: O
27
- }, P = (a) => {
28
- const {
29
- selectionMode: n,
30
- isSelected: o,
31
- selectionVariant: r = "control",
32
- children: c
33
- } = a, m = {
34
- Icon: {
35
- className: t.icon
36
- },
37
- Text: {
38
- className: t.text
39
- },
40
- Avatar: {
41
- className: t.avatar
42
- }
43
- }, s = {
44
- Icon: {
45
- className: i(t.controlIcon, t.icon)
46
- },
47
- Switch: {
48
- className: i(t.controlIcon, t.switch)
49
- }
50
- }, l = n === "none" || r === "navigation" ? null : r === "switch" && o ? /* @__PURE__ */ e.createElement(I, { isReadOnly: !0, isSelected: !0 }) : r === "switch" && !o ? /* @__PURE__ */ e.createElement(I, { isReadOnly: !0 }) : n === "single" && o ? /* @__PURE__ */ e.createElement(v, null) : n === "single" && !o ? /* @__PURE__ */ e.createElement(C, null) : n === "multiple" && o ? /* @__PURE__ */ e.createElement(E, null) : /* @__PURE__ */ e.createElement(d, null), h = f(c, u), w = f(c, M);
51
- return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(p, { props: s }, l), /* @__PURE__ */ e.createElement(p, { props: m }, /* @__PURE__ */ e.createElement(N, { if: !h && !w }, /* @__PURE__ */ e.createElement(u, null, c))));
52
- }, Q = A("MenuItem", (a) => {
53
- const {
54
- children: n,
55
- className: o,
56
- selectionVariant: r,
57
- refProp: c,
58
- ...m
59
- } = a, s = i(t.menuItem, o);
60
- return /* @__PURE__ */ e.createElement(x.MenuItem, { ...m, className: s, ref: c }, (l) => /* @__PURE__ */ e.createElement(P, { ...l, selectionVariant: r }, n));
61
- });
62
- export {
63
- Q as M
64
- };
@@ -1,15 +0,0 @@
1
- "use client"
2
- /* */
3
- import { isValidElement as s } from "react";
4
- import { deepFind as i, deepForEach as o } from "react-children-utilities";
5
- const p = (e, t) => s(e) ? typeof t == "string" ? typeof e.type == "string" ? e.type === t : !1 : e.type === t : !1, f = (e, t) => i(e, (r) => p(r, t)), u = (e, t) => {
6
- const r = [];
7
- return o(e, (n) => {
8
- p(n, t) && r.push(n);
9
- }), r;
10
- }, y = (e, t) => !!f(e, t);
11
- export {
12
- f as a,
13
- u as b,
14
- y as d
15
- };