@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.
@@ -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(4);
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] === Symbol.for("react.memo_cache_sentinel")) {
10
- t0 = 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");
11
- $[0] = t0;
12
- } else t0 = $[0];
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 ($[1] !== props || $[2] !== testId) {
15
- t1 = /*#__PURE__*/ jsx("p", {
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: t0
32
+ className: t1
20
33
  });
21
- $[1] = props;
22
- $[2] = testId;
23
- $[3] = t1;
24
- } else t1 = $[3];
25
- return t1;
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(11);
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
- if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
24
- t1 = cn("flex gap-4 text-text-danger");
25
- t2 = /*#__PURE__*/ jsx(OctagonAlert, {
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
- $[3] = t1;
30
- $[4] = t2;
47
+ $[8] = t2;
48
+ $[9] = t3;
31
49
  } else {
32
- t1 = $[3];
33
- t2 = $[4];
50
+ t2 = $[8];
51
+ t3 = $[9];
34
52
  }
35
- let t3;
36
- if ($[5] !== children) {
37
- t3 = /*#__PURE__*/ jsx(Text, {
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
- $[5] = children;
43
- $[6] = t3;
44
- } else t3 = $[6];
45
- let t4;
46
- if ($[7] !== props || $[8] !== t3 || $[9] !== testId) {
47
- t4 = /*#__PURE__*/ jsxs("div", {
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: t1,
71
+ className: t2,
53
72
  children: [
54
- t2,
55
- t3
73
+ t3,
74
+ t4
56
75
  ]
57
76
  });
58
- $[7] = props;
59
- $[8] = t3;
60
- $[9] = testId;
61
- $[10] = t4;
62
- } else t4 = $[10];
63
- return t4;
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(11);
9
- const { className, error: t1, size: t2, disabled: t3, ref, ...props } = t0;
10
- const error = void 0 === t1 ? false : t1;
11
- const size = void 0 === t2 ? "default" : t2;
12
- const disabled = void 0 === t3 ? false : t3;
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 mergedProps = mergeProps(field?.getInputProps(), props);
15
- let t4;
16
- if ($[0] !== className || $[1] !== error || $[2] !== size) {
17
- t4 = cn(inputVariants({
18
- error,
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
- $[0] = className;
22
- $[1] = error;
23
- $[2] = size;
24
- $[3] = t4;
25
- } else t4 = $[3];
26
- const t5 = Boolean(error);
27
- let t6;
28
- if ($[4] !== disabled || $[5] !== mergedProps || $[6] !== props || $[7] !== ref || $[8] !== t4 || $[9] !== t5) {
29
- t6 = /*#__PURE__*/ jsx("input", {
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: t4,
33
- disabled: disabled,
34
- "aria-invalid": t5,
35
- "aria-disabled": 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
- $[4] = disabled;
40
- $[5] = mergedProps;
41
- $[6] = props;
42
- $[7] = ref;
43
- $[8] = t4;
44
- $[9] = t5;
45
- $[10] = t6;
46
- } else t6 = $[10];
47
- return t6;
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: t1, size: t2, defaultValue: t3, ...props } = t0);
15
+ ({ error, size: t1, defaultValue: t2, ...props } = t0);
15
16
  $[0] = t0;
16
- $[1] = props;
17
- $[2] = t1;
18
- $[3] = t2;
19
- $[4] = t3;
17
+ $[1] = error;
18
+ $[2] = props;
19
+ $[3] = t1;
20
+ $[4] = t2;
20
21
  } else {
21
- props = $[1];
22
- t1 = $[2];
23
- t2 = $[3];
24
- t3 = $[4];
22
+ error = $[1];
23
+ props = $[2];
24
+ t1 = $[3];
25
+ t2 = $[4];
25
26
  }
26
- const error = void 0 === t1 ? false : t1;
27
- const size = void 0 === t2 ? "default" : t2;
28
- const defaultValue = void 0 === t3 ? "0" : t3;
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] !== error || $[29] !== props || $[30] !== t14 || $[31] !== t4 || $[32] !== t6) {
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: error,
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] = error;
133
- $[29] = props;
134
- $[30] = t14;
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: t1, size: t2, error: t3, className, ref, "data-testid": testId, ...props } = t0);
22
+ ({ disabled, size: t1, error, className, ref, "data-testid": testId, ...props } = t0);
22
23
  $[0] = t0;
23
24
  $[1] = className;
24
- $[2] = props;
25
- $[3] = ref;
26
- $[4] = t1;
27
- $[5] = t2;
28
- $[6] = t3;
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
- props = $[2];
33
- ref = $[3];
34
- t1 = $[4];
35
- t2 = $[5];
36
- t3 = $[6];
33
+ disabled = $[2];
34
+ error = $[3];
35
+ props = $[4];
36
+ ref = $[5];
37
+ t1 = $[6];
37
38
  testId = $[7];
38
39
  }
