optimizations

This commit is contained in:
2026-03-28 19:15:39 +01:00
parent 0b25d9570a
commit cab4fbd83e
509 changed files with 1016804 additions and 1605 deletions

View File

@@ -1,4 +1,4 @@
import React, { forwardRef } from 'react'
import React, { forwardRef, useId } from 'react'
/**
* Nova TextInput
@@ -26,7 +26,11 @@ const TextInput = forwardRef(function TextInput(
},
ref,
) {
const inputId = id ?? (label ? label.toLowerCase().replace(/\s+/g, '-') : undefined)
const generatedId = useId()
const labelSlug = typeof label === 'string'
? label.toLowerCase().replace(/\s+/g, '-')
: null
const inputId = id ?? labelSlug ?? `text-input-${generatedId.replace(/[:]/g, '')}`
const sizeClass = {
sm: 'py-1.5 text-xs',