@mittwald/flow-react-components 0.1.0-alpha.133 → 0.1.0-alpha.134
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/FieldDescription-Brg52RqE.js +20 -0
- package/dist/FieldDescription.js +3 -17
- package/dist/TextArea.js +1 -1
- package/dist/TextField.js +1 -1
- package/dist/TextFieldBase-CsQ97WH-.js +68 -0
- package/dist/styles.css +1 -1
- package/dist/types/components/TextArea/stories/Default.stories.d.ts +1 -0
- package/dist/types/components/TextField/stories/Default.stories.d.ts +1 -0
- package/dist/types/components/TextFieldBase/TextFieldBase.d.ts +1 -0
- package/package.json +4 -4
- package/dist/TextFieldBase-D6wA8562.js +0 -32
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import o from "react";
|
|
4
|
+
import m from "clsx";
|
|
5
|
+
import { C as n } from "./ClearPropsContext-CUvsbMn8.js";
|
|
6
|
+
import "./propsContext-DzAKlmhS.js";
|
|
7
|
+
import "@react-aria/utils";
|
|
8
|
+
import "remeda";
|
|
9
|
+
import "dot-prop";
|
|
10
|
+
import { T as p } from "./Text-D6e-S6em.js";
|
|
11
|
+
import { f as c } from "./flowComponent-CPKCCJEg.js";
|
|
12
|
+
const a = "flow--field-description", f = {
|
|
13
|
+
fieldDescription: a
|
|
14
|
+
}, P = c("FieldDescription", (e) => {
|
|
15
|
+
const { children: t, className: r, refProp: i, ...s } = e, l = m(f.fieldDescription, r);
|
|
16
|
+
return /* @__PURE__ */ o.createElement(n, null, /* @__PURE__ */ o.createElement(p, { slot: "description", ...s, className: l, ref: i }, t));
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
P as F
|
|
20
|
+
};
|
package/dist/FieldDescription.js
CHANGED
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import
|
|
4
|
-
import m from "clsx";
|
|
5
|
-
import { C as n } from "./ClearPropsContext-CUvsbMn8.js";
|
|
6
|
-
import "./propsContext-DzAKlmhS.js";
|
|
7
|
-
import "@react-aria/utils";
|
|
8
|
-
import "remeda";
|
|
9
|
-
import "dot-prop";
|
|
10
|
-
import { T as p } from "./Text-D6e-S6em.js";
|
|
11
|
-
import { f as c } from "./flowComponent-CPKCCJEg.js";
|
|
12
|
-
const a = "flow--field-description", f = {
|
|
13
|
-
fieldDescription: a
|
|
14
|
-
}, P = c("FieldDescription", (o) => {
|
|
15
|
-
const { children: t, className: r, refProp: i, ...s } = o, l = m(f.fieldDescription, r);
|
|
16
|
-
return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(p, { slot: "description", ...s, className: l, ref: i }, t));
|
|
17
|
-
});
|
|
3
|
+
import { F as i } from "./FieldDescription-Brg52RqE.js";
|
|
18
4
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
5
|
+
i as FieldDescription,
|
|
6
|
+
i as default
|
|
21
7
|
};
|
package/dist/TextArea.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import e from "react";
|
|
4
4
|
import * as n from "react-aria-components";
|
|
5
|
-
import { T as p } from "./TextFieldBase-
|
|
5
|
+
import { T as p } from "./TextFieldBase-CsQ97WH-.js";
|
|
6
6
|
import { C as i } from "./ClearPropsContext-CUvsbMn8.js";
|
|
7
7
|
import "./propsContext-DzAKlmhS.js";
|
|
8
8
|
import "@react-aria/utils";
|
package/dist/TextField.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import e from "react";
|
|
4
4
|
import * as s from "react-aria-components";
|
|
5
|
-
import { T as a } from "./TextFieldBase-
|
|
5
|
+
import { T as a } from "./TextFieldBase-CsQ97WH-.js";
|
|
6
6
|
import { C as n } from "./ClearPropsContext-CUvsbMn8.js";
|
|
7
7
|
import "./propsContext-DzAKlmhS.js";
|
|
8
8
|
import "@react-aria/utils";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import r, { forwardRef as F, useState as E } from "react";
|
|
4
|
+
import * as g from "react-aria-components";
|
|
5
|
+
import { s as e } from "./FormField.module-DHK6nIcD.js";
|
|
6
|
+
import N from "clsx";
|
|
7
|
+
import { C as D } from "./ClearPropsContext-CUvsbMn8.js";
|
|
8
|
+
import { P as B } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
9
|
+
import "@react-aria/utils";
|
|
10
|
+
import "./propsContext-DzAKlmhS.js";
|
|
11
|
+
import "remeda";
|
|
12
|
+
import { F as P } from "./FieldError-D_VRyiJG.js";
|
|
13
|
+
import { F as R } from "./FieldDescription-Brg52RqE.js";
|
|
14
|
+
import { useMessageFormatter as T } from "react-aria";
|
|
15
|
+
const b = {
|
|
16
|
+
"de-DE": {
|
|
17
|
+
"textFieldBase.characters": "{maxCount, select, 0 {{count}} other {{count}/{maxCount}}} Zeichen"
|
|
18
|
+
},
|
|
19
|
+
"en-EN": {
|
|
20
|
+
"textFieldBase.characters": "{maxCount, select, 0 {{count}} other {{count}/{maxCount}}} characters"
|
|
21
|
+
}
|
|
22
|
+
}, z = F(
|
|
23
|
+
(t, w) => {
|
|
24
|
+
var s;
|
|
25
|
+
const {
|
|
26
|
+
children: c,
|
|
27
|
+
className: i,
|
|
28
|
+
input: l,
|
|
29
|
+
showCharacterCount: o,
|
|
30
|
+
maxLength: a = 0,
|
|
31
|
+
...m
|
|
32
|
+
} = t, [u, d] = E(
|
|
33
|
+
((s = t.value) == null ? void 0 : s.length) ?? 0
|
|
34
|
+
), h = N(e.formField, i), C = T(b), f = {
|
|
35
|
+
Label: {
|
|
36
|
+
className: e.label,
|
|
37
|
+
optional: !t.isRequired
|
|
38
|
+
},
|
|
39
|
+
FieldDescription: {
|
|
40
|
+
className: e.fieldDescription
|
|
41
|
+
},
|
|
42
|
+
FieldError: {
|
|
43
|
+
className: e.customFieldError
|
|
44
|
+
}
|
|
45
|
+
}, p = (n) => {
|
|
46
|
+
o && d(n.length), t.onChange && t.onChange(n);
|
|
47
|
+
}, x = C("textFieldBase.characters", {
|
|
48
|
+
count: u,
|
|
49
|
+
maxCount: a
|
|
50
|
+
});
|
|
51
|
+
return /* @__PURE__ */ r.createElement(D, null, /* @__PURE__ */ r.createElement(
|
|
52
|
+
g.TextField,
|
|
53
|
+
{
|
|
54
|
+
...m,
|
|
55
|
+
className: h,
|
|
56
|
+
onChange: p,
|
|
57
|
+
maxLength: a
|
|
58
|
+
},
|
|
59
|
+
l,
|
|
60
|
+
/* @__PURE__ */ r.createElement(B, { props: f }, c),
|
|
61
|
+
o && /* @__PURE__ */ r.createElement(R, { className: e.fieldDescription }, x),
|
|
62
|
+
/* @__PURE__ */ r.createElement(P, { className: e.fieldError })
|
|
63
|
+
));
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
export {
|
|
67
|
+
z as T
|
|
68
|
+
};
|