(props: HexColorFieldProps)
| 196 | } |
| 197 | |
| 198 | function HexColorField(props: HexColorFieldProps) { |
| 199 | let state = useColorFieldState({ |
| 200 | ...props, |
| 201 | validationBehavior: props.validationBehavior ?? 'native' |
| 202 | }); |
| 203 | |
| 204 | let inputRef = useRef<HTMLInputElement>(null); |
| 205 | let [labelRef, label] = useSlot(!props['aria-label'] && !props['aria-labelledby']); |
| 206 | let {labelProps, inputProps, descriptionProps, errorMessageProps, ...validation} = useColorField( |
| 207 | { |
| 208 | ...removeDataAttributes(props), |
| 209 | label, |
| 210 | validationBehavior: props.validationBehavior ?? 'native' |
| 211 | }, |
| 212 | state, |
| 213 | inputRef |
| 214 | ); |
| 215 | |
| 216 | return useChildren( |
| 217 | props, |
| 218 | state, |
| 219 | props.forwardedRef, |
| 220 | inputProps, |
| 221 | inputRef, |
| 222 | labelProps, |
| 223 | labelRef, |
| 224 | descriptionProps, |
| 225 | errorMessageProps, |
| 226 | validation |
| 227 | ); |
| 228 | } |
| 229 | |
| 230 | function useChildren( |
| 231 | props: ColorFieldProps, |
nothing calls this directly
no test coverage detected