@mittwald/flow-react-components 0.1.0-alpha.133 → 0.1.0-alpha.135
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-BhdK6WXV.js +60 -0
- package/dist/styles.css +1 -1
- package/dist/types/components/Slider/Slider.d.ts +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-BhdK6WXV.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-BhdK6WXV.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,60 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import r, { forwardRef as x, useState as F } from "react";
|
|
4
|
+
import * as E from "react-aria-components";
|
|
5
|
+
import { s as t } from "./FormField.module-DHK6nIcD.js";
|
|
6
|
+
import g from "clsx";
|
|
7
|
+
import { C as N } from "./ClearPropsContext-CUvsbMn8.js";
|
|
8
|
+
import { P as D } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
9
|
+
import "@react-aria/utils";
|
|
10
|
+
import "./propsContext-DzAKlmhS.js";
|
|
11
|
+
import "remeda";
|
|
12
|
+
import { F as B } from "./FieldError-D_VRyiJG.js";
|
|
13
|
+
import { F as P } from "./FieldDescription-Brg52RqE.js";
|
|
14
|
+
import { useMessageFormatter as R } from "react-aria";
|
|
15
|
+
const T = {
|
|
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
|
+
}, k = x(
|
|
23
|
+
(e, b) => {
|
|
24
|
+
var o;
|
|
25
|
+
const { children: n, className: c, input: i, showCharacterCount: a, ...l } = e, [m, u] = F(
|
|
26
|
+
((o = e.value) == null ? void 0 : o.length) ?? 0
|
|
27
|
+
), d = g(t.formField, c), h = R(T), C = {
|
|
28
|
+
Label: {
|
|
29
|
+
className: t.label,
|
|
30
|
+
optional: !e.isRequired
|
|
31
|
+
},
|
|
32
|
+
FieldDescription: {
|
|
33
|
+
className: t.fieldDescription
|
|
34
|
+
},
|
|
35
|
+
FieldError: {
|
|
36
|
+
className: t.customFieldError
|
|
37
|
+
}
|
|
38
|
+
}, f = (s) => {
|
|
39
|
+
a && u(s.length), e.onChange && e.onChange(s);
|
|
40
|
+
}, p = h("textFieldBase.characters", {
|
|
41
|
+
count: m,
|
|
42
|
+
maxCount: e.maxLength ?? 0
|
|
43
|
+
});
|
|
44
|
+
return /* @__PURE__ */ r.createElement(N, null, /* @__PURE__ */ r.createElement(
|
|
45
|
+
E.TextField,
|
|
46
|
+
{
|
|
47
|
+
...l,
|
|
48
|
+
className: d,
|
|
49
|
+
onChange: f
|
|
50
|
+
},
|
|
51
|
+
i,
|
|
52
|
+
/* @__PURE__ */ r.createElement(D, { props: C }, n),
|
|
53
|
+
a && /* @__PURE__ */ r.createElement(P, { className: t.fieldDescription }, p),
|
|
54
|
+
/* @__PURE__ */ r.createElement(B, { className: t.fieldError })
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
export {
|
|
59
|
+
k as T
|
|
60
|
+
};
|