@wallarm-org/design-system 4.16.1-rc-fix-table-row-dnd-keyboard.1 → 4.16.1
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/components/Field/FieldDescription.js +27 -13
- package/dist/components/Field/FieldError.js +46 -26
- package/dist/components/Input/Input.js +59 -34
- package/dist/components/NumberInput/NumberInput.js +20 -18
- package/dist/components/PasswordInput/PasswordInput.js +72 -71
- package/dist/components/Textarea/Textarea.js +74 -77
- package/dist/hooks/useControlled.js +24 -9
- package/dist/metadata/components.json +8 -15
- package/package.json +1 -1
|
@@ -1,28 +1,42 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { useFieldContext } from "@ark-ui/react/field";
|
|
4
|
+
import { useFieldsetContext } from "@ark-ui/react/fieldset";
|
|
3
5
|
import { cn } from "../../utils/cn.js";
|
|
4
6
|
import { useTestId } from "../../utils/testId.js";
|
|
5
7
|
const FieldDescription = (props)=>{
|
|
6
|
-
const $ = c(
|
|
8
|
+
const $ = c(8);
|
|
7
9
|
const testId = useTestId("description");
|
|
10
|
+
const field = useFieldContext();
|
|
11
|
+
const fieldset = useFieldsetContext();
|
|
8
12
|
let t0;
|
|
9
|
-
if ($[0]
|
|
10
|
-
t0 =
|
|
11
|
-
$[0] =
|
|
12
|
-
|
|
13
|
+
if ($[0] !== field || $[1] !== fieldset) {
|
|
14
|
+
t0 = (field ?? fieldset)?.getHelperTextProps();
|
|
15
|
+
$[0] = field;
|
|
16
|
+
$[1] = fieldset;
|
|
17
|
+
$[2] = t0;
|
|
18
|
+
} else t0 = $[2];
|
|
19
|
+
const helperTextProps = t0;
|
|
13
20
|
let t1;
|
|
14
|
-
if ($[
|
|
15
|
-
t1 =
|
|
21
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
22
|
+
t1 = cn("text-text-secondary text-sm font-normal leading-normal group-has-[[data-orientation=horizontal]]/field:text-balance", "nth-last-2:-mt-1 last:mt-0 [[data-variant=legend]+&]:mb-16");
|
|
23
|
+
$[3] = t1;
|
|
24
|
+
} else t1 = $[3];
|
|
25
|
+
let t2;
|
|
26
|
+
if ($[4] !== helperTextProps || $[5] !== props || $[6] !== testId) {
|
|
27
|
+
t2 = /*#__PURE__*/ jsx("p", {
|
|
28
|
+
...helperTextProps,
|
|
16
29
|
...props,
|
|
17
30
|
"data-testid": testId,
|
|
18
31
|
"data-slot": "field-description",
|
|
19
|
-
className:
|
|
32
|
+
className: t1
|
|
20
33
|
});
|
|
21
|
-
$[
|
|
22
|
-
$[
|
|
23
|
-
$[
|
|
24
|
-
|
|
25
|
-
|
|
34
|
+
$[4] = helperTextProps;
|
|
35
|
+
$[5] = props;
|
|
36
|
+
$[6] = testId;
|
|
37
|
+
$[7] = t2;
|
|
38
|
+
} else t2 = $[7];
|
|
39
|
+
return t2;
|
|
26
40
|
};
|
|
27
41
|
FieldDescription.displayName = "FieldDescription";
|
|
28
42
|
export { FieldDescription };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { useFieldContext } from "@ark-ui/react/field";
|
|
4
|
+
import { useFieldsetContext } from "@ark-ui/react/fieldset";
|
|
3
5
|
import { OctagonAlert } from "../../icons/index.js";
|
|
4
6
|
import { cn } from "../../utils/cn.js";
|
|
5
7
|
import { useTestId } from "../../utils/testId.js";
|
|
6
8
|
import { Text } from "../Text/index.js";
|
|
7
9
|
const FieldError = (t0)=>{
|
|
8
|
-
const $ = c(
|
|
10
|
+
const $ = c(17);
|
|
9
11
|
let children;
|
|
10
12
|
let props;
|
|
11
13
|
if ($[0] !== t0) {
|
|
@@ -18,49 +20,67 @@ const FieldError = (t0)=>{
|
|
|
18
20
|
props = $[2];
|
|
19
21
|
}
|
|
20
22
|
const testId = useTestId("error");
|
|
23
|
+
const field = useFieldContext();
|
|
24
|
+
const fieldset = useFieldsetContext();
|
|
21
25
|
let t1;
|
|
26
|
+
if ($[3] !== field || $[4] !== fieldset) {
|
|
27
|
+
t1 = (field ?? fieldset)?.getErrorTextProps() ?? {};
|
|
28
|
+
$[3] = field;
|
|
29
|
+
$[4] = fieldset;
|
|
30
|
+
$[5] = t1;
|
|
31
|
+
} else t1 = $[5];
|
|
32
|
+
let errorTextProps;
|
|
33
|
+
if ($[6] !== t1) {
|
|
34
|
+
const { "aria-live": _ariaLive, ...t2 } = t1;
|
|
35
|
+
errorTextProps = t2;
|
|
36
|
+
$[6] = t1;
|
|
37
|
+
$[7] = errorTextProps;
|
|
38
|
+
} else errorTextProps = $[7];
|
|
22
39
|
let t2;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
t2 =
|
|
40
|
+
let t3;
|
|
41
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
42
|
+
t2 = cn("flex gap-4 text-text-danger");
|
|
43
|
+
t3 = /*#__PURE__*/ jsx(OctagonAlert, {
|
|
26
44
|
size: "md",
|
|
27
45
|
className: "self-start my-2"
|
|
28
46
|
});
|
|
29
|
-
$[
|
|
30
|
-
$[
|
|
47
|
+
$[8] = t2;
|
|
48
|
+
$[9] = t3;
|
|
31
49
|
} else {
|
|
32
|
-
|
|
33
|
-
|
|
50
|
+
t2 = $[8];
|
|
51
|
+
t3 = $[9];
|
|
34
52
|
}
|
|
35
|
-
let
|
|
36
|
-
if ($[
|
|
37
|
-
|
|
53
|
+
let t4;
|
|
54
|
+
if ($[10] !== children) {
|
|
55
|
+
t4 = /*#__PURE__*/ jsx(Text, {
|
|
38
56
|
size: "sm",
|
|
39
57
|
color: "danger",
|
|
40
58
|
children: children
|
|
41
59
|
});
|
|
42
|
-
$[
|
|
43
|
-
$[
|
|
44
|
-
} else
|
|
45
|
-
let
|
|
46
|
-
if ($[
|
|
47
|
-
|
|
60
|
+
$[10] = children;
|
|
61
|
+
$[11] = t4;
|
|
62
|
+
} else t4 = $[11];
|
|
63
|
+
let t5;
|
|
64
|
+
if ($[12] !== errorTextProps || $[13] !== props || $[14] !== t4 || $[15] !== testId) {
|
|
65
|
+
t5 = /*#__PURE__*/ jsxs("div", {
|
|
66
|
+
...errorTextProps,
|
|
48
67
|
...props,
|
|
49
68
|
"data-testid": testId,
|
|
50
69
|
role: "alert",
|
|
51
70
|
"data-slot": "field-error",
|
|
52
|
-
className:
|
|
71
|
+
className: t2,
|
|
53
72
|
children: [
|
|
54
|
-
|
|
55
|
-
|
|
73
|
+
t3,
|
|
74
|
+
t4
|
|
56
75
|
]
|
|
57
76
|
});
|
|
58
|
-
$[
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
61
|
-
$[
|
|
62
|
-
|
|
63
|
-
|
|
77
|
+
$[12] = errorTextProps;
|
|
78
|
+
$[13] = props;
|
|
79
|
+
$[14] = t4;
|
|
80
|
+
$[15] = testId;
|
|
81
|
+
$[16] = t5;
|
|
82
|
+
} else t5 = $[16];
|
|
83
|
+
return t5;
|
|
64
84
|
};
|
|
65
85
|
FieldError.displayName = "FieldError";
|
|
66
86
|
export { FieldError };
|
|
@@ -1,50 +1,75 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useFieldContext } from "@ark-ui/react/field";
|
|
4
|
-
import { mergeProps } from "@ark-ui/react/utils";
|
|
5
4
|
import { cn } from "../../utils/cn.js";
|
|
6
5
|
import { inputVariants } from "./classes.js";
|
|
7
6
|
const Input = (t0)=>{
|
|
8
|
-
const $ = c(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
const $ = c(20);
|
|
8
|
+
let className;
|
|
9
|
+
let disabled;
|
|
10
|
+
let error;
|
|
11
|
+
let props;
|
|
12
|
+
let ref;
|
|
13
|
+
let t1;
|
|
14
|
+
if ($[0] !== t0) {
|
|
15
|
+
({ className, error, size: t1, disabled, ref, ...props } = t0);
|
|
16
|
+
$[0] = t0;
|
|
17
|
+
$[1] = className;
|
|
18
|
+
$[2] = disabled;
|
|
19
|
+
$[3] = error;
|
|
20
|
+
$[4] = props;
|
|
21
|
+
$[5] = ref;
|
|
22
|
+
$[6] = t1;
|
|
23
|
+
} else {
|
|
24
|
+
className = $[1];
|
|
25
|
+
disabled = $[2];
|
|
26
|
+
error = $[3];
|
|
27
|
+
props = $[4];
|
|
28
|
+
ref = $[5];
|
|
29
|
+
t1 = $[6];
|
|
30
|
+
}
|
|
31
|
+
const size = void 0 === t1 ? "default" : t1;
|
|
13
32
|
const field = useFieldContext();
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
33
|
+
const invalid = error ?? field?.invalid ?? false;
|
|
34
|
+
const isDisabled = disabled ?? field?.disabled ?? false;
|
|
35
|
+
let t2;
|
|
36
|
+
if ($[7] !== field) {
|
|
37
|
+
t2 = field?.getInputProps();
|
|
38
|
+
$[7] = field;
|
|
39
|
+
$[8] = t2;
|
|
40
|
+
} else t2 = $[8];
|
|
41
|
+
let t3;
|
|
42
|
+
if ($[9] !== className || $[10] !== invalid || $[11] !== size) {
|
|
43
|
+
t3 = cn(inputVariants({
|
|
44
|
+
error: invalid,
|
|
19
45
|
size
|
|
20
46
|
}), className);
|
|
21
|
-
$[
|
|
22
|
-
$[
|
|
23
|
-
$[
|
|
24
|
-
$[
|
|
25
|
-
} else
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
...mergedProps,
|
|
47
|
+
$[9] = className;
|
|
48
|
+
$[10] = invalid;
|
|
49
|
+
$[11] = size;
|
|
50
|
+
$[12] = t3;
|
|
51
|
+
} else t3 = $[12];
|
|
52
|
+
let t4;
|
|
53
|
+
if ($[13] !== invalid || $[14] !== isDisabled || $[15] !== props || $[16] !== ref || $[17] !== t2 || $[18] !== t3) {
|
|
54
|
+
t4 = /*#__PURE__*/ jsx("input", {
|
|
55
|
+
...t2,
|
|
31
56
|
...props,
|
|
32
|
-
className:
|
|
33
|
-
disabled:
|
|
34
|
-
"aria-invalid":
|
|
35
|
-
"aria-disabled":
|
|
57
|
+
className: t3,
|
|
58
|
+
disabled: isDisabled,
|
|
59
|
+
"aria-invalid": invalid,
|
|
60
|
+
"aria-disabled": isDisabled,
|
|
36
61
|
ref: ref,
|
|
37
62
|
"data-slot": "input"
|
|
38
63
|
});
|
|
39
|
-
$[
|
|
40
|
-
$[
|
|
41
|
-
$[
|
|
42
|
-
$[
|
|
43
|
-
$[
|
|
44
|
-
$[
|
|
45
|
-
$[
|
|
46
|
-
} else
|
|
47
|
-
return
|
|
64
|
+
$[13] = invalid;
|
|
65
|
+
$[14] = isDisabled;
|
|
66
|
+
$[15] = props;
|
|
67
|
+
$[16] = ref;
|
|
68
|
+
$[17] = t2;
|
|
69
|
+
$[18] = t3;
|
|
70
|
+
$[19] = t4;
|
|
71
|
+
} else t4 = $[19];
|
|
72
|
+
return t4;
|
|
48
73
|
};
|
|
49
74
|
Input.displayName = "Input";
|
|
50
75
|
export { Input };
|
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { useFieldContext } from "@ark-ui/react/field";
|
|
3
4
|
import { NumberInput } from "@ark-ui/react/number-input";
|
|
4
5
|
import { ChevronDown, ChevronUp } from "../../icons/index.js";
|
|
5
6
|
import { cn } from "../../utils/cn.js";
|
|
6
7
|
import { numberInputControlVariants, numberInputFieldVariants, numberInputRootVariants, numberInputTriggerVariants } from "./classes.js";
|
|
7
8
|
const NumberInput_NumberInput = (t0)=>{
|
|
8
9
|
const $ = c(34);
|
|
10
|
+
let error;
|
|
9
11
|
let props;
|
|
10
12
|
let t1;
|
|
11
13
|
let t2;
|
|
12
|
-
let t3;
|
|
13
14
|
if ($[0] !== t0) {
|
|
14
|
-
({ error
|
|
15
|
+
({ error, size: t1, defaultValue: t2, ...props } = t0);
|
|
15
16
|
$[0] = t0;
|
|
16
|
-
$[1] =
|
|
17
|
-
$[2] =
|
|
18
|
-
$[3] =
|
|
19
|
-
$[4] =
|
|
17
|
+
$[1] = error;
|
|
18
|
+
$[2] = props;
|
|
19
|
+
$[3] = t1;
|
|
20
|
+
$[4] = t2;
|
|
20
21
|
} else {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
error = $[1];
|
|
23
|
+
props = $[2];
|
|
24
|
+
t1 = $[3];
|
|
25
|
+
t2 = $[4];
|
|
25
26
|
}
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
27
|
+
const size = void 0 === t1 ? "default" : t1;
|
|
28
|
+
const defaultValue = void 0 === t2 ? "0" : t2;
|
|
29
|
+
const field = useFieldContext();
|
|
30
|
+
const t3 = error ?? field?.invalid;
|
|
29
31
|
let t4;
|
|
30
32
|
if ($[5] !== size) {
|
|
31
33
|
t4 = numberInputRootVariants({
|
|
@@ -117,10 +119,10 @@ const NumberInput_NumberInput = (t0)=>{
|
|
|
117
119
|
$[26] = t14;
|
|
118
120
|
} else t14 = $[26];
|
|
119
121
|
let t15;
|
|
120
|
-
if ($[27] !== defaultValue || $[28] !==
|
|
122
|
+
if ($[27] !== defaultValue || $[28] !== props || $[29] !== t14 || $[30] !== t3 || $[31] !== t4 || $[32] !== t6) {
|
|
121
123
|
t15 = /*#__PURE__*/ jsxs(NumberInput.Root, {
|
|
122
124
|
...props,
|
|
123
|
-
invalid:
|
|
125
|
+
invalid: t3,
|
|
124
126
|
defaultValue: defaultValue,
|
|
125
127
|
className: t4,
|
|
126
128
|
children: [
|
|
@@ -129,9 +131,9 @@ const NumberInput_NumberInput = (t0)=>{
|
|
|
129
131
|
]
|
|
130
132
|
});
|
|
131
133
|
$[27] = defaultValue;
|
|
132
|
-
$[28] =
|
|
133
|
-
$[29] =
|
|
134
|
-
$[30] =
|
|
134
|
+
$[28] = props;
|
|
135
|
+
$[29] = t14;
|
|
136
|
+
$[30] = t3;
|
|
135
137
|
$[31] = t4;
|
|
136
138
|
$[32] = t6;
|
|
137
139
|
$[33] = t15;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useState } from "react";
|
|
4
|
+
import { useFieldContext } from "@ark-ui/react/field";
|
|
4
5
|
import { Eye, EyeOff } from "../../icons/index.js";
|
|
5
6
|
import { Input } from "../Input/index.js";
|
|
6
7
|
import { InputGroup } from "../InputGroup/InputGroup.js";
|
|
@@ -11,47 +12,47 @@ import { TooltipTrigger } from "../Tooltip/TooltipTrigger.js";
|
|
|
11
12
|
const PasswordInput = (t0)=>{
|
|
12
13
|
const $ = c(33);
|
|
13
14
|
let className;
|
|
15
|
+
let disabled;
|
|
16
|
+
let error;
|
|
14
17
|
let props;
|
|
15
18
|
let ref;
|
|
16
19
|
let t1;
|
|
17
|
-
let t2;
|
|
18
|
-
let t3;
|
|
19
20
|
let testId;
|
|
20
21
|
if ($[0] !== t0) {
|
|
21
|
-
({ disabled
|
|
22
|
+
({ disabled, size: t1, error, className, ref, "data-testid": testId, ...props } = t0);
|
|
22
23
|
$[0] = t0;
|
|
23
24
|
$[1] = className;
|
|
24
|
-
$[2] =
|
|
25
|
-
$[3] =
|
|
26
|
-
$[4] =
|
|
27
|
-
$[5] =
|
|
28
|
-
$[6] =
|
|
25
|
+
$[2] = disabled;
|
|
26
|
+
$[3] = error;
|
|
27
|
+
$[4] = props;
|
|
28
|
+
$[5] = ref;
|
|
29
|
+
$[6] = t1;
|
|
29
30
|
$[7] = testId;
|
|
30
31
|
} else {
|
|
31
32
|
className = $[1];
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
disabled = $[2];
|
|
34
|
+
error = $[3];
|
|
35
|
+
props = $[4];
|
|
36
|
+
ref = $[5];
|
|
37
|
+
t1 = $[6];
|
|
37
38
|
testId = $[7];
|
|
38
39
|
}
|
|
39
|
-
const
|
|
40
|
-
const size = void 0 === t2 ? "default" : t2;
|
|
41
|
-
const error = void 0 === t3 ? false : t3;
|
|
40
|
+
const size = void 0 === t1 ? "default" : t1;
|
|
42
41
|
const [visible, setVisible] = useState(false);
|
|
43
|
-
|
|
42
|
+
const field = useFieldContext();
|
|
43
|
+
const isDisabled = disabled ?? field?.disabled ?? false;
|
|
44
|
+
let t2;
|
|
44
45
|
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
45
|
-
|
|
46
|
-
$[8] =
|
|
47
|
-
} else
|
|
48
|
-
const toggle =
|
|
49
|
-
const
|
|
50
|
-
let
|
|
51
|
-
if ($[9] !== disabled || $[10] !== error || $[11] !== props || $[12] !== ref || $[13] !== size || $[14] !==
|
|
52
|
-
|
|
46
|
+
t2 = ()=>setVisible(_temp);
|
|
47
|
+
$[8] = t2;
|
|
48
|
+
} else t2 = $[8];
|
|
49
|
+
const toggle = t2;
|
|
50
|
+
const t3 = visible ? "text" : "password";
|
|
51
|
+
let t4;
|
|
52
|
+
if ($[9] !== disabled || $[10] !== error || $[11] !== props || $[12] !== ref || $[13] !== size || $[14] !== t3) {
|
|
53
|
+
t4 = /*#__PURE__*/ jsx(Input, {
|
|
53
54
|
...props,
|
|
54
|
-
type:
|
|
55
|
+
type: t3,
|
|
55
56
|
disabled: disabled,
|
|
56
57
|
size: size,
|
|
57
58
|
error: error,
|
|
@@ -62,13 +63,13 @@ const PasswordInput = (t0)=>{
|
|
|
62
63
|
$[11] = props;
|
|
63
64
|
$[12] = ref;
|
|
64
65
|
$[13] = size;
|
|
65
|
-
$[14] =
|
|
66
|
-
$[15] =
|
|
67
|
-
} else
|
|
68
|
-
const
|
|
69
|
-
let
|
|
66
|
+
$[14] = t3;
|
|
67
|
+
$[15] = t4;
|
|
68
|
+
} else t4 = $[15];
|
|
69
|
+
const t5 = visible ? "Hide password" : "Show password";
|
|
70
|
+
let t6;
|
|
70
71
|
if ($[16] !== visible) {
|
|
71
|
-
|
|
72
|
+
t6 = visible ? /*#__PURE__*/ jsx(EyeOff, {
|
|
72
73
|
size: "md",
|
|
73
74
|
className: "text-icon-secondary"
|
|
74
75
|
}) : /*#__PURE__*/ jsx(Eye, {
|
|
@@ -76,71 +77,71 @@ const PasswordInput = (t0)=>{
|
|
|
76
77
|
className: "text-icon-secondary"
|
|
77
78
|
});
|
|
78
79
|
$[16] = visible;
|
|
79
|
-
$[17] =
|
|
80
|
-
} else
|
|
81
|
-
let
|
|
82
|
-
if ($[18] !==
|
|
83
|
-
|
|
80
|
+
$[17] = t6;
|
|
81
|
+
} else t6 = $[17];
|
|
82
|
+
let t7;
|
|
83
|
+
if ($[18] !== isDisabled || $[19] !== t5 || $[20] !== t6) {
|
|
84
|
+
t7 = /*#__PURE__*/ jsx(TooltipTrigger, {
|
|
84
85
|
asChild: true,
|
|
85
86
|
children: /*#__PURE__*/ jsx("button", {
|
|
86
87
|
type: "button",
|
|
87
88
|
tabIndex: -1,
|
|
88
|
-
disabled:
|
|
89
|
-
"aria-label":
|
|
89
|
+
disabled: isDisabled,
|
|
90
|
+
"aria-label": t5,
|
|
90
91
|
onClick: toggle,
|
|
91
92
|
className: "cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 flex",
|
|
92
|
-
children:
|
|
93
|
+
children: t6
|
|
93
94
|
})
|
|
94
95
|
});
|
|
95
|
-
$[18] =
|
|
96
|
-
$[19] =
|
|
97
|
-
$[20] =
|
|
98
|
-
$[21] =
|
|
99
|
-
} else
|
|
100
|
-
const
|
|
101
|
-
let
|
|
102
|
-
if ($[22] !==
|
|
103
|
-
|
|
104
|
-
children:
|
|
96
|
+
$[18] = isDisabled;
|
|
97
|
+
$[19] = t5;
|
|
98
|
+
$[20] = t6;
|
|
99
|
+
$[21] = t7;
|
|
100
|
+
} else t7 = $[21];
|
|
101
|
+
const t8 = visible ? "Hide password" : "Show password";
|
|
102
|
+
let t9;
|
|
103
|
+
if ($[22] !== t8) {
|
|
104
|
+
t9 = /*#__PURE__*/ jsx(TooltipContent, {
|
|
105
|
+
children: t8
|
|
105
106
|
});
|
|
106
|
-
$[22] =
|
|
107
|
-
$[23] =
|
|
108
|
-
} else
|
|
109
|
-
let
|
|
110
|
-
if ($[24] !==
|
|
111
|
-
|
|
107
|
+
$[22] = t8;
|
|
108
|
+
$[23] = t9;
|
|
109
|
+
} else t9 = $[23];
|
|
110
|
+
let t10;
|
|
111
|
+
if ($[24] !== t7 || $[25] !== t9) {
|
|
112
|
+
t10 = /*#__PURE__*/ jsx(InputGroupAddon, {
|
|
112
113
|
align: "inline-end",
|
|
113
114
|
children: /*#__PURE__*/ jsxs(Tooltip, {
|
|
114
115
|
children: [
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
t7,
|
|
117
|
+
t9
|
|
117
118
|
]
|
|
118
119
|
})
|
|
119
120
|
});
|
|
120
|
-
$[24] =
|
|
121
|
+
$[24] = t7;
|
|
121
122
|
$[25] = t9;
|
|
122
|
-
$[26] =
|
|
123
|
-
} else
|
|
124
|
-
let
|
|
125
|
-
if ($[27] !== className || $[28] !== size || $[29] !==
|
|
126
|
-
|
|
123
|
+
$[26] = t10;
|
|
124
|
+
} else t10 = $[26];
|
|
125
|
+
let t11;
|
|
126
|
+
if ($[27] !== className || $[28] !== size || $[29] !== t10 || $[30] !== t4 || $[31] !== testId) {
|
|
127
|
+
t11 = /*#__PURE__*/ jsxs(InputGroup, {
|
|
127
128
|
size: size,
|
|
128
129
|
className: className,
|
|
129
130
|
"data-slot": "password-input",
|
|
130
131
|
"data-testid": testId,
|
|
131
132
|
children: [
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
t4,
|
|
134
|
+
t10
|
|
134
135
|
]
|
|
135
136
|
});
|
|
136
137
|
$[27] = className;
|
|
137
138
|
$[28] = size;
|
|
138
|
-
$[29] =
|
|
139
|
-
$[30] =
|
|
139
|
+
$[29] = t10;
|
|
140
|
+
$[30] = t4;
|
|
140
141
|
$[31] = testId;
|
|
141
|
-
$[32] =
|
|
142
|
-
} else
|
|
143
|
-
return
|
|
142
|
+
$[32] = t11;
|
|
143
|
+
} else t11 = $[32];
|
|
144
|
+
return t11;
|
|
144
145
|
};
|
|
145
146
|
PasswordInput.displayName = "PasswordInput";
|
|
146
147
|
function _temp(prev) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useFieldContext } from "@ark-ui/react/field";
|
|
4
|
-
import { mergeProps } from "@ark-ui/react/utils";
|
|
5
4
|
import { composeRefs } from "@radix-ui/react-compose-refs";
|
|
6
5
|
import { SvgIcon } from "../../icons/SvgIcon.js";
|
|
7
6
|
import { cn } from "../../utils/cn.js";
|
|
@@ -10,57 +9,55 @@ import { textareaHeightVariants, textareaPaddingVariants } from "./classes.js";
|
|
|
10
9
|
import { useAutoResize } from "./useAutoResize.js";
|
|
11
10
|
const Textarea = (t0)=>{
|
|
12
11
|
const $ = c(35);
|
|
12
|
+
let disabled;
|
|
13
|
+
let error;
|
|
13
14
|
let maxRows;
|
|
14
15
|
let minRows;
|
|
15
16
|
let props;
|
|
16
17
|
let ref;
|
|
17
18
|
let t1;
|
|
18
|
-
let t2;
|
|
19
|
-
let t3;
|
|
20
19
|
if ($[0] !== t0) {
|
|
21
|
-
({ error
|
|
20
|
+
({ error, disabled, size: t1, minRows, maxRows, ref, ...props } = t0);
|
|
22
21
|
$[0] = t0;
|
|
23
|
-
$[1] =
|
|
24
|
-
$[2] =
|
|
25
|
-
$[3] =
|
|
26
|
-
$[4] =
|
|
27
|
-
$[5] =
|
|
28
|
-
$[6] =
|
|
29
|
-
$[7] =
|
|
22
|
+
$[1] = disabled;
|
|
23
|
+
$[2] = error;
|
|
24
|
+
$[3] = maxRows;
|
|
25
|
+
$[4] = minRows;
|
|
26
|
+
$[5] = props;
|
|
27
|
+
$[6] = ref;
|
|
28
|
+
$[7] = t1;
|
|
30
29
|
} else {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
disabled = $[1];
|
|
31
|
+
error = $[2];
|
|
32
|
+
maxRows = $[3];
|
|
33
|
+
minRows = $[4];
|
|
34
|
+
props = $[5];
|
|
35
|
+
ref = $[6];
|
|
36
|
+
t1 = $[7];
|
|
38
37
|
}
|
|
39
|
-
const
|
|
40
|
-
const disabled = void 0 === t2 ? false : t2;
|
|
41
|
-
const size = void 0 === t3 ? "default" : t3;
|
|
38
|
+
const size = void 0 === t1 ? "default" : t1;
|
|
42
39
|
const field = useFieldContext();
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
t4 = mergeProps(field?.getTextareaProps());
|
|
46
|
-
$[8] = field;
|
|
47
|
-
$[9] = t4;
|
|
48
|
-
} else t4 = $[9];
|
|
49
|
-
const mergedProps = t4;
|
|
40
|
+
const invalid = error ?? field?.invalid ?? false;
|
|
41
|
+
const isDisabled = disabled ?? field?.disabled ?? false;
|
|
50
42
|
const autoResize = null != maxRows;
|
|
51
43
|
const effectiveMinRows = minRows ?? (autoResize ? 1 : void 0);
|
|
52
44
|
const { ref: autoResizeRef, adjustHeight } = useAutoResize(autoResize, effectiveMinRows ?? 1, maxRows ?? 1, props.value);
|
|
53
|
-
let
|
|
45
|
+
let t2;
|
|
46
|
+
if ($[8] !== field) {
|
|
47
|
+
t2 = field?.getTextareaProps();
|
|
48
|
+
$[8] = field;
|
|
49
|
+
$[9] = t2;
|
|
50
|
+
} else t2 = $[9];
|
|
51
|
+
let t3;
|
|
54
52
|
if ($[10] !== autoResizeRef || $[11] !== ref) {
|
|
55
|
-
|
|
53
|
+
t3 = composeRefs(autoResizeRef, ref);
|
|
56
54
|
$[10] = autoResizeRef;
|
|
57
55
|
$[11] = ref;
|
|
58
|
-
$[12] =
|
|
59
|
-
} else
|
|
60
|
-
|
|
61
|
-
let t7;
|
|
56
|
+
$[12] = t3;
|
|
57
|
+
} else t3 = $[12];
|
|
58
|
+
let t4;
|
|
62
59
|
if ($[13] !== adjustHeight || $[14] !== autoResize || $[15] !== props) {
|
|
63
|
-
|
|
60
|
+
t4 = autoResize && {
|
|
64
61
|
onInput: (e)=>{
|
|
65
62
|
adjustHeight();
|
|
66
63
|
props.onInput?.(e);
|
|
@@ -69,48 +66,48 @@ const Textarea = (t0)=>{
|
|
|
69
66
|
$[13] = adjustHeight;
|
|
70
67
|
$[14] = autoResize;
|
|
71
68
|
$[15] = props;
|
|
72
|
-
$[16] =
|
|
73
|
-
} else
|
|
74
|
-
let
|
|
75
|
-
if ($[17] !== autoResize || $[18] !==
|
|
76
|
-
|
|
77
|
-
error
|
|
69
|
+
$[16] = t4;
|
|
70
|
+
} else t4 = $[16];
|
|
71
|
+
let t5;
|
|
72
|
+
if ($[17] !== autoResize || $[18] !== invalid || $[19] !== size) {
|
|
73
|
+
t5 = cn(inputVariants({
|
|
74
|
+
error: invalid
|
|
78
75
|
}), textareaPaddingVariants({
|
|
79
76
|
size
|
|
80
77
|
}), "[scrollbar-width:thin]", !autoResize && textareaHeightVariants({
|
|
81
78
|
size
|
|
82
79
|
}), autoResize && "resize-none");
|
|
83
80
|
$[17] = autoResize;
|
|
84
|
-
$[18] =
|
|
81
|
+
$[18] = invalid;
|
|
85
82
|
$[19] = size;
|
|
86
|
-
$[20] =
|
|
87
|
-
} else
|
|
88
|
-
let
|
|
89
|
-
if ($[21] !==
|
|
90
|
-
|
|
91
|
-
...
|
|
83
|
+
$[20] = t5;
|
|
84
|
+
} else t5 = $[20];
|
|
85
|
+
let t6;
|
|
86
|
+
if ($[21] !== effectiveMinRows || $[22] !== invalid || $[23] !== isDisabled || $[24] !== props || $[25] !== t2 || $[26] !== t3 || $[27] !== t4 || $[28] !== t5) {
|
|
87
|
+
t6 = /*#__PURE__*/ jsx("textarea", {
|
|
88
|
+
...t2,
|
|
92
89
|
...props,
|
|
93
|
-
ref:
|
|
94
|
-
disabled:
|
|
95
|
-
"aria-invalid":
|
|
96
|
-
"aria-disabled":
|
|
90
|
+
ref: t3,
|
|
91
|
+
disabled: isDisabled,
|
|
92
|
+
"aria-invalid": invalid,
|
|
93
|
+
"aria-disabled": isDisabled,
|
|
97
94
|
rows: effectiveMinRows,
|
|
98
|
-
...
|
|
99
|
-
className:
|
|
95
|
+
...t4,
|
|
96
|
+
className: t5
|
|
100
97
|
});
|
|
101
|
-
$[21] =
|
|
102
|
-
$[22] =
|
|
103
|
-
$[23] =
|
|
98
|
+
$[21] = effectiveMinRows;
|
|
99
|
+
$[22] = invalid;
|
|
100
|
+
$[23] = isDisabled;
|
|
104
101
|
$[24] = props;
|
|
105
|
-
$[25] =
|
|
106
|
-
$[26] =
|
|
107
|
-
$[27] =
|
|
108
|
-
$[28] =
|
|
109
|
-
$[29] =
|
|
110
|
-
} else
|
|
111
|
-
let
|
|
102
|
+
$[25] = t2;
|
|
103
|
+
$[26] = t3;
|
|
104
|
+
$[27] = t4;
|
|
105
|
+
$[28] = t5;
|
|
106
|
+
$[29] = t6;
|
|
107
|
+
} else t6 = $[29];
|
|
108
|
+
let t7;
|
|
112
109
|
if ($[30] !== autoResize) {
|
|
113
|
-
|
|
110
|
+
t7 = !autoResize && /*#__PURE__*/ jsx(SvgIcon, {
|
|
114
111
|
className: "w-12 h-12 absolute bottom-0 right-0 text-icon-secondary pointer-events-none",
|
|
115
112
|
viewBox: "0 0 12 12",
|
|
116
113
|
children: /*#__PURE__*/ jsx("path", {
|
|
@@ -120,23 +117,23 @@ const Textarea = (t0)=>{
|
|
|
120
117
|
})
|
|
121
118
|
});
|
|
122
119
|
$[30] = autoResize;
|
|
123
|
-
$[31] =
|
|
124
|
-
} else
|
|
125
|
-
let
|
|
126
|
-
if ($[32] !==
|
|
127
|
-
|
|
120
|
+
$[31] = t7;
|
|
121
|
+
} else t7 = $[31];
|
|
122
|
+
let t8;
|
|
123
|
+
if ($[32] !== t6 || $[33] !== t7) {
|
|
124
|
+
t8 = /*#__PURE__*/ jsxs("div", {
|
|
128
125
|
className: "relative",
|
|
129
126
|
"data-slot": "textarea",
|
|
130
127
|
children: [
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
t6,
|
|
129
|
+
t7
|
|
133
130
|
]
|
|
134
131
|
});
|
|
135
|
-
$[32] =
|
|
136
|
-
$[33] =
|
|
137
|
-
$[34] =
|
|
138
|
-
} else
|
|
139
|
-
return
|
|
132
|
+
$[32] = t6;
|
|
133
|
+
$[33] = t7;
|
|
134
|
+
$[34] = t8;
|
|
135
|
+
} else t8 = $[34];
|
|
136
|
+
return t8;
|
|
140
137
|
};
|
|
141
138
|
Textarea.displayName = "Textarea";
|
|
142
139
|
export { Textarea };
|
|
@@ -1,15 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
2
3
|
const useControlled = (props)=>{
|
|
4
|
+
const $ = c(5);
|
|
3
5
|
const { controlled, default: defaultProp } = props;
|
|
4
|
-
const
|
|
6
|
+
const [isControlled] = useState(void 0 !== controlled);
|
|
5
7
|
const [valueState, setValue] = useState(defaultProp);
|
|
6
8
|
const value = isControlled ? controlled : valueState;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
let t0;
|
|
10
|
+
if ($[0] !== isControlled) {
|
|
11
|
+
t0 = (newValue)=>{
|
|
12
|
+
if (!isControlled) setValue(newValue);
|
|
13
|
+
};
|
|
14
|
+
$[0] = isControlled;
|
|
15
|
+
$[1] = t0;
|
|
16
|
+
} else t0 = $[1];
|
|
17
|
+
const setValueIfUncontrolled = t0;
|
|
18
|
+
let t1;
|
|
19
|
+
if ($[2] !== setValueIfUncontrolled || $[3] !== value) {
|
|
20
|
+
t1 = [
|
|
21
|
+
value,
|
|
22
|
+
setValueIfUncontrolled
|
|
23
|
+
];
|
|
24
|
+
$[2] = setValueIfUncontrolled;
|
|
25
|
+
$[3] = value;
|
|
26
|
+
$[4] = t1;
|
|
27
|
+
} else t1 = $[4];
|
|
28
|
+
return t1;
|
|
14
29
|
};
|
|
15
30
|
export { useControlled };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "4.16.0",
|
|
3
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"generatedAt": "2026-11-13T08:25:03.533Z",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"name": "Accordion",
|
|
@@ -21651,8 +21651,7 @@
|
|
|
21651
21651
|
{
|
|
21652
21652
|
"name": "disabled",
|
|
21653
21653
|
"type": "boolean | undefined",
|
|
21654
|
-
"required": false
|
|
21655
|
-
"defaultValue": "false"
|
|
21654
|
+
"required": false
|
|
21656
21655
|
},
|
|
21657
21656
|
{
|
|
21658
21657
|
"name": "name",
|
|
@@ -21753,8 +21752,7 @@
|
|
|
21753
21752
|
{
|
|
21754
21753
|
"name": "error",
|
|
21755
21754
|
"type": "{ true: string; false: string; }",
|
|
21756
|
-
"required": false
|
|
21757
|
-
"defaultValue": "false"
|
|
21755
|
+
"required": false
|
|
21758
21756
|
},
|
|
21759
21757
|
{
|
|
21760
21758
|
"name": "data-testid",
|
|
@@ -25237,8 +25235,7 @@
|
|
|
25237
25235
|
{
|
|
25238
25236
|
"name": "error",
|
|
25239
25237
|
"type": "boolean | undefined",
|
|
25240
|
-
"required": false
|
|
25241
|
-
"defaultValue": "false"
|
|
25238
|
+
"required": false
|
|
25242
25239
|
},
|
|
25243
25240
|
{
|
|
25244
25241
|
"name": "data-testid",
|
|
@@ -27416,8 +27413,7 @@
|
|
|
27416
27413
|
{
|
|
27417
27414
|
"name": "disabled",
|
|
27418
27415
|
"type": "boolean | undefined",
|
|
27419
|
-
"required": false
|
|
27420
|
-
"defaultValue": "false"
|
|
27416
|
+
"required": false
|
|
27421
27417
|
},
|
|
27422
27418
|
{
|
|
27423
27419
|
"name": "name",
|
|
@@ -27473,8 +27469,7 @@
|
|
|
27473
27469
|
{
|
|
27474
27470
|
"name": "error",
|
|
27475
27471
|
"type": "{ true: string; false: string; }",
|
|
27476
|
-
"required": false
|
|
27477
|
-
"defaultValue": "false"
|
|
27472
|
+
"required": false
|
|
27478
27473
|
},
|
|
27479
27474
|
{
|
|
27480
27475
|
"name": "autoComplete",
|
|
@@ -41860,8 +41855,7 @@
|
|
|
41860
41855
|
{
|
|
41861
41856
|
"name": "disabled",
|
|
41862
41857
|
"type": "boolean | undefined",
|
|
41863
|
-
"required": false
|
|
41864
|
-
"defaultValue": "false"
|
|
41858
|
+
"required": false
|
|
41865
41859
|
},
|
|
41866
41860
|
{
|
|
41867
41861
|
"name": "name",
|
|
@@ -41912,8 +41906,7 @@
|
|
|
41912
41906
|
{
|
|
41913
41907
|
"name": "error",
|
|
41914
41908
|
"type": "{ true: string; false: string; }",
|
|
41915
|
-
"required": false
|
|
41916
|
-
"defaultValue": "false"
|
|
41909
|
+
"required": false
|
|
41917
41910
|
},
|
|
41918
41911
|
{
|
|
41919
41912
|
"name": "data-testid",
|
package/package.json
CHANGED