@dipusevilla/componentes-iu 1.0.10 → 1.0.12

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.
@@ -13,4 +13,4 @@ export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
13
13
  children?: React.ReactNode;
14
14
  onClick?: () => void;
15
15
  };
16
- export declare function Button({ type, variant, size, width, disabled, icon: IconComponent, iconPosition, ariaLabel, children, onClick, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function Button({ type, variant, size, width, disabled, icon: IconComponent, iconPosition, ariaLabel, children, onClick, className: buttonClassName, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Control } from 'react-hook-form';
2
+ import { type Control } from 'react-hook-form';
3
3
  import { Option } from "../types/FormTypes";
4
4
  type Size = 'sm' | 'md' | 'lg';
5
5
  export interface SelectProps {
@@ -11,6 +11,9 @@ export interface SelectProps {
11
11
  options?: Option[];
12
12
  /** Función asíncrona para cargar opciones */
13
13
  loadOptions?: () => Promise<Option[]>;
14
+ /** Lista de campos que al cambiar volverán a disparar el loadOptions */
15
+ reloadDeps?: any[];
16
+ /** Para uso “no-RHF” */
14
17
  value?: string | number;
15
18
  onChange?: (value: any) => void;
16
19
  size?: Size;
@@ -19,11 +22,9 @@ export interface SelectProps {
19
22
  labelHidden?: boolean;
20
23
  hasError?: boolean;
21
24
  errorMessage?: string;
22
- /** Si true, no reserva espacio para el placeholder de error */
23
25
  disableErrorPlaceholder?: boolean;
24
26
  disabled?: boolean;
25
27
  className?: string;
26
- /** Botón que se renderiza al final del select */
27
28
  suffixButton?: React.ReactNode;
28
29
  }
29
30
  export declare function Select(props: SelectProps): import("react/jsx-runtime").JSX.Element;
@@ -56,4 +56,8 @@ export { ToastProvider, useToast } from './components/ToastContainer';
56
56
  export { ToggleSwitch } from './components/ToggleSwitch';
57
57
  export type { ToggleSwitchProps } from './components/ToggleSwitch';
58
58
  export type { FormSchema, ButtonField, FieldSchema, FieldType, InputGroupField, LayoutNode, Option, SectionBlock, SectionColumn, SectionRow, SectionRowObject } from './types/FormTypes';
59
+ export { Checkbox } from './components/Checkbox';
60
+ export type { CheckboxProps } from './components/Checkbox';
61
+ export { SearchField } from './components/SearchField';
62
+ export type { SearchFieldProps } from './components/SearchField';
59
63
  import './styles/index.css';
@@ -89,6 +89,8 @@ export interface FieldSchema {
89
89
  label: string;
90
90
  value: any;
91
91
  }[]>;
92
+ /** Valores por defecto sincrónicos. */
93
+ defaultValue?: Record<string, unknown>;
92
94
  }
93
95
  /**
94
96
  * Campo de tipo botón.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dipusevilla/componentes-iu",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "Librería de componentes React de Dipusevilla",
5
5
  "keywords": [
6
6
  "react",