@dipusevilla/componentes-iu 1.0.42 → 1.0.44

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.
@@ -1,25 +1,15 @@
1
1
  import React from 'react';
2
- import { type Control } from 'react-hook-form';
3
2
  import { type InputProps } from './Input';
4
3
  import { type SelectProps } from './Select';
5
- import type { Option } from '../types/FormTypes';
6
- export type Size = 'sm' | 'md' | 'lg';
7
- type BaseCommon = {
4
+ import { Option } from '../types/FormTypes';
5
+ export type InputOrSelectProps = (InputProps & {
6
+ width?: string;
7
+ }) | (SelectProps & {
8
8
  width?: string;
9
- className?: string;
10
- size?: Size;
11
- };
12
- type SelectExtra = {
13
9
  options?: Option[];
14
10
  loadOptions?: () => Promise<Option[]>;
15
- };
16
- export type InputOrSelectProps = (InputProps & BaseCommon & {
17
- control?: Control<any>;
18
- name: string;
19
- }) | (SelectProps & BaseCommon & SelectExtra & {
20
- control?: Control<any>;
21
- name: string;
22
11
  });
12
+ export type Size = 'sm' | 'md' | 'lg';
23
13
  export interface InputGroupProps {
24
14
  groupLabel: string;
25
15
  inputs?: InputOrSelectProps[];
@@ -31,4 +21,3 @@ export interface InputGroupProps {
31
21
  width?: string;
32
22
  }
33
23
  export declare function InputGroup({ groupLabel, inputs, separator, useSeparator, className, showVisibleLabel, size, width, }: InputGroupProps): import("react/jsx-runtime").JSX.Element;
34
- export {};
@@ -7,11 +7,8 @@ export interface SelectProps {
7
7
  name?: string;
8
8
  rules?: any;
9
9
  defaultValue?: any;
10
- /** Opciones sincrónicas */
11
10
  options?: Option[];
12
- /** Función asíncrona para cargar opciones */
13
11
  loadOptions?: () => Promise<Option[]>;
14
- /** Lista de deps que re-disparan loadOptions */
15
12
  reloadDeps?: any[];
16
13
  value?: string | number;
17
14
  onChange?: (value: any) => void;
@@ -21,15 +18,12 @@ export interface SelectProps {
21
18
  labelHidden?: boolean;
22
19
  hasError?: boolean;
23
20
  errorMessage?: string;
24
- /** Reservar espacio para errores (default: true si RHF, false si unctrl) */
25
21
  reserveErrorSpace?: boolean;
26
22
  disableErrorPlaceholder?: boolean;
27
23
  disabled?: boolean;
28
24
  className?: string;
29
25
  suffixButton?: React.ReactNode;
30
- /** Skeleton state */
31
26
  loading?: boolean;
32
- /** Evita que el Select fuerce la primera opción si el value es vacío o no está en lista. */
33
27
  coerceFirstValid?: boolean;
34
28
  }
35
29
  export declare function Select(props: SelectProps): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dipusevilla/componentes-iu",
3
- "version": "1.0.42",
3
+ "version": "1.0.44",
4
4
  "description": "Librería de componentes React de Dipusevilla",
5
5
  "keywords": [
6
6
  "react",