@fuf-stack/uniform 1.30.0 → 2.0.0-next.3

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.
Files changed (149) hide show
  1. package/README.md +0 -6
  2. package/dist/Checkboxes/index.d.mts +178 -274
  3. package/dist/Checkboxes/index.d.mts.map +1 -1
  4. package/dist/Checkboxes/index.mjs +294 -94
  5. package/dist/Checkboxes/index.mjs.map +1 -1
  6. package/dist/DatePicker/index.d.mts +1963 -148
  7. package/dist/DatePicker/index.d.mts.map +1 -1
  8. package/dist/DatePicker/index.mjs +401 -82
  9. package/dist/DatePicker/index.mjs.map +1 -1
  10. package/dist/FieldArray/index.d.mts +102 -97
  11. package/dist/FieldArray/index.d.mts.map +1 -1
  12. package/dist/FieldArray/index.mjs +340 -195
  13. package/dist/FieldArray/index.mjs.map +1 -1
  14. package/dist/FieldCard/index.d.mts +34 -34
  15. package/dist/FieldCard/index.d.mts.map +1 -1
  16. package/dist/FieldCard/index.mjs +181 -127
  17. package/dist/FieldCard/index.mjs.map +1 -1
  18. package/dist/{FieldCopyTestIdButton-Y9SfvaM9.mjs → FieldCopyTestIdButton-D3_jZYJ1.mjs} +4 -2
  19. package/dist/FieldCopyTestIdButton-D3_jZYJ1.mjs.map +1 -0
  20. package/dist/FieldDescription-X_0s1Lhu.mjs +35 -0
  21. package/dist/FieldDescription-X_0s1Lhu.mjs.map +1 -0
  22. package/dist/FieldLabel-DrNWJIVh.mjs +128 -0
  23. package/dist/FieldLabel-DrNWJIVh.mjs.map +1 -0
  24. package/dist/FieldLayout-DcvQU0zN.mjs +45 -0
  25. package/dist/FieldLayout-DcvQU0zN.mjs.map +1 -0
  26. package/dist/FieldReset/index.d.mts +17 -12
  27. package/dist/FieldReset/index.d.mts.map +1 -1
  28. package/dist/FieldReset/index.mjs +50 -33
  29. package/dist/FieldReset/index.mjs.map +1 -1
  30. package/dist/FieldValidationError-iAayfTEw.mjs +75 -0
  31. package/dist/FieldValidationError-iAayfTEw.mjs.map +1 -0
  32. package/dist/Form/index.d.mts +2 -2
  33. package/dist/Form/index.d.mts.map +1 -1
  34. package/dist/Form/index.mjs +9 -7
  35. package/dist/Form/index.mjs.map +1 -1
  36. package/dist/{FormContext-Dvt3MiKq.d.mts → FormContext-BnNJYZOo.d.mts} +3 -3
  37. package/dist/{FormContext-Dvt3MiKq.d.mts.map → FormContext-BnNJYZOo.d.mts.map} +1 -1
  38. package/dist/{FormContext-B8G_Xxd6.mjs → FormContext-PXkVlBdU.mjs} +6 -2
  39. package/dist/FormContext-PXkVlBdU.mjs.map +1 -0
  40. package/dist/Grid/index.mjs +1 -1
  41. package/dist/{Grid-Us2JFczS.mjs → Grid-DBL29Kwb.mjs} +4 -2
  42. package/dist/Grid-DBL29Kwb.mjs.map +1 -0
  43. package/dist/Input/index.d.mts +734 -47
  44. package/dist/Input/index.d.mts.map +1 -1
  45. package/dist/Input/index.mjs +411 -168
  46. package/dist/Input/index.mjs.map +1 -1
  47. package/dist/RadioBoxes/index.d.mts +300 -98
  48. package/dist/RadioBoxes/index.d.mts.map +1 -1
  49. package/dist/RadioBoxes/index.mjs +156 -119
  50. package/dist/RadioBoxes/index.mjs.map +1 -1
  51. package/dist/RadioTabs/index.d.mts +302 -76
  52. package/dist/RadioTabs/index.d.mts.map +1 -1
  53. package/dist/RadioTabs/index.mjs +274 -87
  54. package/dist/RadioTabs/index.mjs.map +1 -1
  55. package/dist/Radios/index.d.mts +314 -78
  56. package/dist/Radios/index.d.mts.map +1 -1
  57. package/dist/Radios/index.mjs +90 -44
  58. package/dist/Radios/index.mjs.map +1 -1
  59. package/dist/Select/index.d.mts +410 -142
  60. package/dist/Select/index.d.mts.map +1 -1
  61. package/dist/Select/index.mjs +284 -157
  62. package/dist/Select/index.mjs.map +1 -1
  63. package/dist/Slider/index.d.mts +382 -63
  64. package/dist/Slider/index.d.mts.map +1 -1
  65. package/dist/Slider/index.mjs +269 -90
  66. package/dist/Slider/index.mjs.map +1 -1
  67. package/dist/SubmitButton/index.d.mts.map +1 -1
  68. package/dist/SubmitButton/index.mjs +4 -1
  69. package/dist/SubmitButton/index.mjs.map +1 -1
  70. package/dist/Switch/index.d.mts +2 -427
  71. package/dist/Switch/index.mjs +167 -72
  72. package/dist/Switch/index.mjs.map +1 -1
  73. package/dist/Switch-Db2dpGz7.d.mts +648 -0
  74. package/dist/Switch-Db2dpGz7.d.mts.map +1 -0
  75. package/dist/SwitchBox/index.d.mts +191 -91
  76. package/dist/SwitchBox/index.d.mts.map +1 -1
  77. package/dist/SwitchBox/index.mjs +142 -88
  78. package/dist/SwitchBox/index.mjs.map +1 -1
  79. package/dist/TextArea/index.d.mts +347 -29
  80. package/dist/TextArea/index.d.mts.map +1 -1
  81. package/dist/TextArea/index.mjs +195 -47
  82. package/dist/TextArea/index.mjs.map +1 -1
  83. package/dist/Time/index.d.mts +1373 -139
  84. package/dist/Time/index.d.mts.map +1 -1
  85. package/dist/Time/index.mjs +160 -77
  86. package/dist/Time/index.mjs.map +1 -1
  87. package/dist/helpers/index.d.mts +1 -1
  88. package/dist/helpers/index.mjs +1 -1
  89. package/dist/helpers/index.mjs.map +1 -1
  90. package/dist/hooks/useClientValidation/index.mjs +1 -1
  91. package/dist/hooks/useController/index.d.mts +29 -2
  92. package/dist/hooks/useController/index.d.mts.map +1 -0
  93. package/dist/hooks/useController/index.mjs +1 -1
  94. package/dist/hooks/useFormContext/index.d.mts +44 -2
  95. package/dist/hooks/useFormContext/index.d.mts.map +1 -0
  96. package/dist/hooks/useFormContext/index.mjs +1 -1
  97. package/dist/hooks/useInputValueDebounce/index.d.mts +9 -3
  98. package/dist/hooks/useInputValueDebounce/index.d.mts.map +1 -1
  99. package/dist/hooks/useInputValueDebounce/index.mjs +27 -5
  100. package/dist/hooks/useInputValueDebounce/index.mjs.map +1 -1
  101. package/dist/hooks/useInputValueTransform/index.d.mts +1 -2
  102. package/dist/hooks/useInputValueTransform/index.mjs +1 -1
  103. package/dist/hooks/useWatchFormReset/index.mjs +1 -1
  104. package/dist/hooks/useWatchUserChange/index.mjs +1 -1
  105. package/dist/{useInputValueTransform-cevZBrIN.d.mts → index-cevZBrIN.d.mts} +1 -1
  106. package/dist/index-cevZBrIN.d.mts.map +1 -0
  107. package/dist/partials/FieldCopyTestIdButton/index.mjs +1 -1
  108. package/dist/partials/FieldValidationError/index.d.mts +637 -3
  109. package/dist/partials/FieldValidationError/index.d.mts.map +1 -1
  110. package/dist/partials/FieldValidationError/index.mjs +1 -1
  111. package/dist/radioControlVariants-BYRfaD6y.mjs +187 -0
  112. package/dist/radioControlVariants-BYRfaD6y.mjs.map +1 -0
  113. package/dist/switchVariants-D16b2VaT.mjs +67 -0
  114. package/dist/switchVariants-D16b2VaT.mjs.map +1 -0
  115. package/dist/timeVariants-CtXyNKmW.mjs +58 -0
  116. package/dist/timeVariants-CtXyNKmW.mjs.map +1 -0
  117. package/dist/{useController-CJjMqXU5.mjs → useController-JtIeurpw.mjs} +2 -2
  118. package/dist/{useController-CJjMqXU5.mjs.map → useController-JtIeurpw.mjs.map} +1 -1
  119. package/dist/{useFormContext-BEjPBdzb.mjs → useFormContext-piqnN2L-.mjs} +2 -2
  120. package/dist/{useFormContext-BEjPBdzb.mjs.map → useFormContext-piqnN2L-.mjs.map} +1 -1
  121. package/dist/{useInputValueTransform-D44BLp1Z.mjs → useInputValueTransform-CXWWFhy_.mjs} +2 -2
  122. package/dist/{useInputValueTransform-D44BLp1Z.mjs.map → useInputValueTransform-CXWWFhy_.mjs.map} +1 -1
  123. package/package.json +13 -25
  124. package/dist/FieldCopyTestIdButton-Y9SfvaM9.mjs.map +0 -1
  125. package/dist/FieldValidationError-BcUV0r1I.mjs +0 -48
  126. package/dist/FieldValidationError-BcUV0r1I.mjs.map +0 -1
  127. package/dist/FormContext-B8G_Xxd6.mjs.map +0 -1
  128. package/dist/Grid-Us2JFczS.mjs.map +0 -1
  129. package/dist/Switch/index.d.mts.map +0 -1
  130. package/dist/hooks/useInput/index.d.mts +0 -2
  131. package/dist/hooks/useInput/index.mjs +0 -5
  132. package/dist/hooks/useInput/index.mjs.map +0 -1
  133. package/dist/hooks/useUniformField/index.d.mts +0 -2
  134. package/dist/hooks/useUniformField/index.mjs +0 -141
  135. package/dist/hooks/useUniformField/index.mjs.map +0 -1
  136. package/dist/hooks/useUniformFieldArray/index.d.mts +0 -47
  137. package/dist/hooks/useUniformFieldArray/index.d.mts.map +0 -1
  138. package/dist/hooks/useUniformFieldArray/index.mjs +0 -99
  139. package/dist/hooks/useUniformFieldArray/index.mjs.map +0 -1
  140. package/dist/index-CaxrMD1A.d.mts +0 -1
  141. package/dist/index-DsB0_365.d.mts +0 -106
  142. package/dist/index-DsB0_365.d.mts.map +0 -1
  143. package/dist/useController-CdFEp-Wa.d.mts +0 -30
  144. package/dist/useController-CdFEp-Wa.d.mts.map +0 -1
  145. package/dist/useFormContext-BSSUZ0Md.d.mts +0 -45
  146. package/dist/useFormContext-BSSUZ0Md.d.mts.map +0 -1
  147. package/dist/useInput-ClpHDPdr.d.mts +0 -2
  148. package/dist/useInput-NPbS4w_n.mjs +0 -1
  149. package/dist/useInputValueTransform-cevZBrIN.d.mts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/TextArea/TextArea.tsx"],"mappings":";;cAWa,oBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqBxB,eAAe,eAAe;KAC9B,YAAY,mBAAmB;UAEnB,sBAAsB;;EAErC;;EAEA,WAAW;;EAEX,YAAY;;EAEZ;;EAEA;;EAEA,QAAQ;;EAER;;EAEA;;EAEA;;EAEA;;;;;cAMI,aAAY,UAAA,WAAA,YAAA,eAAA,MAAA,gBAAA,qBAOf,kCAAa,IAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/TextArea/textAreaVariants.ts","../../src/TextArea/TextArea.tsx"],"mappings":";;;qBAKa,oBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuEjB,YAAY,mBAAmB;UCnE1B;;EAEf;;EAEA,WAAW;;EAEX,YAAY;;EAEZ;;EAEA,cAAc;;EAEd;;EAEA,QAAQ;;EAER;;EAEA;;EAEA;;EAEA;;;cAII,aAAY,WAAA,eAAA,MAAA,gBAAA,gBAMf,kCAAa,IAAA"}