39
- const disabled = void 0 === t1 ? false : t1;
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
- let t4;
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
- t4 = ()=>setVisible(_temp);
46
- $[8] = t4;
47
- } else t4 = $[8];
48
- const toggle = t4;
49
- const t5 = visible ? "text" : "password";
50
- let t6;
51
- if ($[9] !== disabled || $[10] !== error || $[11] !== props || $[12] !== ref || $[13] !== size || $[14] !== t5) {
52
- t6 = /*#__PURE__*/ jsx(Input, {
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: t5,
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] = t5;
66
- $[15] = t6;
67
- } else t6 = $[15];
68
- const t7 = visible ? "Hide password" : "Show password";
69
- let t8;
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
- t8 = visible ? /*#__PURE__*/ jsx(EyeOff, {
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] = t8;
80
- } else t8 = $[17];
81
- let t9;
82
- if ($[18] !== disabled || $[19] !== t7 || $[20] !== t8) {
83
- t9 = /*#__PURE__*/ jsx(TooltipTrigger, {
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: disabled,
89
- "aria-label": t7,
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: t8
93
+ children: t6
93
94
  })
94
95
  });
95
- $[18] = disabled;
96
- $[19] = t7;
97
- $[20] = t8;
98
- $[21] = t9;
99
- } else t9 = $[21];
100
- const t10 = visible ? "Hide password" : "Show password";
101
- let t11;
102
- if ($[22] !== t10) {
103
- t11 = /*#__PURE__*/ jsx(TooltipContent, {
104
- children: t10
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] = t10;
107
- $[23] = t11;
108
- } else t11 = $[23];
109
- let t12;
110
- if ($[24] !== t11 || $[25] !== t9) {
111
- t12 = /*#__PURE__*/ jsx(InputGroupAddon, {
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
- t9,
116
- t11
116
+ t7,
117
+ t9
117
118
  ]
118
119
  })
119
120
  });
120
- $[24] = t11;
121
+ $[24] = t7;
121
122
  $[25] = t9;
122
- $[26] = t12;
123
- } else t12 = $[26];
124
- let t13;
125
- if ($[27] !== className || $[28] !== size || $[29] !== t12 || $[30] !== t6 || $[31] !== testId) {
126
- t13 = /*#__PURE__*/ jsxs(InputGroup, {
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
- t6,
133
- t12
133
+ t4,
134
+ t10
134
135
  ]
135
136
  });
136
137
  $[27] = className;
137
138
  $[28] = size;
138
- $[29] = t12;
139
- $[30] = t6;
139
+ $[29] = t10;
140
+ $[30] = t4;
140
141
  $[31] = testId;
141
- $[32] = t13;
142
- } else t13 = $[32];
143
- return t13;
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: t1, disabled: t2, size: t3, minRows, maxRows, ref, ...props } = t0);
20
+ ({ error, disabled, size: t1, minRows, maxRows, ref, ...props } = t0);
22
21
  $[0] = t0;
