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