@mittwald/flow-react-components 0.1.0-alpha.134 → 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/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
|
+
};
|
|
@@ -2,7 +2,7 @@ import { FC, PropsWithChildren } from 'react';
|
|
|
2
2
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
3
3
|
|
|
4
4
|
import * as Aria from "react-aria-components";
|
|
5
|
-
export interface SliderProps extends FlowComponentProps
|
|
5
|
+
export interface SliderProps extends FlowComponentProps, PropsWithChildren<Aria.SliderProps>, Pick<Aria.SliderThumbProps, "name"> {
|
|
6
6
|
showInitialMarker?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare const Slider: FC<SliderProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.135",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
},
|
|
264
264
|
"dependencies": {
|
|
265
265
|
"@chakra-ui/live-region": "^2.1.0",
|
|
266
|
-
"@mittwald/react-tunnel": "^0.1.0-alpha.
|
|
266
|
+
"@mittwald/react-tunnel": "^0.1.0-alpha.135",
|
|
267
267
|
"@mittwald/react-use-promise": "^2.3.13",
|
|
268
268
|
"@react-aria/utils": "^3.24.1",
|
|
269
269
|
"@react-types/shared": "^3.23.1",
|
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
},
|
|
288
288
|
"devDependencies": {
|
|
289
289
|
"@faker-js/faker": "^8.4.1",
|
|
290
|
-
"@mittwald/flow-design-tokens": "^0.1.0-alpha.
|
|
290
|
+
"@mittwald/flow-design-tokens": "^0.1.0-alpha.135",
|
|
291
291
|
"@mittwald/react-use-promise": "^2.3.13",
|
|
292
292
|
"@nx/storybook": "^19.1.2",
|
|
293
293
|
"@storybook/addon-a11y": "^8.1.5",
|
|
@@ -363,5 +363,5 @@
|
|
|
363
363
|
"optional": true
|
|
364
364
|
}
|
|
365
365
|
},
|
|
366
|
-
"gitHead": "
|
|
366
|
+
"gitHead": "87accf852bfa7e823d10f74d2100ed4091d00c58"
|
|
367
367
|
}
|
|
@@ -1,68 +0,0 @@
|
|
|
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
|
-
};
|