23
- $[1] = maxRows;
24
- $[2] = minRows;
25
- $[3] = props;
26
- $[4] = ref;
27
- $[5] = t1;
28
- $[6] = t2;
29
- $[7] = t3;
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
- maxRows = $[1];
32
- minRows = $[2];
33
- props = $[3];
34
- ref = $[4];
35
- t1 = $[5];
36
- t2 = $[6];
37
- t3 = $[7];
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 error = void 0 === t1 ? false : t1;
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
- let t4;
44
- if ($[8] !== field) {
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 t5;
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
- t5 = composeRefs(autoResizeRef, ref);
53
+ t3 = composeRefs(autoResizeRef, ref);
56
54
  $[10] = autoResizeRef;
57
55
  $[11] = ref;
58
- $[12] = t5;
59
- } else t5 = $[12];
60
- const t6 = Boolean(error);
61
- let t7;
56
+ $[12] = t3;
57
+ } else t3 = $[12];
58
+ let t4;
62
59
  if ($[13] !== adjustHeight || $[14] !== autoResize || $[15] !== props) {
63
- t7 = autoResize && {
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] = t7;
73
- } else t7 = $[16];
74
- let t8;
75
- if ($[17] !== autoResize || $[18] !== error || $[19] !== size) {
76
- t8 = cn(inputVariants({
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] = error;
81
+ $[18] = invalid;
85
82
  $[19] = size;
86
- $[20] = t8;
87
- } else t8 = $[20];
88
- let t9;
89
- if ($[21] !== disabled || $[22] !== effectiveMinRows || $[23] !== mergedProps || $[24] !== props || $[25] !== t5 || $[26] !== t6 || $[27] !== t7 || $[28] !== t8) {
90
- t9 = /*#__PURE__*/ jsx("textarea", {
91
- ...mergedProps,
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: t5,
94
- disabled: disabled,
95
- "aria-invalid": t6,
96
- "aria-disabled": disabled,
90
+ ref: t3,
91
+ disabled: isDisabled,
92
+ "aria-invalid": invalid,
93
+ "aria-disabled": isDisabled,
97
94
  rows: effectiveMinRows,
98
- ...t7,
99
- className: t8
95
+ ...t4,
96
+ className: t5
100
97
  });
101
- $[21] = disabled;
102
- $[22] = effectiveMinRows;
103
- $[23] = mergedProps;
98
+ $[21] = effectiveMinRows;
99
+ $[22] = invalid;
100
+ $[23] = isDisabled;
104
101
  $[24] = props;
105
- $[25] = t5;
106
- $[26] = t6;
107
- $[27] = t7;
108
- $[28] = t8;
109
- $[29] = t9;
110
- } else t9 = $[29];
111
- let t10;
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
- t10 = !autoResize && /*#__PURE__*/ jsx(SvgIcon, {
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] = t10;
124
- } else t10 = $[31];
125
- let t11;
126
- if ($[32] !== t10 || $[33] !== t9) {
127
- t11 = /*#__PURE__*/ jsxs("div", {
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
- t9,
132
- t10
128
+ t6,
129
+ t7
133
130
  ]
134
131
  });
135
- $[32] = t10;
136
- $[33] = t9;
137
- $[34] = t11;
138
- } else t11 = $[34];
139
- return t11;
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 { useCallback, useRef, useState } from "react";
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 { current: isControlled } = useRef(void 0 !== controlled);
6
+ const [isControlled] = useState(void 0 !== controlled);
5
7
  const [valueState, setValue] = useState(defaultProp);
6
8
  const value = isControlled ? controlled : valueState;
7
- const setValueIfUncontrolled = useCallback((newValue)=>{
8
- if (!isControlled) setValue(newValue);
9
- }, []);
10
- return [
11
- value,
12
- setValueIfUncontrolled
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-13T06:56:33.160Z",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallarm-org/design-system",
3
- "version": "4.16.1-rc-fix-table-row-dnd-keyboard.1",
3
+ "version": "4.16.1",
4
4
  "description": "Core design system library with React components and Storybook documentation",
5
5
  "publishConfig": {
6
6
  "access": "public",