florixui 1.8.0 → 1.9.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,3 +1,4 @@
1
+ import { PhoneCountry } from './phone-countries';
1
2
  import * as React from "react";
2
3
  type BaseProps = {
3
4
  /** Label rendered above the control. */
@@ -36,4 +37,21 @@ type TextareaProps = BaseProps & Omit<React.TextareaHTMLAttributes<HTMLTextAreaE
36
37
  };
37
38
  export type AdvancedInputProps = InputProps | TextareaProps;
38
39
  export declare const AdvancedInput: React.ForwardRefExoticComponent<AdvancedInputProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
40
+ export interface PhoneInputProps extends Omit<InputProps, "as" | "startItem" | "value" | "onChange" | "type" | "defaultValue"> {
41
+ /** Full phone value in E.164-ish form, e.g. "+919876543210". Controlled. */
42
+ value?: string;
43
+ /** Called with the combined "+{dial}{number}" string. */
44
+ onChange?: (value: string) => void;
45
+ /** Default selected country ISO (e.g. "US"). */
46
+ defaultCountry?: string;
47
+ /** Country list. Defaults to a curated common set. */
48
+ countries?: PhoneCountry[];
49
+ }
50
+ /**
51
+ * A phone-number field: a searchable country dial-code selector attached to a
52
+ * number input, built on `AdvancedInput`. Controlled via `value`/`onChange`,
53
+ * which use the combined `+{dial}{number}` string. No external dependency — pass
54
+ * your own `countries` for the full list.
55
+ */
56
+ export declare const PhoneInput: React.ForwardRefExoticComponent<PhoneInputProps & React.RefAttributes<HTMLInputElement>>;
39
57
  export {};
@@ -16,6 +16,16 @@ export interface DateTimePickerProps {
16
16
  minDate?: string;
17
17
  /** Disable days after this date (ISO/date string). */
18
18
  maxDate?: string;
19
+ /**
20
+ * Caption style: `dropdown` (default) shows month + year dropdowns for quick
21
+ * year jumps; `label` shows the month name with prev/next arrows only.
22
+ */
23
+ captionLayout?: "dropdown" | "dropdown-months" | "dropdown-years" | "label";
24
+ /**
25
+ * Selectable year span for the dropdown, `[from, to]`. Defaults to 100 years
26
+ * back and 5 years ahead of the current year (clamped by min/maxDate).
27
+ */
28
+ yearRange?: [number, number];
19
29
  /** Disable the field. */
20
30
  disabled?: boolean;
21
31
  /** Class for the wrapper. */
@@ -27,4 +37,4 @@ export interface DateTimePickerProps {
27
37
  * Set `showTime={false}` for date-only. This is the same field the
28
38
  * `DateTimeRangePicker` uses for its custom from/to inputs.
29
39
  */
30
- export declare function DateTimePicker({ value, onChange, label, placeholder, showTime, timezone, minDate, maxDate, disabled, className, }: DateTimePickerProps): import("react/jsx-runtime").JSX.Element;
40
+ export declare function DateTimePicker({ value, onChange, label, placeholder, showTime, timezone, minDate, maxDate, captionLayout, yearRange, disabled, className, }: DateTimePickerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ /** A country for the phone-input dial-code selector. */
2
+ export interface PhoneCountry {
3
+ /** ISO 3166-1 alpha-2 code, e.g. "US". */
4
+ iso: string;
5
+ /** Display name. */
6
+ name: string;
7
+ /** Dial code without "+", e.g. "1", "91". */
8
+ dial: string;
9
+ /** Flag emoji. */
10
+ flag: string;
11
+ }
12
+ /**
13
+ * A curated, commonly-used set of countries. Not exhaustive — pass your own
14
+ * `countries` to `PhoneInput` if you need the full list. Sorted by name.
15
+ */
16
+ export declare const PHONE_COUNTRIES: PhoneCountry[];
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export { cn } from './lib/utils';
2
2
  export { useFileUpload, formatBytes, type FileMetadata, type FileWithPreview, type FileUploadOptions, type FileUploadState, type FileUploadActions, } from './lib/use-file-upload';
3
3
  export * from './components/custom/actions-menu';
4
4
  export * from './components/custom/advanced-input';
5
+ export * from './components/custom/phone-countries';
5
6
  export * from './components/custom/alert-card';
6
7
  export * from './components/custom/file-upload';
7
8
  export * from './components/custom/advanced-select';