@adoptaunabuelo/react-components 0.3.156 → 0.3.159

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,7 +1,7 @@
1
1
  import { CSSProperties, ReactElement } from "react";
2
2
  import "react-image-crop/dist/ReactCrop.css";
3
3
  import "./input-image.css";
4
- declare const InputImage: (props: InputImageProps) => import("react/jsx-runtime").JSX.Element;
4
+ declare const InputImage: import("react").ForwardRefExoticComponent<InputImageProps & import("react").RefAttributes<InputImageRef>>;
5
5
  export default InputImage;
6
6
  /**
7
7
  * Image upload with crop, compression, and webcam capture.
@@ -34,4 +34,15 @@ export interface InputImageProps {
34
34
  hideCrop?: boolean;
35
35
  /** Callback with base64-encoded WebP image */
36
36
  onChange?: (image: string | ArrayBuffer | null) => void;
37
+ /** Callback when crop state changes (for external control of crop actions) */
38
+ onCropStateChange?: (isCropping: boolean) => void;
39
+ /** Hide internal toolbar with crop/cancel buttons (use with ref for external control) */
40
+ hideToolbar?: boolean;
41
+ }
42
+ /** Ref methods exposed by InputImage for external control */
43
+ export interface InputImageRef {
44
+ /** Trigger the crop operation */
45
+ triggerCrop: () => void;
46
+ /** Cancel the crop and clear the image */
47
+ cancelCrop: () => void;
37
48
  }
@@ -35,7 +35,7 @@ export interface LocationProps {
35
35
  /** Full formatted address string */
36
36
  address?: string;
37
37
  /** Short address (city, province, country) */
38
- sortAddress?: string;
38
+ shortAddress?: string;
39
39
  /** Street name */
40
40
  route?: string;
41
41
  /** Street number */
@@ -48,4 +48,6 @@ export type InputPriceProps = {
48
48
  customAmountData?: React.ReactElement;
49
49
  /** Callback with selected/entered price. Validates minimum from first option */
50
50
  onChange?: (value: number) => void;
51
+ /** Fires when the custom-amount min-validation error appears (true) or clears (false) */
52
+ onErrorChange?: (hasError: boolean) => void;
51
53
  };
@@ -9,6 +9,7 @@ export { default as InputChat } from "./Input/Chat/InputChat";
9
9
  export { default as InputCode } from "./Input/Code/InputCode";
10
10
  export { default as InputDateRange } from "./Input/DateRange/InputDateRange";
11
11
  export { default as InputImage } from "./Input/Image/InputImage";
12
+ export type { InputImageRef } from "./Input/Image/InputImage";
12
13
  export { default as InputLocation } from "./Input/Location/InputLocation";
13
14
  export { default as InputPhone } from "./Input/Phone/InputPhone";
14
15
  export { default as InputRange } from "./Input/Range/InputRange";