docthub-core-components 2.55.0 → 2.57.0

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,14 +1,18 @@
1
1
  import * as React from "react";
2
2
  import * as RPNInput from "react-phone-number-input";
3
- /** Re-exported for form validation: checks if value has valid length for the country. */
4
- /** Re-exported for form validation: checks if value matches country's expected digits/format (mobile metadata). */
5
- export { isPossiblePhoneNumber, isValidPhoneNumber } from 'react-phone-number-input/mobile';
3
+ /** Re-exported for form validation: checks if value is a possible/valid phone number (no country length restriction). */
4
+ export { isPossiblePhoneNumber, isValidPhoneNumber } from 'react-phone-number-input';
5
+ /** Visual presentation options for the phone input control. */
6
6
  type DoctPhoneInputVariant = "default" | "flag";
7
+ /** Base props for the low-level phone input primitive built on `react-phone-number-input`. */
7
8
  interface DoctPhoneInputBaseProps extends Omit<React.ComponentProps<typeof RPNInput.default>, "onChange" | "value" | "id" | "inputComponent" | "flagComponent" | "countrySelectComponent"> {
8
9
  value?: string;
9
10
  onValueChange?: (value: string) => void;
10
11
  variant?: DoctPhoneInputVariant;
12
+ /** Internal: propagates error state to sub-components for border styling. */
13
+ hasError?: boolean;
11
14
  }
15
+ /** Public props for the labeled `DoctPhoneInput` component, combining native input and primitive props. */
12
16
  export interface DoctPhoneInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "type">, DoctPhoneInputBaseProps {
13
17
  label?: string;
14
18
  helperText?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docthub-core-components",
3
- "version": "2.55.0",
3
+ "version": "2.57.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",