@@ -1,69 +1,217 @@
1
1
  import { useInputValueDebounce } from "../hooks/useInputValueDebounce/index.mjs";
2
- import { useUniformField } from "../hooks/useUniformField/index.mjs";
3
- import { tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
2
+ import { n as useUniformField } from "../FieldLabel-DrNWJIVh.mjs";
3
+ import { n as getFieldControlProps, r as getFieldDataAttributes } from "../FieldDescription-X_0s1Lhu.mjs";
4
+ import { t as FieldLayout } from "../FieldLayout-DcvQU0zN.mjs";
5
+ import { useState } from "react";
4
6
  import { jsx } from "react/jsx-runtime";
5
- import { Textarea } from "@heroui/input";
6
- // src/TextArea/TextArea.tsx
7
+ import { tv } from "@fuf-stack/pixel-utils";
8
+ import { useStyling } from "@fuf-stack/pixels/StylingProvider";
9
+ import { Group } from "react-aria-components";
10
+ import { useFocusRing } from "react-aria/useFocusRing";
11
+ import { useObjectRef } from "react-aria/useObjectRef";
12
+ import { useTextField } from "react-aria/useTextField";
13
+ import TextareaAutosize from "react-textarea-autosize";
14
+ // src/TextArea/textAreaVariants.ts
15
+ /** Textarea slot styles with disabled, filled and invalid states */
7
16
  const textAreaVariants = tv({
8
17
  slots: {
9
- /** wrapper around the whole input */
10
- base: "",
11
- /** clear button */
18
+ /** Container for the label, input and messages */
19
+ base: "group relative flex w-full flex-col",
20
+ /** Reserved clear action slot */
12
21
  clearButton: "",
13
- /** actual input element */
14
- input: "",
15
- /** inner wrapper (HeroUI inputWrapper slot) */
16
- inputWrapper: "bg-content1 group-data-[focus=true]:border-focus"
22
+ /** Supporting text below the textarea */
23
+ description: "text-foreground-500 text-tiny",
24
+ /** Validation message container */
25
+ errorMessage: "text-danger text-tiny",
26
+ /** Container for help text and validation messages */
27
+ helperWrapper: "relative flex flex-col p-0",
28
+ /** Container around the autosizing textarea */
29
+ innerWrapper: "inline-flex w-full items-start",
30
+ /** Editable multiline text */
31
+ input: [
32
+ "w-full min-w-0 resize-none bg-transparent bg-clip-text font-normal text-inherit outline-none",
33
+ "duration-100 transition-height text-small",
34
+ "placeholder:text-foreground-500 autofill:bg-transparent",
35
+ "data-[hide-scroll=true]:[scrollbar-width:none] motion-reduce:transition-none",
36
+ "dark:autofill:[-webkit-text-fill-color:var(--pixel-color-foreground)] data-[hide-scroll=true]:[&::-webkit-scrollbar]:hidden"
37
+ ],
38
+ /** Bordered surface around the textarea */
39
+ inputWrapper: [
40
+ "shadow-xs relative inline-flex w-full cursor-text items-start",
41
+ "rounded-medium border-medium border-default-200 bg-content1 px-3 py-2 text-foreground",
42
+ "transition-colors",
43
+ "data-[hover=true]:border-default-400 group-data-[focus=true]:border-focus group-data-[focus=true]:data-[hover=true]:border-default-foreground",
44
+ "motion-reduce:transition-none"
45
+ ],
46
+ /** Label above the textarea */
47
+ label: "block pb-1.5 text-foreground text-small"
17
48
  },
18
- variants: { readOnly: { true: { base: "**:cursor-not-allowed cursor-not-allowed opacity-disabled" } } }
49
+ variants: {
50
+ disabled: { true: { base: "pointer-events-none opacity-disabled" } },
51
+ readOnly: { true: { base: "cursor-not-allowed opacity-disabled **:cursor-not-allowed" } },
52
+ filled: { true: {
53
+ base: "is-filled",
54
+ input: "is-filled",
55
+ inputWrapper: "is-filled"
56
+ } },
57
+ invalid: { true: {
58
+ input: "text-danger placeholder:text-danger",
59
+ inputWrapper: "border-danger data-[hover=true]:border-danger group-data-[focus=true]:border-danger group-data-[focus=true]:data-[hover=true]:border-danger",
60
+ label: "text-danger"
61
+ } }
62
+ }
19
63
  });
64
+ // src/TextArea/subcomponents/TextAreaInput.tsx
20
65
  /**
21
- * TextArea component based on [HeroUI TextArea](https://www.heroui.com//docs/components/textarea)
66
+ * Autosizing textarea with wrapper focus routing and scroll-limit handling
67
+ *
68
+ * @see https://react-aria.adobe.com/useTextField
69
+ * @see https://react-aria.adobe.com/Group
22
70
  */
23
- const TextArea = ({ children = null, className: _className = void 0, debounceDelay = 300, name, placeholder = " ", ...uniformFieldProps }) => {
24
- const { ariaLabel, disabled, errorMessage, field: { onChange: fieldOnChange, onBlur: fieldOnBlur, value: fieldValue, ref }, invalid, label, readOnly, required, testId } = useUniformField({
71
+ const TextAreaInput = ({ className: classNames, field, focused, hasValue, hovered, onHoverChange, placeholder }) => {
72
+ const controlRef = useObjectRef(field.ref);
73
+ const [limitReached, setLimitReached] = useState(false);
74
+ const { disabled, invalid, name, onBlur, onChange: onValueChange, readOnly, required, testId, value } = field;
75
+ const controlProps = getFieldControlProps(field);
76
+ const { inputProps } = useTextField({
77
+ ...controlProps,
78
+ inputElementType: "textarea",
79
+ isDisabled: disabled,
80
+ isInvalid: invalid,
81
+ isReadOnly: readOnly,
82
+ isRequired: required,
25
83
  name,
26
- ...uniformFieldProps
84
+ onBlur,
85
+ onChange: onValueChange,
86
+ validationBehavior: "aria",
87
+ value: String(value ?? "")
88
+ }, controlRef);
89
+ const inputStyle = inputProps.style ? {
90
+ ...inputProps.style,
91
+ height: typeof inputProps.style.height === "number" ? inputProps.style.height : void 0
92
+ } : void 0;
93
+ const handleWrapperClick = (event) => {
94
+ if (!disabled && event.target === event.currentTarget) controlRef.current?.focus();
95
+ };
96
+ const handleHoverStart = () => {
97
+ onHoverChange(true);
98
+ };
99
+ const handleHoverEnd = () => {
100
+ onHoverChange(false);
101
+ };
102
+ const handleHeightChange = (height, { rowHeight }) => {
103
+ setLimitReached(height >= rowHeight * 8);
104
+ };
105
+ return /* @__PURE__ */ jsx(Group, {
106
+ className: classNames.inputWrapper,
107
+ "data-focus": focused || void 0,
108
+ "data-hover": hovered || void 0,
109
+ "data-slot": "input-wrapper",
110
+ isDisabled: disabled,
111
+ onClick: handleWrapperClick,
112
+ onHoverEnd: handleHoverEnd,
113
+ onHoverStart: handleHoverStart,
114
+ role: "presentation",
115
+ children: /* @__PURE__ */ jsx("div", {
116
+ className: classNames.innerWrapper,
117
+ "data-slot": "inner-wrapper",
118
+ children: /* @__PURE__ */ jsx(TextareaAutosize, {
119
+ ...inputProps,
120
+ ...controlProps,
121
+ ref: controlRef,
122
+ style: inputStyle,
123
+ className: classNames.input,
124
+ "data-filled": hasValue || void 0,
125
+ "data-hide-scroll": !limitReached || void 0,
126
+ "data-slot": "input",
127
+ "data-testid": testId,
128
+ maxRows: 8,
129
+ minRows: 3,
130
+ onHeightChange: handleHeightChange,
131
+ placeholder
132
+ })
133
+ })
27
134
  });
28
- const { onChange, onBlur, value } = useInputValueDebounce({
29
- debounceDelay,
30
- name,
31
- onBlur: fieldOnBlur,
32
- onChange: fieldOnChange,
33
- value: fieldValue
135
+ };
136
+ // src/TextArea/subcomponents/TextAreaControl.tsx
137
+ /**
138
+ * Multiline input presentation with autosizing, focus and field layout
139
+ *
140
+ * @see https://react-aria.adobe.com/useTextField
141
+ * @see https://react-aria.adobe.com/Group
142
+ */
143
+ const TextAreaControl = ({ field, className, placeholder }) => {
144
+ const styling = useStyling();
145
+ const { focusProps, isFocused, isFocusVisible } = useFocusRing({
146
+ isTextInput: true,
147
+ within: true
148
+ });
149
+ const [hovered, setHovered] = useState(false);
150
+ const { description, disabled, errorMessage, ids, invalid, label, readOnly, required, value } = field;
151
+ const hasValue = value !== "" && value != null;
152
+ const variants = styling.resolve(textAreaVariants, {
153
+ disabled,
154
+ invalid,
155
+ filled: hasValue,
156
+ readOnly
34
157
  });
35
- const variants = textAreaVariants({ readOnly });
36
- const classNames = variantsToClassNames(variants, _className, "base");
37
- return /* @__PURE__ */ jsx(Textarea, {
38
- ref,
39
- "aria-label": !placeholder || placeholder.trim() === "" ? ariaLabel : void 0,
40
- classNames: {
41
- base: classNames.base,
42
- clearButton: classNames.clearButton,
43
- helperWrapper: "p-0",
44
- input: classNames.input,
45
- inputWrapper: classNames.inputWrapper
158
+ const classNames = styling.variantsToClassNames(variants, className, "base");
159
+ return /* @__PURE__ */ jsx(FieldLayout, {
160
+ baseProps: {
161
+ ...focusProps,
162
+ ...getFieldDataAttributes(field),
163
+ "data-component": "text-area",
164
+ "data-filled": hasValue || void 0,
165
+ "data-focus": isFocused || void 0,
166
+ "data-focus-visible": isFocusVisible || void 0,
167
+ "data-hover": hovered || void 0
46
168
  },
47
- "data-testid": testId,
169
+ className: classNames,
170
+ description,
48
171
  errorMessage,
49
- id: testId,
50
- isDisabled: disabled,
51
- isInvalid: invalid,
52
- isReadOnly: readOnly,
53
- isRequired: required,
172
+ ids,
173
+ invalid,
54
174
  label,
55
- labelPlacement: "outside",
175
+ required,
176
+ children: /* @__PURE__ */ jsx(TextAreaInput, {
177
+ className: classNames,
178
+ field,
179
+ focused: isFocused,
180
+ hasValue,
181
+ hovered,
182
+ onHoverChange: setHovered,
183
+ placeholder
184
+ })
185
+ });
186
+ };
187
+ // src/TextArea/TextArea.tsx
188
+ /** Form input field for multiline text */
189
+ const TextArea = ({ className = void 0, debounceDelay = 300, name, placeholder = " ", ...uniformProps }) => {
190
+ const { field } = useUniformField({
191
+ ...uniformProps,
56
192
  name,
57
- onBlur,
58
- onChange,
59
- placeholder,
60
- value,
61
- variant: "bordered",
62
- children
193
+ placeholder
194
+ });
195
+ const { value, onChange, onBlur } = useInputValueDebounce({
196
+ debounceDelay,
197
+ name,
198
+ onBlur: field.onBlur,
199
+ onChange: field.onChange,
200
+ value: field.value
201
+ });
202
+ return /* @__PURE__ */ jsx(TextAreaControl, {
203
+ className,
204
+ field: {
205
+ ...field,
206
+ onBlur,
207
+ onChange,
208
+ value
209
+ },
210
+ placeholder
63
211
  });
64
212
  };
65
213
  // src/TextArea/index.ts
66
214
  var TextArea_default = TextArea;
67
- export { TextArea_default as default };
215
+ export { TextArea_default as default, textAreaVariants };
68
216
 
69
217
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["HeroTextArea"],"sources":["../../src/TextArea/TextArea.tsx","../../src/TextArea/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { Textarea as HeroTextArea } from '@heroui/input';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useInputValueDebounce } from '../hooks/useInputValueDebounce';\nimport { useUniformField } from '../hooks/useUniformField';\n\n// input variants\nexport const textAreaVariants = tv({\n slots: {\n /** wrapper around the whole input */\n base: '',\n /** clear button */\n clearButton: '',\n /** actual input element */\n input: '',\n /** inner wrapper (HeroUI inputWrapper slot) */\n inputWrapper: 'bg-content1 group-data-[focus=true]:border-focus',\n },\n variants: {\n readOnly: {\n true: {\n // Inner controls set their own cursors, so override every descendant.\n base: '**:cursor-not-allowed cursor-not-allowed opacity-disabled',\n },\n },\n },\n});\n\ntype VariantProps = TVProps<typeof textAreaVariants>;\ntype ClassName = TVClassName<typeof textAreaVariants>;\n\nexport interface TextAreaProps extends VariantProps {\n /** Custom aria-label for accessibility. If not provided, falls back to field name when no visible label exists */\n ariaLabel?: string;\n /** Child components. The content of the textarea. */\n children?: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** debounce delay in milliseconds for form state updates (default: 300ms) */\n debounceDelay?: number;\n /** Determines if the TextArea is disabled or not. */\n disabled?: boolean;\n /** Label displayed above the TextArea. */\n label?: ReactNode;\n /** Name the TextArea is registered at in HTML forms (react-hook-form). */\n name: string;\n /** placeholder for the textArea content. */\n placeholder?: string;\n /** Prevents changes while keeping the text area focusable and its value in validation and submission */\n readOnly?: boolean;\n /** Id to grab element in internal tests. */\n testId?: string;\n}\n\n/**\n * TextArea component based on [HeroUI TextArea](https://www.heroui.com//docs/components/textarea)\n */\nconst TextArea = ({\n children = null,\n className: _className = undefined,\n debounceDelay = 300,\n name,\n placeholder = ' ',\n ...uniformFieldProps\n}: TextAreaProps) => {\n const {\n ariaLabel,\n disabled,\n errorMessage,\n field: {\n onChange: fieldOnChange,\n onBlur: fieldOnBlur,\n value: fieldValue,\n ref,\n },\n invalid,\n label,\n readOnly,\n required,\n testId,\n } = useUniformField({ name, ...uniformFieldProps });\n\n // Use debounced handlers for form updates\n const { onChange, onBlur, value } = useInputValueDebounce({\n debounceDelay,\n name,\n onBlur: fieldOnBlur,\n onChange: fieldOnChange,\n value: fieldValue,\n });\n\n // classNames from slots\n const variants = textAreaVariants({ readOnly });\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroTextArea\n ref={ref}\n // Only add aria-label if there's no meaningful placeholder (HeroUI uses placeholder as aria-label)\n aria-label={\n !placeholder || placeholder.trim() === '' ? ariaLabel : undefined\n }\n classNames={{\n base: classNames.base,\n clearButton: classNames.clearButton,\n // set padding to 0 for error message exit animation\n helperWrapper: 'p-0',\n input: classNames.input,\n inputWrapper: classNames.inputWrapper,\n }}\n data-testid={testId}\n errorMessage={errorMessage}\n id={testId}\n isDisabled={disabled}\n isInvalid={invalid}\n isReadOnly={readOnly}\n isRequired={required}\n label={label}\n labelPlacement=\"outside\"\n name={name}\n onBlur={onBlur}\n onChange={onChange}\n placeholder={placeholder}\n value={value}\n variant=\"bordered\"\n >\n {children}\n </HeroTextArea>\n );\n};\n\nexport default TextArea;\n","import TextArea from './TextArea';\n\nexport type { TextAreaProps } from './TextArea';\n\nexport default TextArea;\n"],"mappings":";;;;;;AAWA,MAAa,mBAAmB,GAAG;CACjC,OAAO;;EAEL,MAAM;;EAEN,aAAa;;EAEb,OAAO;;EAEP,cAAc;CAChB;CACA,UAAU,EACR,UAAU,EACR,MAAM,EAEJ,MAAM,4DACR,EACF,EACF;AACF,CAAC;;;;AA+BD,MAAM,YAAY,EAChB,WAAW,MACX,WAAW,aAAa,KAAA,GACxB,gBAAgB,KAChB,MACA,cAAc,KACd,GAAG,wBACgB;CACnB,MAAM,EACJ,WACA,UACA,cACA,OAAO,EACL,UAAU,eACV,QAAQ,aACR,OAAO,YACP,OAEF,SACA,OACA,UACA,UACA,WACE,gBAAgB;EAAE;EAAM,GAAG;CAAkB,CAAC;CAGlD,MAAM,EAAE,UAAU,QAAQ,UAAU,sBAAsB;EACxD;EACA;EACA,QAAQ;EACR,UAAU;EACV,OAAO;CACT,CAAC;CAGD,MAAM,WAAW,iBAAiB,EAAE,SAAS,CAAC;CAC9C,MAAM,aAAa,qBAAqB,UAAU,YAAY,MAAM;CAEpE,OACE,oBAACA,UAAD;EACO;EAEL,cACE,CAAC,eAAe,YAAY,KAAK,MAAM,KAAK,YAAY,KAAA;EAE1D,YAAY;GACV,MAAM,WAAW;GACjB,aAAa,WAAW;GAExB,eAAe;GACf,OAAO,WAAW;GAClB,cAAc,WAAW;EAC3B;EACA,eAAa;EACC;EACd,IAAI;EACJ,YAAY;EACZ,WAAW;EACX,YAAY;EACZ,YAAY;EACL;EACP,gBAAe;EACT;EACE;EACE;EACG;EACN;EACP,SAAQ;EAEP;CACW,CAAA;AAElB;;ACjIA,IAAA,mBAAe"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/TextArea/textAreaVariants.ts","../../src/TextArea/subcomponents/TextAreaInput.tsx","../../src/TextArea/subcomponents/TextAreaControl.tsx","../../src/TextArea/TextArea.tsx","../../src/TextArea/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\n\nimport { tv } from '@fuf-stack/pixel-utils';\n\n/** Textarea slot styles with disabled, filled and invalid states */\nexport const textAreaVariants = tv({\n slots: {\n /** Container for the label, input and messages */\n base: 'group relative flex w-full flex-col',\n /** Reserved clear action slot */\n clearButton: '',\n /** Supporting text below the textarea */\n description: 'text-foreground-500 text-tiny',\n /** Validation message container */\n errorMessage: 'text-danger text-tiny',\n /** Container for help text and validation messages */\n helperWrapper: 'relative flex flex-col p-0',\n /** Container around the autosizing textarea */\n innerWrapper: 'inline-flex w-full items-start',\n /** Editable multiline text */\n input: [\n // editable text and transparent surface\n 'w-full min-w-0 resize-none bg-transparent bg-clip-text font-normal text-inherit outline-none',\n // autosize transition\n 'duration-100 transition-height text-small',\n // placeholder and autofill\n 'placeholder:text-foreground-500 autofill:bg-transparent',\n // scrollbar visibility and reduced motion\n 'data-[hide-scroll=true]:[scrollbar-width:none] motion-reduce:transition-none',\n // browser-specific textarea appearance\n 'dark:autofill:[-webkit-text-fill-color:var(--pixel-color-foreground)] data-[hide-scroll=true]:[&::-webkit-scrollbar]:hidden',\n ],\n /** Bordered surface around the textarea */\n inputWrapper: [\n // textarea frame and layout\n 'shadow-xs relative inline-flex w-full cursor-text items-start',\n // bordered surface and text\n 'rounded-medium border-medium border-default-200 bg-content1 px-3 py-2 text-foreground',\n // interaction transitions\n 'transition-colors',\n // hover and focus borders\n 'data-[hover=true]:border-default-400 group-data-[focus=true]:border-focus group-data-[focus=true]:data-[hover=true]:border-default-foreground',\n // reduced motion\n 'motion-reduce:transition-none',\n ],\n /** Label above the textarea */\n label: 'block pb-1.5 text-foreground text-small',\n },\n variants: {\n disabled: { true: { base: 'pointer-events-none opacity-disabled' } },\n readOnly: {\n true: {\n // inner controls set their own cursors, override every descendant\n base: 'cursor-not-allowed opacity-disabled **:cursor-not-allowed',\n },\n },\n filled: {\n true: {\n base: 'is-filled',\n input: 'is-filled',\n inputWrapper: 'is-filled',\n },\n },\n invalid: {\n true: {\n input: 'text-danger placeholder:text-danger',\n inputWrapper:\n 'border-danger data-[hover=true]:border-danger group-data-[focus=true]:border-danger group-data-[focus=true]:data-[hover=true]:border-danger',\n label: 'text-danger',\n },\n },\n },\n});\n\nexport type VariantProps = TVProps<typeof textAreaVariants>;\n\nexport type ClassName = TVClassName<typeof textAreaVariants>;\n\n/** Resolved class names for the multiline input slots */\nexport type TextAreaClassNames = Record<\n keyof ReturnType<typeof textAreaVariants>,\n string\n>;\n\nexport default textAreaVariants;\n","import type { ComponentProps, MouseEvent } from 'react';\nimport type { UniformField } from '../../hooks/useUniformField/types';\nimport type { TextAreaProps } from '../TextArea';\nimport type { TextAreaClassNames } from '../textAreaVariants';\n\nimport { useState } from 'react';\nimport { Group } from 'react-aria-components';\nimport { useObjectRef } from 'react-aria/useObjectRef';\nimport { useTextField } from 'react-aria/useTextField';\nimport TextareaAutosize from 'react-textarea-autosize';\n\nimport { getFieldControlProps } from '../../helpers/fieldProps/fieldProps';\n\ninterface TextAreaInputProps extends Pick<TextAreaProps, 'placeholder'> {\n /** CSS class name */\n className: TextAreaClassNames;\n /** Bound field values, interactions and metadata */\n field: UniformField<unknown, string>;\n /** Focus within the field */\n focused: boolean;\n /** Whether the field contains a value */\n hasValue: boolean;\n /** Pointer hover state on the input surface */\n hovered: boolean;\n /** Reports hover changes for the field root selectors */\n onHoverChange: (hovered: boolean) => void;\n}\n\n/**\n * Autosizing textarea with wrapper focus routing and scroll-limit handling\n *\n * @see https://react-aria.adobe.com/useTextField\n * @see https://react-aria.adobe.com/Group\n */\nconst TextAreaInput = ({\n className: classNames,\n field,\n focused,\n hasValue,\n hovered,\n onHoverChange,\n placeholder,\n}: TextAreaInputProps) => {\n const controlRef = useObjectRef<HTMLTextAreaElement>(field.ref);\n const [limitReached, setLimitReached] = useState(false);\n\n const {\n disabled,\n invalid,\n name,\n onBlur,\n onChange: onValueChange,\n readOnly,\n required,\n testId,\n value,\n } = field;\n const controlProps = getFieldControlProps(field);\n\n const { inputProps } = useTextField(\n {\n ...controlProps,\n inputElementType: 'textarea',\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n name,\n onBlur,\n onChange: onValueChange,\n validationBehavior: 'aria',\n value: String(value ?? ''),\n },\n controlRef,\n );\n\n // the autosizer accepts numeric heights, other ARIA styles remain unchanged\n const inputStyle = inputProps.style\n ? {\n ...inputProps.style,\n height:\n typeof inputProps.style.height === 'number'\n ? inputProps.style.height\n : undefined,\n }\n : undefined;\n\n // focus the input when its wrapper padding is clicked\n const handleWrapperClick = (event: MouseEvent<HTMLElement>) => {\n if (!disabled && event.target === event.currentTarget) {\n controlRef.current?.focus();\n }\n };\n\n // track hover for the existing root and wrapper selectors\n const handleHoverStart = () => {\n onHoverChange(true);\n };\n\n const handleHoverEnd = () => {\n onHoverChange(false);\n };\n\n // hide scrolling until the eight-row display limit is reached\n const handleHeightChange: NonNullable<\n ComponentProps<typeof TextareaAutosize>['onHeightChange']\n > = (height, { rowHeight }) => {\n setLimitReached(height >= rowHeight * 8);\n };\n\n return (\n <Group\n className={classNames.inputWrapper}\n data-focus={focused || undefined}\n data-hover={hovered || undefined}\n data-slot=\"input-wrapper\"\n isDisabled={disabled}\n onClick={handleWrapperClick}\n onHoverEnd={handleHoverEnd}\n onHoverStart={handleHoverStart}\n role=\"presentation\"\n >\n <div className={classNames.innerWrapper} data-slot=\"inner-wrapper\">\n <TextareaAutosize\n {...inputProps}\n {...controlProps}\n ref={controlRef}\n style={inputStyle}\n className={classNames.input}\n data-filled={hasValue || undefined}\n data-hide-scroll={!limitReached || undefined}\n data-slot=\"input\"\n data-testid={testId}\n maxRows={8}\n minRows={3}\n onHeightChange={handleHeightChange}\n placeholder={placeholder}\n />\n </div>\n </Group>\n );\n};\n\nexport default TextAreaInput;\n","import type { UniformField } from '../../hooks/useUniformField/types';\nimport type { TextAreaProps } from '../TextArea';\n\nimport { useState } from 'react';\nimport { useFocusRing } from 'react-aria/useFocusRing';\n\nimport { useStyling } from '@fuf-stack/pixels/StylingProvider';\n\nimport { getFieldDataAttributes } from '../../helpers/fieldProps/fieldProps';\nimport FieldLayout from '../../partials/FieldLayout/FieldLayout';\nimport { textAreaVariants } from '../textAreaVariants';\nimport TextAreaInput from './TextAreaInput';\n\ninterface TextAreaControlProps extends Pick<\n TextAreaProps,\n 'className' | 'placeholder'\n> {\n /** Bound field values, interactions and metadata */\n field: UniformField<unknown, string>;\n}\n\n/**\n * Multiline input presentation with autosizing, focus and field layout\n *\n * @see https://react-aria.adobe.com/useTextField\n * @see https://react-aria.adobe.com/Group\n */\nconst TextAreaControl = ({\n field,\n className,\n placeholder,\n}: TextAreaControlProps) => {\n const styling = useStyling();\n const { focusProps, isFocused, isFocusVisible } = useFocusRing({\n isTextInput: true,\n within: true,\n });\n const [hovered, setHovered] = useState(false);\n\n const {\n description,\n disabled,\n errorMessage,\n ids,\n invalid,\n label,\n readOnly,\n required,\n value,\n } = field;\n\n // zero counts as a filled value\n const hasValue = value !== '' && value != null;\n\n // classNames from slots\n const variants = styling.resolve(textAreaVariants, {\n disabled,\n invalid,\n filled: hasValue,\n readOnly,\n });\n const classNames = styling.variantsToClassNames(variants, className, 'base');\n\n return (\n <FieldLayout\n baseProps={{\n ...focusProps,\n ...getFieldDataAttributes(field),\n 'data-component': 'text-area',\n 'data-filled': hasValue || undefined,\n 'data-focus': isFocused || undefined,\n 'data-focus-visible': isFocusVisible || undefined,\n 'data-hover': hovered || undefined,\n }}\n className={classNames}\n description={description}\n errorMessage={errorMessage}\n ids={ids}\n invalid={invalid}\n label={label}\n required={required}\n >\n <TextAreaInput\n className={classNames}\n field={field}\n focused={isFocused}\n hasValue={hasValue}\n hovered={hovered}\n onHoverChange={setHovered}\n placeholder={placeholder}\n />\n </FieldLayout>\n );\n};\n\nexport default TextAreaControl;\n","import type { ReactNode } from 'react';\nimport type { ClassName } from './textAreaVariants';\n\nimport { useInputValueDebounce } from '../hooks/useInputValueDebounce';\nimport useUniformField from '../hooks/useUniformField/useUniformField';\nimport TextAreaControl from './subcomponents/TextAreaControl';\n\nexport { default as textAreaVariants } from './textAreaVariants';\n\nexport interface TextAreaProps {\n /** Custom aria-label for accessibility. If not provided, falls back to field name when no visible label exists */\n ariaLabel?: string;\n /** Child components. The content of the textarea. */\n children?: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** debounce delay in milliseconds for form state updates (default: 300ms) */\n debounceDelay?: number;\n /** Help text associated with the editable control. */\n description?: ReactNode;\n /** Determines if the TextArea is disabled or not. */\n disabled?: boolean;\n /** Label displayed above the TextArea. */\n label?: ReactNode;\n /** Name the TextArea is registered at in HTML forms (react-hook-form). */\n name: string;\n /** placeholder for the textArea content. */\n placeholder?: string;\n /** Prevents changes, the text can still be focused, copied and is submitted */\n readOnly?: boolean;\n /** Id to grab element in internal tests. */\n testId?: string;\n}\n\n/** Form input field for multiline text */\nconst TextArea = ({\n className = undefined,\n debounceDelay = 300,\n name,\n placeholder = ' ',\n ...uniformProps\n}: TextAreaProps) => {\n const { field } = useUniformField({\n ...uniformProps,\n name,\n placeholder,\n });\n\n // debounce form updates, flush pending edits on blur\n const { value, onChange, onBlur } = useInputValueDebounce({\n debounceDelay,\n name,\n onBlur: field.onBlur,\n onChange: field.onChange,\n value: field.value,\n });\n\n return (\n <TextAreaControl\n className={className}\n field={{ ...field, onBlur, onChange, value }}\n placeholder={placeholder}\n />\n );\n};\n\nexport default TextArea;\n","import TextArea from './TextArea';\n\nexport type { TextAreaProps } from './TextArea';\n\nexport { textAreaVariants } from './textAreaVariants';\n\nexport default TextArea;\n"],"mappings":"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"}