@acvl/frontend-components 0.0.73 → 0.0.75
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.
- package/dist/cjs/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +22 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2026,13 +2026,29 @@ interface AutocompleteOption {
|
|
|
2026
2026
|
label: string;
|
|
2027
2027
|
}
|
|
2028
2028
|
|
|
2029
|
+
/**
|
|
2030
|
+
* Props que el consumidor escribe en `fieldProps` pensando en "el campo" pero que
|
|
2031
|
+
* son del `TextField` que dibuja `renderInput`, no del `Autocomplete`.
|
|
2032
|
+
*
|
|
2033
|
+
* MUI sólo reenvía a `renderInput` `id`, `disabled`, `size`, `fullWidth` e
|
|
2034
|
+
* `InputProps`; lo demás se quedaba en el nodo raíz del `Autocomplete` —sin
|
|
2035
|
+
* efecto y sin aviso—, así que un `fieldProps: { helperText: "…" }` no se veía
|
|
2036
|
+
* por ningún lado. Se reparten antes del spread para que lleguen a su sitio.
|
|
2037
|
+
*/
|
|
2038
|
+
declare const TEXT_FIELD_KEYS: readonly ["helperText", "placeholder", "required", "margin"];
|
|
2039
|
+
type TextFieldOnlyProps = Pick<TextFieldProps$1, (typeof TEXT_FIELD_KEYS)[number]>;
|
|
2040
|
+
type AutocompleteFieldProps = Partial<AutocompleteProps<any, any, any, any>> & TextFieldOnlyProps;
|
|
2029
2041
|
interface ControlledAutocompleteProps {
|
|
2030
2042
|
name: string;
|
|
2031
2043
|
label?: string;
|
|
2032
2044
|
/** Control de react-hook-form; lo inyecta el `EditField` o el panel de filtros. */
|
|
2033
2045
|
control?: any;
|
|
2034
|
-
/**
|
|
2035
|
-
|
|
2046
|
+
/**
|
|
2047
|
+
* Props del campo (ganan sobre las de aquí). Las del `Autocomplete` van tal
|
|
2048
|
+
* cual; las que son del `TextField` (`helperText`, `placeholder`, `required`,
|
|
2049
|
+
* `margin`) se enrutan solas al input, que es donde se ven.
|
|
2050
|
+
*/
|
|
2051
|
+
fieldProps?: AutocompleteFieldProps;
|
|
2036
2052
|
extraProps?: {
|
|
2037
2053
|
/** Selección múltiple con casillas y chips. Por defecto, simple. */
|
|
2038
2054
|
multiple?: boolean;
|
|
@@ -2048,7 +2064,10 @@ interface ControlledAutocompleteProps {
|
|
|
2048
2064
|
minChars?: number;
|
|
2049
2065
|
/** Fila de "seleccionar todo" en el modo múltiple. Por defecto, sí. */
|
|
2050
2066
|
selectAll?: boolean;
|
|
2051
|
-
/**
|
|
2067
|
+
/**
|
|
2068
|
+
* Quita el hueco reservado para el mensaje de error debajo del campo. No
|
|
2069
|
+
* afecta al `helperText` de `fieldProps`: si hay texto de ayuda, se ve.
|
|
2070
|
+
*/
|
|
2052
2071
|
disableHT?: boolean;
|
|
2053
2072
|
};
|
|
2054
2073
|
}
|
package/package.json
CHANGED