@undefine-ui/design-system 3.5.2 → 3.6.1
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.
- package/README.md +1 -0
- package/dist/index.cjs +1137 -497
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +218 -4
- package/dist/index.d.ts +218 -4
- package/dist/index.js +1121 -481
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -16,10 +16,11 @@ import { PopoverProps } from '@mui/material/Popover';
|
|
|
16
16
|
import { ButtonBaseProps } from '@mui/material/ButtonBase';
|
|
17
17
|
import { InputBaseProps } from '@mui/material/InputBase';
|
|
18
18
|
import { FieldValues, UseFormReturn, SubmitHandler } from 'react-hook-form';
|
|
19
|
+
import { TextFieldProps } from '@mui/material/TextField';
|
|
20
|
+
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
|
19
21
|
import { DatePickerProps as DatePickerProps$1 } from '@mui/x-date-pickers/DatePicker';
|
|
20
22
|
import { TimePickerProps as TimePickerProps$1 } from '@mui/x-date-pickers/TimePicker';
|
|
21
23
|
import { DateTimePickerProps as DateTimePickerProps$1 } from '@mui/x-date-pickers/DateTimePicker';
|
|
22
|
-
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
|
23
24
|
import { CheckboxProps } from '@mui/material/Checkbox';
|
|
24
25
|
import { FormGroupProps } from '@mui/material/FormGroup';
|
|
25
26
|
import { FormLabelProps } from '@mui/material/FormLabel';
|
|
@@ -28,7 +29,6 @@ import { FormHelperTextProps } from '@mui/material/FormHelperText';
|
|
|
28
29
|
import { FormControlLabelProps } from '@mui/material/FormControlLabel';
|
|
29
30
|
import { RadioProps } from '@mui/material/Radio';
|
|
30
31
|
import { RadioGroupProps } from '@mui/material/RadioGroup';
|
|
31
|
-
import { TextFieldProps } from '@mui/material/TextField';
|
|
32
32
|
import { SwitchProps } from '@mui/material/Switch';
|
|
33
33
|
export * from 'sonner';
|
|
34
34
|
|
|
@@ -1177,6 +1177,8 @@ declare const CloudUpload: (props: SvgIconProps) => react_jsx_runtime.JSX.Elemen
|
|
|
1177
1177
|
|
|
1178
1178
|
declare const RadioSelect: (props: SvgIconProps) => react_jsx_runtime.JSX.Element;
|
|
1179
1179
|
|
|
1180
|
+
declare const MapPinXMark: (props: SvgIconProps) => react_jsx_runtime.JSX.Element;
|
|
1181
|
+
|
|
1180
1182
|
declare const SuccessToast: (props: SvgIconProps) => react_jsx_runtime.JSX.Element;
|
|
1181
1183
|
|
|
1182
1184
|
declare const WarningToast: (props: SvgIconProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -1239,6 +1241,7 @@ declare const Icons_InfoToast: typeof InfoToast;
|
|
|
1239
1241
|
declare const Icons_KeyCommand: typeof KeyCommand;
|
|
1240
1242
|
declare const Icons_Loader: typeof Loader;
|
|
1241
1243
|
declare const Icons_LongArrowUpLeftSolid: typeof LongArrowUpLeftSolid;
|
|
1244
|
+
declare const Icons_MapPinXMark: typeof MapPinXMark;
|
|
1242
1245
|
declare const Icons_MoreHorizontal: typeof MoreHorizontal;
|
|
1243
1246
|
declare const Icons_NavArrowDown: typeof NavArrowDown;
|
|
1244
1247
|
declare const Icons_NavArrowDownSolid: typeof NavArrowDownSolid;
|
|
@@ -1262,7 +1265,7 @@ declare const Icons_WarningToast: typeof WarningToast;
|
|
|
1262
1265
|
declare const Icons_XMark: typeof XMark;
|
|
1263
1266
|
declare const Icons_XMarkSolid: typeof XMarkSolid;
|
|
1264
1267
|
declare namespace Icons {
|
|
1265
|
-
export { Icons_Attachment as Attachment, Icons_Bank as Bank, Icons_BellNotification as BellNotification, Icons_Building as Building, Icons_Calendar as Calendar, Icons_ChatBubbleQuestionSolid as ChatBubbleQuestionSolid, Icons_CheckCircleSolid as CheckCircleSolid, Icons_CheckboxDefault as CheckboxDefault, Icons_CheckboxIndeterminate as CheckboxIndeterminate, Icons_CheckboxSelect as CheckboxSelect, Icons_Circle as Circle, Icons_ClipboardCheck as ClipboardCheck, Icons_Clock as Clock, Icons_CloudUpload as CloudUpload, Icons_Copy as Copy, Icons_Download as Download, Icons_Edit as Edit, Icons_ErrorToast as ErrorToast, Icons_Eye as Eye, Icons_EyeClosed as EyeClosed, Icons_FilterList as FilterList, Icons_HelpCircle as HelpCircle, Icons_InfoCircle as InfoCircle, Icons_InfoCircleSolid as InfoCircleSolid, Icons_InfoToast as InfoToast, Icons_KeyCommand as KeyCommand, Icons_Loader as Loader, Icons_LongArrowUpLeftSolid as LongArrowUpLeftSolid, Icons_MoreHorizontal as MoreHorizontal, Icons_NavArrowDown as NavArrowDown, Icons_NavArrowDownSolid as NavArrowDownSolid, Icons_NavArrowLeft as NavArrowLeft, Icons_NavArrowRight as NavArrowRight, Icons_Plus as Plus, Icons_PlusSquare as PlusSquare, Icons_RadioDefault as RadioDefault, Icons_RadioSelect as RadioSelect, Icons_Search as Search, Icons_Settings as Settings, Icons_SortDown as SortDown, Icons_SortUp as SortUp, Icons_StatDown as StatDown, Icons_StatUp as StatUp, Icons_SuccessToast as SuccessToast, Icons_Trash as Trash, Icons_User as User, Icons_UserSolid as UserSolid, Icons_WarningToast as WarningToast, Icons_XMark as XMark, Icons_XMarkSolid as XMarkSolid };
|
|
1268
|
+
export { Icons_Attachment as Attachment, Icons_Bank as Bank, Icons_BellNotification as BellNotification, Icons_Building as Building, Icons_Calendar as Calendar, Icons_ChatBubbleQuestionSolid as ChatBubbleQuestionSolid, Icons_CheckCircleSolid as CheckCircleSolid, Icons_CheckboxDefault as CheckboxDefault, Icons_CheckboxIndeterminate as CheckboxIndeterminate, Icons_CheckboxSelect as CheckboxSelect, Icons_Circle as Circle, Icons_ClipboardCheck as ClipboardCheck, Icons_Clock as Clock, Icons_CloudUpload as CloudUpload, Icons_Copy as Copy, Icons_Download as Download, Icons_Edit as Edit, Icons_ErrorToast as ErrorToast, Icons_Eye as Eye, Icons_EyeClosed as EyeClosed, Icons_FilterList as FilterList, Icons_HelpCircle as HelpCircle, Icons_InfoCircle as InfoCircle, Icons_InfoCircleSolid as InfoCircleSolid, Icons_InfoToast as InfoToast, Icons_KeyCommand as KeyCommand, Icons_Loader as Loader, Icons_LongArrowUpLeftSolid as LongArrowUpLeftSolid, Icons_MapPinXMark as MapPinXMark, Icons_MoreHorizontal as MoreHorizontal, Icons_NavArrowDown as NavArrowDown, Icons_NavArrowDownSolid as NavArrowDownSolid, Icons_NavArrowLeft as NavArrowLeft, Icons_NavArrowRight as NavArrowRight, Icons_Plus as Plus, Icons_PlusSquare as PlusSquare, Icons_RadioDefault as RadioDefault, Icons_RadioSelect as RadioSelect, Icons_Search as Search, Icons_Settings as Settings, Icons_SortDown as SortDown, Icons_SortUp as SortUp, Icons_StatDown as StatDown, Icons_StatUp as StatUp, Icons_SuccessToast as SuccessToast, Icons_Trash as Trash, Icons_User as User, Icons_UserSolid as UserSolid, Icons_WarningToast as WarningToast, Icons_XMark as XMark, Icons_XMarkSolid as XMarkSolid };
|
|
1266
1269
|
}
|
|
1267
1270
|
|
|
1268
1271
|
type IconType = keyof typeof Icons;
|
|
@@ -1652,6 +1655,203 @@ interface FormProps<T extends FieldValues> extends Omit<BoxProps, 'onSubmit'> {
|
|
|
1652
1655
|
}
|
|
1653
1656
|
declare const Form: <T extends FieldValues>({ children, onSubmit, methods, ...rest }: FormProps<T>) => react_jsx_runtime.JSX.Element;
|
|
1654
1657
|
|
|
1658
|
+
interface MainTextMatchedSubstrings {
|
|
1659
|
+
offset: number;
|
|
1660
|
+
length: number;
|
|
1661
|
+
}
|
|
1662
|
+
interface StructuredFormatting {
|
|
1663
|
+
main_text: string;
|
|
1664
|
+
main_text_matched_substrings: readonly MainTextMatchedSubstrings[];
|
|
1665
|
+
secondary_text?: string;
|
|
1666
|
+
}
|
|
1667
|
+
interface PlaceType {
|
|
1668
|
+
description: string;
|
|
1669
|
+
place_id?: string;
|
|
1670
|
+
structured_formatting: StructuredFormatting;
|
|
1671
|
+
}
|
|
1672
|
+
interface GooglePlacesContextValue {
|
|
1673
|
+
apiKey: string;
|
|
1674
|
+
loaded: boolean;
|
|
1675
|
+
error: Error | null;
|
|
1676
|
+
}
|
|
1677
|
+
interface AddressComponent {
|
|
1678
|
+
longText: string;
|
|
1679
|
+
shortText: string;
|
|
1680
|
+
types: string[];
|
|
1681
|
+
}
|
|
1682
|
+
interface ParsedAddress {
|
|
1683
|
+
/** Street number */
|
|
1684
|
+
streetNumber?: string;
|
|
1685
|
+
/** Street/Route name */
|
|
1686
|
+
street?: string;
|
|
1687
|
+
/** Full street address (number + street) */
|
|
1688
|
+
address?: string;
|
|
1689
|
+
/** Neighborhood/Sublocality */
|
|
1690
|
+
neighborhood?: string;
|
|
1691
|
+
/** City/Locality */
|
|
1692
|
+
city?: string;
|
|
1693
|
+
/** State/Administrative area level 1 */
|
|
1694
|
+
state?: string;
|
|
1695
|
+
/** State short code (e.g., "CA", "NY") */
|
|
1696
|
+
stateCode?: string;
|
|
1697
|
+
/** Country */
|
|
1698
|
+
country?: string;
|
|
1699
|
+
/** Country code (e.g., "US", "NG") */
|
|
1700
|
+
countryCode?: string;
|
|
1701
|
+
/** Postal/ZIP code */
|
|
1702
|
+
postalCode?: string;
|
|
1703
|
+
/** County/Administrative area level 2 */
|
|
1704
|
+
county?: string;
|
|
1705
|
+
}
|
|
1706
|
+
interface Coordinates {
|
|
1707
|
+
latitude: number;
|
|
1708
|
+
longitude: number;
|
|
1709
|
+
}
|
|
1710
|
+
interface PlaceDetails {
|
|
1711
|
+
placeId: string;
|
|
1712
|
+
description: string;
|
|
1713
|
+
mainText: string;
|
|
1714
|
+
secondaryText?: string;
|
|
1715
|
+
/** @deprecated Use coordinates.latitude instead */
|
|
1716
|
+
lat?: number;
|
|
1717
|
+
/** @deprecated Use coordinates.longitude instead */
|
|
1718
|
+
lng?: number;
|
|
1719
|
+
formattedAddress?: string;
|
|
1720
|
+
/** Raw address components from Google */
|
|
1721
|
+
addressComponents?: AddressComponent[];
|
|
1722
|
+
/** Parsed address with structured fields */
|
|
1723
|
+
parsedAddress?: ParsedAddress;
|
|
1724
|
+
/** Coordinates object */
|
|
1725
|
+
coordinates?: Coordinates;
|
|
1726
|
+
}
|
|
1727
|
+
/**
|
|
1728
|
+
* Parse Google Places address components into structured address data
|
|
1729
|
+
*/
|
|
1730
|
+
declare const parseAddressComponents: (addressComponents: AddressComponent[] | undefined) => ParsedAddress;
|
|
1731
|
+
|
|
1732
|
+
interface GooglePlacesProviderProps {
|
|
1733
|
+
apiKey: string;
|
|
1734
|
+
children: React.ReactNode;
|
|
1735
|
+
/**
|
|
1736
|
+
* Additional libraries to load alongside 'places'
|
|
1737
|
+
* @default []
|
|
1738
|
+
*/
|
|
1739
|
+
libraries?: string[];
|
|
1740
|
+
}
|
|
1741
|
+
declare const GooglePlacesProvider: ({ apiKey, children, libraries }: GooglePlacesProviderProps) => react_jsx_runtime.JSX.Element;
|
|
1742
|
+
declare const useGooglePlacesContext: () => GooglePlacesContextValue;
|
|
1743
|
+
declare const useGooglePlacesLoaded: () => boolean;
|
|
1744
|
+
|
|
1745
|
+
interface UseGooglePlacesAutocompleteOptions {
|
|
1746
|
+
/**
|
|
1747
|
+
* Debounce delay in milliseconds
|
|
1748
|
+
* @default 300
|
|
1749
|
+
*/
|
|
1750
|
+
debounceMs?: number;
|
|
1751
|
+
/**
|
|
1752
|
+
* Types of places to search for
|
|
1753
|
+
* @see https://developers.google.com/maps/documentation/places/web-service/supported_types
|
|
1754
|
+
*/
|
|
1755
|
+
types?: string[];
|
|
1756
|
+
/**
|
|
1757
|
+
* Country restrictions (ISO 3166-1 Alpha-2 codes)
|
|
1758
|
+
* @example ['us', 'ca']
|
|
1759
|
+
*/
|
|
1760
|
+
componentRestrictions?: {
|
|
1761
|
+
country: string | string[];
|
|
1762
|
+
};
|
|
1763
|
+
/**
|
|
1764
|
+
* Whether to fetch place details when a place is selected
|
|
1765
|
+
* @default false
|
|
1766
|
+
*/
|
|
1767
|
+
fetchPlaceDetails?: boolean;
|
|
1768
|
+
/**
|
|
1769
|
+
* Fields to fetch when getting place details
|
|
1770
|
+
* @see https://developers.google.com/maps/documentation/javascript/place-class#place-class
|
|
1771
|
+
* @default ['location', 'formattedAddress', 'addressComponents', 'displayName']
|
|
1772
|
+
*/
|
|
1773
|
+
placeDetailsFields?: string[];
|
|
1774
|
+
}
|
|
1775
|
+
interface UseGooglePlacesAutocompleteReturn {
|
|
1776
|
+
/** Current input value */
|
|
1777
|
+
inputValue: string;
|
|
1778
|
+
/** Set input value */
|
|
1779
|
+
setInputValue: (value: string) => void;
|
|
1780
|
+
/** Selected place */
|
|
1781
|
+
value: PlaceType | null;
|
|
1782
|
+
/** Set selected place */
|
|
1783
|
+
setValue: (value: PlaceType | null) => void;
|
|
1784
|
+
/** Autocomplete options */
|
|
1785
|
+
options: readonly PlaceType[];
|
|
1786
|
+
/** Whether the API is loaded */
|
|
1787
|
+
loaded: boolean;
|
|
1788
|
+
/** Loading state for fetching suggestions */
|
|
1789
|
+
loading: boolean;
|
|
1790
|
+
/** Error state */
|
|
1791
|
+
error: Error | null;
|
|
1792
|
+
/** Get place details for a selected place */
|
|
1793
|
+
getPlaceDetails: (placeId: string) => Promise<PlaceDetails | null>;
|
|
1794
|
+
/** Clear the selection */
|
|
1795
|
+
clear: () => void;
|
|
1796
|
+
}
|
|
1797
|
+
declare const useGooglePlacesAutocomplete: (options?: UseGooglePlacesAutocompleteOptions) => UseGooglePlacesAutocompleteReturn;
|
|
1798
|
+
|
|
1799
|
+
interface GooglePlacesAutocompleteProps extends UseGooglePlacesAutocompleteOptions, Omit<AutocompleteProps<PlaceType, false, false, false>, 'options' | 'renderInput' | 'value' | 'onChange' | 'onInputChange' | 'loading'> {
|
|
1800
|
+
/** Text field label */
|
|
1801
|
+
label?: string;
|
|
1802
|
+
/** Text field placeholder */
|
|
1803
|
+
placeholder?: string;
|
|
1804
|
+
/** Helper text */
|
|
1805
|
+
helperText?: React.ReactNode;
|
|
1806
|
+
/** Error state */
|
|
1807
|
+
error?: boolean;
|
|
1808
|
+
/** Error message */
|
|
1809
|
+
errorMessage?: string;
|
|
1810
|
+
/** Required field */
|
|
1811
|
+
required?: boolean;
|
|
1812
|
+
/** Callback when value changes */
|
|
1813
|
+
onChange?: (value: PlaceType | null) => void;
|
|
1814
|
+
/** Callback when place details are fetched */
|
|
1815
|
+
onPlaceDetailsChange?: (details: any) => void;
|
|
1816
|
+
/** Additional TextField props */
|
|
1817
|
+
textFieldProps?: Partial<TextFieldProps>;
|
|
1818
|
+
/** Custom location icon component */
|
|
1819
|
+
LocationIcon?: React.ComponentType<{
|
|
1820
|
+
sx?: object;
|
|
1821
|
+
}>;
|
|
1822
|
+
/** No options text */
|
|
1823
|
+
noOptionsText?: string;
|
|
1824
|
+
/** External value (controlled) */
|
|
1825
|
+
value?: PlaceType | null;
|
|
1826
|
+
/** External input value (controlled) */
|
|
1827
|
+
inputValue?: string;
|
|
1828
|
+
}
|
|
1829
|
+
declare const GooglePlacesAutocomplete: ({ debounceMs, types, componentRestrictions, fetchPlaceDetails, placeDetailsFields, label, placeholder, helperText, error, errorMessage, required, onChange, onPlaceDetailsChange, textFieldProps, LocationIcon, noOptionsText, value: externalValue, inputValue: externalInputValue, ...autocompleteProps }: GooglePlacesAutocompleteProps) => react_jsx_runtime.JSX.Element;
|
|
1830
|
+
|
|
1831
|
+
interface RHFGooglePlacesAutocompleteProps extends Omit<GooglePlacesAutocompleteProps, 'value' | 'onChange' | 'error' | 'errorMessage'> {
|
|
1832
|
+
/** Field name */
|
|
1833
|
+
name: string;
|
|
1834
|
+
/** Helper text */
|
|
1835
|
+
helperText?: React.ReactNode;
|
|
1836
|
+
/**
|
|
1837
|
+
* What to store in the form value
|
|
1838
|
+
* - 'full': Store the entire PlaceType object
|
|
1839
|
+
* - 'description': Store only the description string
|
|
1840
|
+
* - 'details': Store the PlaceDetails object (requires fetchPlaceDetails=true)
|
|
1841
|
+
* @default 'full'
|
|
1842
|
+
*/
|
|
1843
|
+
valueType?: 'full' | 'description' | 'details';
|
|
1844
|
+
/**
|
|
1845
|
+
* Callback when value changes (receives the raw PlaceType)
|
|
1846
|
+
*/
|
|
1847
|
+
onValueChange?: (value: PlaceType | null) => void;
|
|
1848
|
+
/**
|
|
1849
|
+
* Callback when place details are fetched
|
|
1850
|
+
*/
|
|
1851
|
+
onPlaceDetailsChange?: (details: PlaceDetails | null) => void;
|
|
1852
|
+
}
|
|
1853
|
+
declare const RHFGooglePlacesAutocomplete: ({ name, helperText, valueType, onValueChange, onPlaceDetailsChange, fetchPlaceDetails, ...other }: RHFGooglePlacesAutocompleteProps) => react_jsx_runtime.JSX.Element;
|
|
1854
|
+
|
|
1655
1855
|
/**
|
|
1656
1856
|
* Type definitions for date picker components with clearable option.
|
|
1657
1857
|
*/
|
|
@@ -1748,6 +1948,18 @@ interface RHFRadioGroupProps extends Omit<RadioGroupProps, 'name' | 'control'> {
|
|
|
1748
1948
|
}
|
|
1749
1949
|
declare const RHFRadioGroup: ({ name, label, options, helperText, slotProps, ...other }: RHFRadioGroupProps) => react_jsx_runtime.JSX.Element;
|
|
1750
1950
|
|
|
1951
|
+
type RHFSelectOption = {
|
|
1952
|
+
value: string | number;
|
|
1953
|
+
label: string;
|
|
1954
|
+
disabled?: boolean;
|
|
1955
|
+
};
|
|
1956
|
+
type RHFSelectProps = Omit<TextFieldProps, 'select' | 'name'> & {
|
|
1957
|
+
name: string;
|
|
1958
|
+
options: RHFSelectOption[];
|
|
1959
|
+
placeholder?: string;
|
|
1960
|
+
};
|
|
1961
|
+
declare const RHFSelect: ({ name, options, helperText, placeholder, slotProps, ...rest }: RHFSelectProps) => react_jsx_runtime.JSX.Element;
|
|
1962
|
+
|
|
1751
1963
|
interface RHFUploadProps extends Omit<UploadProps, 'value'> {
|
|
1752
1964
|
name: string;
|
|
1753
1965
|
multiple?: boolean;
|
|
@@ -1823,6 +2035,7 @@ declare const Field: {
|
|
|
1823
2035
|
};
|
|
1824
2036
|
}) => react_jsx_runtime.JSX.Element;
|
|
1825
2037
|
Upload: ({ name, multiple, helperText, ...rest }: RHFUploadProps) => react_jsx_runtime.JSX.Element;
|
|
2038
|
+
Select: ({ name, options, helperText, placeholder, slotProps, ...rest }: RHFSelectProps) => react_jsx_runtime.JSX.Element;
|
|
1826
2039
|
Text: ({ name, helperText, type, slotProps, ...rest }: _mui_material.TextFieldProps) => react_jsx_runtime.JSX.Element;
|
|
1827
2040
|
Radio: ({ name, label, options, helperText, slotProps, ...other }: RHFRadioGroupProps) => react_jsx_runtime.JSX.Element;
|
|
1828
2041
|
Checkbox: ({ name, description, helperText, label, sx, slotProps, ...other }: RHFCheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -1832,6 +2045,7 @@ declare const Field: {
|
|
|
1832
2045
|
Time: react.MemoExoticComponent<({ name, slotProps, helperText, clearable, format, ...other }: RHFTimePickerProps) => react_jsx_runtime.JSX.Element>;
|
|
1833
2046
|
DateTime: react.MemoExoticComponent<({ name, slotProps, helperText, clearable, format, ...other }: RHFDateTimePickerProps) => react_jsx_runtime.JSX.Element>;
|
|
1834
2047
|
DateRange: typeof RHFDateRangePicker;
|
|
2048
|
+
GooglePlacesAutocomplete: ({ name, helperText, valueType, onValueChange, onPlaceDetailsChange, fetchPlaceDetails, ...other }: RHFGooglePlacesAutocompleteProps) => react_jsx_runtime.JSX.Element;
|
|
1835
2049
|
};
|
|
1836
2050
|
|
|
1837
2051
|
type RHFSwitchProps = Omit<FormControlLabelProps, 'name' | 'control'> & {
|
|
@@ -2453,4 +2667,4 @@ type ThemeProviderProps = {
|
|
|
2453
2667
|
};
|
|
2454
2668
|
declare const ThemeProvider: ({ children }: ThemeProviderProps) => react_jsx_runtime.JSX.Element;
|
|
2455
2669
|
|
|
2456
|
-
export { AnimatedLogo, Attachment, Bank, BellNotification, Building, Calendar, ChatBubbleQuestionSolid, CheckCircleSolid, CheckboxDefault, CheckboxIndeterminate, CheckboxSelect, Circle, ClipboardCheck, Clock, CloudUpload, type ColorSchema, Copy, CopyButton, CustomDialog, type CustomDialogProps, CustomDrawer, type CustomDrawerProps, type CustomShadowOptions, type CustomSpacingOptions, type DatePickerProps, type DatePreset, type DatePresetOption, type DateRange, DateRangeDropdown, type DateRangeDropdownProps, DateRangePicker, type DateRangePickerProps, type DateTimePickerProps, Download, Edit, EmptyContent, type EmptyContentProps, ErrorToast, Eye, EyeClosed, FeedbackDialog, type FeedbackDialogProps, type FeedbackDialogSlotProps, Field, FilterDropdown, type FilterDropdownProps, FilterList, Form, HelpCircle, Icon, type IconProps, type IconType, Image, type ImageProps, type ImageStatus, InfoCircle, InfoCircleSolid, InfoToast, KeyCommand, Loader, LoadingScreen, LocalStorageAvailable, LocalStorageGetItem, Logo, LongArrowUpLeftSolid, MoreHorizontal, NavArrowDown, NavArrowDownSolid, NavArrowLeft, NavArrowRight, OTPInput, type OTPInputProps, Plus, PlusSquare, RHFAutocomplete, type RHFAutocompleteProps, RHFCheckbox, type RHFCheckboxProps, RHFDatePicker, type RHFDatePickerProps, RHFDateRangePicker, type RHFDateRangePickerProps, RHFDateTimePicker, type RHFDateTimePickerProps, RHFMultiCheckbox, type RHFMultiCheckboxOption, type RHFMultiCheckboxProps, RHFMultiSwitch, RHFOTPInput, type RHFOTPInputProps, RHFRadioGroup, type RHFRadioGroupProps, RHFSwitch, RHFTextField, RHFTimePicker, type RHFTimePickerProps, RHFUpload, type RHFUploadProps, RadioDefault, RadioSelect, type RadiusOptions, STORAGE_KEY, Search, Settings, SettingsConsumer, SettingsContext, type SettingsContextProps, SettingsProvider, type SettingsValueProps, type SortDirection, SortDown, SortDropdown, type SortDropdownProps, type SortOption, SortUp, SplashScreen, StatDown, StatUp, SuccessToast, Table, TablePagination, ThemeProvider, type TimePickerProps, Toast, ToolbarButton, type ToolbarButtonProps, ToolbarDatePickerButton, type ToolbarDatePickerButtonProps, ToolbarFilterButton, type ToolbarFilterButtonProps, ToolbarSearchField, type ToolbarSearchFieldProps, ToolbarSettingsButton, type ToolbarSettingsButtonProps, ToolbarSortButton, type ToolbarSortButtonProps, ToolbarTodayButton, type ToolbarTodayButtonProps, ToolbarViewSwitcher, type ToolbarViewSwitcherProps, Trash, Upload, type UploadProps, type UseBooleanReturnType, type UseSetStateReturnType, User, UserSolid, type ViewOption, WarningToast, XMark, XMarkSolid, action, apexChartsStyles, background, baseAction, basePalette, bgBlur, bgGradient, border, borderGradient, breakpoints, colorSchemes, common, components, createPaletteChannel, createShadowColor, createTheme, customShadows, customSpacing, darkPalette, defaultPresets, defaultSettings, dialogClasses, drawerClasses, error, fCurrency, fData, fNumber, fPercent, fShortenNumber, feedbackDialogClasses, formatFullname, getCurrencySymbol, getDateRangeFromPreset, getDefaultChartOptions, getInitials, getStorage, grey, hexToRgbChannel, hideScrollX, hideScrollY, icon, iconClasses, info, isEqual, lightPalette, maxLine, mediaQueries, menuItem, neutral, orderBy, paper, paramCase, primary, primaryFont, pxToRem, radius, remToPx, removeStorage, responsiveFontSizes, schemeConfig, secondary, secondaryFont, sentenceCase, setFont, setStorage, shadows, snakeCase, splitFullname, stylesMode, success, surface, tertiaryFont, text, textGradient, toolbarClasses, typography, updateComponentsWithSettings, updateCoreWithSettings, useBoolean, useCopyToClipboard, useCountdownDate, useCountdownSeconds, useEventListener, useLocalStorage, usePopover, useResponsive, useScrollOffSetTop, useSetState, useSettings, useWidth, varAlpha, warning };
|
|
2670
|
+
export { type AddressComponent, AnimatedLogo, Attachment, Bank, BellNotification, Building, Calendar, ChatBubbleQuestionSolid, CheckCircleSolid, CheckboxDefault, CheckboxIndeterminate, CheckboxSelect, Circle, ClipboardCheck, Clock, CloudUpload, type ColorSchema, type Coordinates, Copy, CopyButton, CustomDialog, type CustomDialogProps, CustomDrawer, type CustomDrawerProps, type CustomShadowOptions, type CustomSpacingOptions, type DatePickerProps, type DatePreset, type DatePresetOption, type DateRange, DateRangeDropdown, type DateRangeDropdownProps, DateRangePicker, type DateRangePickerProps, type DateTimePickerProps, Download, Edit, EmptyContent, type EmptyContentProps, ErrorToast, Eye, EyeClosed, FeedbackDialog, type FeedbackDialogProps, type FeedbackDialogSlotProps, Field, FilterDropdown, type FilterDropdownProps, FilterList, Form, GooglePlacesAutocomplete, type GooglePlacesAutocompleteProps, type GooglePlacesContextValue, GooglePlacesProvider, type GooglePlacesProviderProps, HelpCircle, Icon, type IconProps, type IconType, Image, type ImageProps, type ImageStatus, InfoCircle, InfoCircleSolid, InfoToast, KeyCommand, Loader, LoadingScreen, LocalStorageAvailable, LocalStorageGetItem, Logo, LongArrowUpLeftSolid, type MainTextMatchedSubstrings, MapPinXMark, MoreHorizontal, NavArrowDown, NavArrowDownSolid, NavArrowLeft, NavArrowRight, OTPInput, type OTPInputProps, type ParsedAddress, type PlaceDetails, type PlaceType, Plus, PlusSquare, RHFAutocomplete, type RHFAutocompleteProps, RHFCheckbox, type RHFCheckboxProps, RHFDatePicker, type RHFDatePickerProps, RHFDateRangePicker, type RHFDateRangePickerProps, RHFDateTimePicker, type RHFDateTimePickerProps, RHFGooglePlacesAutocomplete, type RHFGooglePlacesAutocompleteProps, RHFMultiCheckbox, type RHFMultiCheckboxOption, type RHFMultiCheckboxProps, RHFMultiSwitch, RHFOTPInput, type RHFOTPInputProps, RHFRadioGroup, type RHFRadioGroupProps, RHFSelect, type RHFSelectOption, type RHFSelectProps, RHFSwitch, RHFTextField, RHFTimePicker, type RHFTimePickerProps, RHFUpload, type RHFUploadProps, RadioDefault, RadioSelect, type RadiusOptions, STORAGE_KEY, Search, Settings, SettingsConsumer, SettingsContext, type SettingsContextProps, SettingsProvider, type SettingsValueProps, type SortDirection, SortDown, SortDropdown, type SortDropdownProps, type SortOption, SortUp, SplashScreen, StatDown, StatUp, type StructuredFormatting, SuccessToast, Table, TablePagination, ThemeProvider, type TimePickerProps, Toast, ToolbarButton, type ToolbarButtonProps, ToolbarDatePickerButton, type ToolbarDatePickerButtonProps, ToolbarFilterButton, type ToolbarFilterButtonProps, ToolbarSearchField, type ToolbarSearchFieldProps, ToolbarSettingsButton, type ToolbarSettingsButtonProps, ToolbarSortButton, type ToolbarSortButtonProps, ToolbarTodayButton, type ToolbarTodayButtonProps, ToolbarViewSwitcher, type ToolbarViewSwitcherProps, Trash, Upload, type UploadProps, type UseBooleanReturnType, type UseGooglePlacesAutocompleteOptions, type UseGooglePlacesAutocompleteReturn, type UseSetStateReturnType, User, UserSolid, type ViewOption, WarningToast, XMark, XMarkSolid, action, apexChartsStyles, background, baseAction, basePalette, bgBlur, bgGradient, border, borderGradient, breakpoints, colorSchemes, common, components, createPaletteChannel, createShadowColor, createTheme, customShadows, customSpacing, darkPalette, defaultPresets, defaultSettings, dialogClasses, drawerClasses, error, fCurrency, fData, fNumber, fPercent, fShortenNumber, feedbackDialogClasses, formatFullname, getCurrencySymbol, getDateRangeFromPreset, getDefaultChartOptions, getInitials, getStorage, grey, hexToRgbChannel, hideScrollX, hideScrollY, icon, iconClasses, info, isEqual, lightPalette, maxLine, mediaQueries, menuItem, neutral, orderBy, paper, paramCase, parseAddressComponents, primary, primaryFont, pxToRem, radius, remToPx, removeStorage, responsiveFontSizes, schemeConfig, secondary, secondaryFont, sentenceCase, setFont, setStorage, shadows, snakeCase, splitFullname, stylesMode, success, surface, tertiaryFont, text, textGradient, toolbarClasses, typography, updateComponentsWithSettings, updateCoreWithSettings, useBoolean, useCopyToClipboard, useCountdownDate, useCountdownSeconds, useEventListener, useGooglePlacesAutocomplete, useGooglePlacesContext, useGooglePlacesLoaded, useLocalStorage, usePopover, useResponsive, useScrollOffSetTop, useSetState, useSettings, useWidth, varAlpha, warning };
|
package/dist/index.d.ts
CHANGED
|
@@ -16,10 +16,11 @@ import { PopoverProps } from '@mui/material/Popover';
|
|
|
16
16
|
import { ButtonBaseProps } from '@mui/material/ButtonBase';
|
|
17
17
|
import { InputBaseProps } from '@mui/material/InputBase';
|
|
18
18
|
import { FieldValues, UseFormReturn, SubmitHandler } from 'react-hook-form';
|
|
19
|
+
import { TextFieldProps } from '@mui/material/TextField';
|
|
20
|
+
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
|
19
21
|
import { DatePickerProps as DatePickerProps$1 } from '@mui/x-date-pickers/DatePicker';
|
|
20
22
|
import { TimePickerProps as TimePickerProps$1 } from '@mui/x-date-pickers/TimePicker';
|
|
21
23
|
import { DateTimePickerProps as DateTimePickerProps$1 } from '@mui/x-date-pickers/DateTimePicker';
|
|
22
|
-
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
|
23
24
|
import { CheckboxProps } from '@mui/material/Checkbox';
|
|
24
25
|
import { FormGroupProps } from '@mui/material/FormGroup';
|
|
25
26
|
import { FormLabelProps } from '@mui/material/FormLabel';
|
|
@@ -28,7 +29,6 @@ import { FormHelperTextProps } from '@mui/material/FormHelperText';
|
|
|
28
29
|
import { FormControlLabelProps } from '@mui/material/FormControlLabel';
|
|
29
30
|
import { RadioProps } from '@mui/material/Radio';
|
|
30
31
|
import { RadioGroupProps } from '@mui/material/RadioGroup';
|
|
31
|
-
import { TextFieldProps } from '@mui/material/TextField';
|
|
32
32
|
import { SwitchProps } from '@mui/material/Switch';
|
|
33
33
|
export * from 'sonner';
|
|
34
34
|
|
|
@@ -1177,6 +1177,8 @@ declare const CloudUpload: (props: SvgIconProps) => react_jsx_runtime.JSX.Elemen
|
|
|
1177
1177
|
|
|
1178
1178
|
declare const RadioSelect: (props: SvgIconProps) => react_jsx_runtime.JSX.Element;
|
|
1179
1179
|
|
|
1180
|
+
declare const MapPinXMark: (props: SvgIconProps) => react_jsx_runtime.JSX.Element;
|
|
1181
|
+
|
|
1180
1182
|
declare const SuccessToast: (props: SvgIconProps) => react_jsx_runtime.JSX.Element;
|
|
1181
1183
|
|
|
1182
1184
|
declare const WarningToast: (props: SvgIconProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -1239,6 +1241,7 @@ declare const Icons_InfoToast: typeof InfoToast;
|
|
|
1239
1241
|
declare const Icons_KeyCommand: typeof KeyCommand;
|
|
1240
1242
|
declare const Icons_Loader: typeof Loader;
|
|
1241
1243
|
declare const Icons_LongArrowUpLeftSolid: typeof LongArrowUpLeftSolid;
|
|
1244
|
+
declare const Icons_MapPinXMark: typeof MapPinXMark;
|
|
1242
1245
|
declare const Icons_MoreHorizontal: typeof MoreHorizontal;
|
|
1243
1246
|
declare const Icons_NavArrowDown: typeof NavArrowDown;
|
|
1244
1247
|
declare const Icons_NavArrowDownSolid: typeof NavArrowDownSolid;
|
|
@@ -1262,7 +1265,7 @@ declare const Icons_WarningToast: typeof WarningToast;
|
|
|
1262
1265
|
declare const Icons_XMark: typeof XMark;
|
|
1263
1266
|
declare const Icons_XMarkSolid: typeof XMarkSolid;
|
|
1264
1267
|
declare namespace Icons {
|
|
1265
|
-
export { Icons_Attachment as Attachment, Icons_Bank as Bank, Icons_BellNotification as BellNotification, Icons_Building as Building, Icons_Calendar as Calendar, Icons_ChatBubbleQuestionSolid as ChatBubbleQuestionSolid, Icons_CheckCircleSolid as CheckCircleSolid, Icons_CheckboxDefault as CheckboxDefault, Icons_CheckboxIndeterminate as CheckboxIndeterminate, Icons_CheckboxSelect as CheckboxSelect, Icons_Circle as Circle, Icons_ClipboardCheck as ClipboardCheck, Icons_Clock as Clock, Icons_CloudUpload as CloudUpload, Icons_Copy as Copy, Icons_Download as Download, Icons_Edit as Edit, Icons_ErrorToast as ErrorToast, Icons_Eye as Eye, Icons_EyeClosed as EyeClosed, Icons_FilterList as FilterList, Icons_HelpCircle as HelpCircle, Icons_InfoCircle as InfoCircle, Icons_InfoCircleSolid as InfoCircleSolid, Icons_InfoToast as InfoToast, Icons_KeyCommand as KeyCommand, Icons_Loader as Loader, Icons_LongArrowUpLeftSolid as LongArrowUpLeftSolid, Icons_MoreHorizontal as MoreHorizontal, Icons_NavArrowDown as NavArrowDown, Icons_NavArrowDownSolid as NavArrowDownSolid, Icons_NavArrowLeft as NavArrowLeft, Icons_NavArrowRight as NavArrowRight, Icons_Plus as Plus, Icons_PlusSquare as PlusSquare, Icons_RadioDefault as RadioDefault, Icons_RadioSelect as RadioSelect, Icons_Search as Search, Icons_Settings as Settings, Icons_SortDown as SortDown, Icons_SortUp as SortUp, Icons_StatDown as StatDown, Icons_StatUp as StatUp, Icons_SuccessToast as SuccessToast, Icons_Trash as Trash, Icons_User as User, Icons_UserSolid as UserSolid, Icons_WarningToast as WarningToast, Icons_XMark as XMark, Icons_XMarkSolid as XMarkSolid };
|
|
1268
|
+
export { Icons_Attachment as Attachment, Icons_Bank as Bank, Icons_BellNotification as BellNotification, Icons_Building as Building, Icons_Calendar as Calendar, Icons_ChatBubbleQuestionSolid as ChatBubbleQuestionSolid, Icons_CheckCircleSolid as CheckCircleSolid, Icons_CheckboxDefault as CheckboxDefault, Icons_CheckboxIndeterminate as CheckboxIndeterminate, Icons_CheckboxSelect as CheckboxSelect, Icons_Circle as Circle, Icons_ClipboardCheck as ClipboardCheck, Icons_Clock as Clock, Icons_CloudUpload as CloudUpload, Icons_Copy as Copy, Icons_Download as Download, Icons_Edit as Edit, Icons_ErrorToast as ErrorToast, Icons_Eye as Eye, Icons_EyeClosed as EyeClosed, Icons_FilterList as FilterList, Icons_HelpCircle as HelpCircle, Icons_InfoCircle as InfoCircle, Icons_InfoCircleSolid as InfoCircleSolid, Icons_InfoToast as InfoToast, Icons_KeyCommand as KeyCommand, Icons_Loader as Loader, Icons_LongArrowUpLeftSolid as LongArrowUpLeftSolid, Icons_MapPinXMark as MapPinXMark, Icons_MoreHorizontal as MoreHorizontal, Icons_NavArrowDown as NavArrowDown, Icons_NavArrowDownSolid as NavArrowDownSolid, Icons_NavArrowLeft as NavArrowLeft, Icons_NavArrowRight as NavArrowRight, Icons_Plus as Plus, Icons_PlusSquare as PlusSquare, Icons_RadioDefault as RadioDefault, Icons_RadioSelect as RadioSelect, Icons_Search as Search, Icons_Settings as Settings, Icons_SortDown as SortDown, Icons_SortUp as SortUp, Icons_StatDown as StatDown, Icons_StatUp as StatUp, Icons_SuccessToast as SuccessToast, Icons_Trash as Trash, Icons_User as User, Icons_UserSolid as UserSolid, Icons_WarningToast as WarningToast, Icons_XMark as XMark, Icons_XMarkSolid as XMarkSolid };
|
|
1266
1269
|
}
|
|
1267
1270
|
|
|
1268
1271
|
type IconType = keyof typeof Icons;
|
|
@@ -1652,6 +1655,203 @@ interface FormProps<T extends FieldValues> extends Omit<BoxProps, 'onSubmit'> {
|
|
|
1652
1655
|
}
|
|
1653
1656
|
declare const Form: <T extends FieldValues>({ children, onSubmit, methods, ...rest }: FormProps<T>) => react_jsx_runtime.JSX.Element;
|
|
1654
1657
|
|
|
1658
|
+
interface MainTextMatchedSubstrings {
|
|
1659
|
+
offset: number;
|
|
1660
|
+
length: number;
|
|
1661
|
+
}
|
|
1662
|
+
interface StructuredFormatting {
|
|
1663
|
+
main_text: string;
|
|
1664
|
+
main_text_matched_substrings: readonly MainTextMatchedSubstrings[];
|
|
1665
|
+
secondary_text?: string;
|
|
1666
|
+
}
|
|
1667
|
+
interface PlaceType {
|
|
1668
|
+
description: string;
|
|
1669
|
+
place_id?: string;
|
|
1670
|
+
structured_formatting: StructuredFormatting;
|
|
1671
|
+
}
|
|
1672
|
+
interface GooglePlacesContextValue {
|
|
1673
|
+
apiKey: string;
|
|
1674
|
+
loaded: boolean;
|
|
1675
|
+
error: Error | null;
|
|
1676
|
+
}
|
|
1677
|
+
interface AddressComponent {
|
|
1678
|
+
longText: string;
|
|
1679
|
+
shortText: string;
|
|
1680
|
+
types: string[];
|
|
1681
|
+
}
|
|
1682
|
+
interface ParsedAddress {
|
|
1683
|
+
/** Street number */
|
|
1684
|
+
streetNumber?: string;
|
|
1685
|
+
/** Street/Route name */
|
|
1686
|
+
street?: string;
|
|
1687
|
+
/** Full street address (number + street) */
|
|
1688
|
+
address?: string;
|
|
1689
|
+
/** Neighborhood/Sublocality */
|
|
1690
|
+
neighborhood?: string;
|
|
1691
|
+
/** City/Locality */
|
|
1692
|
+
city?: string;
|
|
1693
|
+
/** State/Administrative area level 1 */
|
|
1694
|
+
state?: string;
|
|
1695
|
+
/** State short code (e.g., "CA", "NY") */
|
|
1696
|
+
stateCode?: string;
|
|
1697
|
+
/** Country */
|
|
1698
|
+
country?: string;
|
|
1699
|
+
/** Country code (e.g., "US", "NG") */
|
|
1700
|
+
countryCode?: string;
|
|
1701
|
+
/** Postal/ZIP code */
|
|
1702
|
+
postalCode?: string;
|
|
1703
|
+
/** County/Administrative area level 2 */
|
|
1704
|
+
county?: string;
|
|
1705
|
+
}
|
|
1706
|
+
interface Coordinates {
|
|
1707
|
+
latitude: number;
|
|
1708
|
+
longitude: number;
|
|
1709
|
+
}
|
|
1710
|
+
interface PlaceDetails {
|
|
1711
|
+
placeId: string;
|
|
1712
|
+
description: string;
|
|
1713
|
+
mainText: string;
|
|
1714
|
+
secondaryText?: string;
|
|
1715
|
+
/** @deprecated Use coordinates.latitude instead */
|
|
1716
|
+
lat?: number;
|
|
1717
|
+
/** @deprecated Use coordinates.longitude instead */
|
|
1718
|
+
lng?: number;
|
|
1719
|
+
formattedAddress?: string;
|
|
1720
|
+
/** Raw address components from Google */
|
|
1721
|
+
addressComponents?: AddressComponent[];
|
|
1722
|
+
/** Parsed address with structured fields */
|
|
1723
|
+
parsedAddress?: ParsedAddress;
|
|
1724
|
+
/** Coordinates object */
|
|
1725
|
+
coordinates?: Coordinates;
|
|
1726
|
+
}
|
|
1727
|
+
/**
|
|
1728
|
+
* Parse Google Places address components into structured address data
|
|
1729
|
+
*/
|
|
1730
|
+
declare const parseAddressComponents: (addressComponents: AddressComponent[] | undefined) => ParsedAddress;
|
|
1731
|
+
|
|
1732
|
+
interface GooglePlacesProviderProps {
|
|
1733
|
+
apiKey: string;
|
|
1734
|
+
children: React.ReactNode;
|
|
1735
|
+
/**
|
|
1736
|
+
* Additional libraries to load alongside 'places'
|
|
1737
|
+
* @default []
|
|
1738
|
+
*/
|
|
1739
|
+
libraries?: string[];
|
|
1740
|
+
}
|
|
1741
|
+
declare const GooglePlacesProvider: ({ apiKey, children, libraries }: GooglePlacesProviderProps) => react_jsx_runtime.JSX.Element;
|
|
1742
|
+
declare const useGooglePlacesContext: () => GooglePlacesContextValue;
|
|
1743
|
+
declare const useGooglePlacesLoaded: () => boolean;
|
|
1744
|
+
|
|
1745
|
+
interface UseGooglePlacesAutocompleteOptions {
|
|
1746
|
+
/**
|
|
1747
|
+
* Debounce delay in milliseconds
|
|
1748
|
+
* @default 300
|
|
1749
|
+
*/
|
|
1750
|
+
debounceMs?: number;
|
|
1751
|
+
/**
|
|
1752
|
+
* Types of places to search for
|
|
1753
|
+
* @see https://developers.google.com/maps/documentation/places/web-service/supported_types
|
|
1754
|
+
*/
|
|
1755
|
+
types?: string[];
|
|
1756
|
+
/**
|
|
1757
|
+
* Country restrictions (ISO 3166-1 Alpha-2 codes)
|
|
1758
|
+
* @example ['us', 'ca']
|
|
1759
|
+
*/
|
|
1760
|
+
componentRestrictions?: {
|
|
1761
|
+
country: string | string[];
|
|
1762
|
+
};
|
|
1763
|
+
/**
|
|
1764
|
+
* Whether to fetch place details when a place is selected
|
|
1765
|
+
* @default false
|
|
1766
|
+
*/
|
|
1767
|
+
fetchPlaceDetails?: boolean;
|
|
1768
|
+
/**
|
|
1769
|
+
* Fields to fetch when getting place details
|
|
1770
|
+
* @see https://developers.google.com/maps/documentation/javascript/place-class#place-class
|
|
1771
|
+
* @default ['location', 'formattedAddress', 'addressComponents', 'displayName']
|
|
1772
|
+
*/
|
|
1773
|
+
placeDetailsFields?: string[];
|
|
1774
|
+
}
|
|
1775
|
+
interface UseGooglePlacesAutocompleteReturn {
|
|
1776
|
+
/** Current input value */
|
|
1777
|
+
inputValue: string;
|
|
1778
|
+
/** Set input value */
|
|
1779
|
+
setInputValue: (value: string) => void;
|
|
1780
|
+
/** Selected place */
|
|
1781
|
+
value: PlaceType | null;
|
|
1782
|
+
/** Set selected place */
|
|
1783
|
+
setValue: (value: PlaceType | null) => void;
|
|
1784
|
+
/** Autocomplete options */
|
|
1785
|
+
options: readonly PlaceType[];
|
|
1786
|
+
/** Whether the API is loaded */
|
|
1787
|
+
loaded: boolean;
|
|
1788
|
+
/** Loading state for fetching suggestions */
|
|
1789
|
+
loading: boolean;
|
|
1790
|
+
/** Error state */
|
|
1791
|
+
error: Error | null;
|
|
1792
|
+
/** Get place details for a selected place */
|
|
1793
|
+
getPlaceDetails: (placeId: string) => Promise<PlaceDetails | null>;
|
|
1794
|
+
/** Clear the selection */
|
|
1795
|
+
clear: () => void;
|
|
1796
|
+
}
|
|
1797
|
+
declare const useGooglePlacesAutocomplete: (options?: UseGooglePlacesAutocompleteOptions) => UseGooglePlacesAutocompleteReturn;
|
|
1798
|
+
|
|
1799
|
+
interface GooglePlacesAutocompleteProps extends UseGooglePlacesAutocompleteOptions, Omit<AutocompleteProps<PlaceType, false, false, false>, 'options' | 'renderInput' | 'value' | 'onChange' | 'onInputChange' | 'loading'> {
|
|
1800
|
+
/** Text field label */
|
|
1801
|
+
label?: string;
|
|
1802
|
+
/** Text field placeholder */
|
|
1803
|
+
placeholder?: string;
|
|
1804
|
+
/** Helper text */
|
|
1805
|
+
helperText?: React.ReactNode;
|
|
1806
|
+
/** Error state */
|
|
1807
|
+
error?: boolean;
|
|
1808
|
+
/** Error message */
|
|
1809
|
+
errorMessage?: string;
|
|
1810
|
+
/** Required field */
|
|
1811
|
+
required?: boolean;
|
|
1812
|
+
/** Callback when value changes */
|
|
1813
|
+
onChange?: (value: PlaceType | null) => void;
|
|
1814
|
+
/** Callback when place details are fetched */
|
|
1815
|
+
onPlaceDetailsChange?: (details: any) => void;
|
|
1816
|
+
/** Additional TextField props */
|
|
1817
|
+
textFieldProps?: Partial<TextFieldProps>;
|
|
1818
|
+
/** Custom location icon component */
|
|
1819
|
+
LocationIcon?: React.ComponentType<{
|
|
1820
|
+
sx?: object;
|
|
1821
|
+
}>;
|
|
1822
|
+
/** No options text */
|
|
1823
|
+
noOptionsText?: string;
|
|
1824
|
+
/** External value (controlled) */
|
|
1825
|
+
value?: PlaceType | null;
|
|
1826
|
+
/** External input value (controlled) */
|
|
1827
|
+
inputValue?: string;
|
|
1828
|
+
}
|
|
1829
|
+
declare const GooglePlacesAutocomplete: ({ debounceMs, types, componentRestrictions, fetchPlaceDetails, placeDetailsFields, label, placeholder, helperText, error, errorMessage, required, onChange, onPlaceDetailsChange, textFieldProps, LocationIcon, noOptionsText, value: externalValue, inputValue: externalInputValue, ...autocompleteProps }: GooglePlacesAutocompleteProps) => react_jsx_runtime.JSX.Element;
|
|
1830
|
+
|
|
1831
|
+
interface RHFGooglePlacesAutocompleteProps extends Omit<GooglePlacesAutocompleteProps, 'value' | 'onChange' | 'error' | 'errorMessage'> {
|
|
1832
|
+
/** Field name */
|
|
1833
|
+
name: string;
|
|
1834
|
+
/** Helper text */
|
|
1835
|
+
helperText?: React.ReactNode;
|
|
1836
|
+
/**
|
|
1837
|
+
* What to store in the form value
|
|
1838
|
+
* - 'full': Store the entire PlaceType object
|
|
1839
|
+
* - 'description': Store only the description string
|
|
1840
|
+
* - 'details': Store the PlaceDetails object (requires fetchPlaceDetails=true)
|
|
1841
|
+
* @default 'full'
|
|
1842
|
+
*/
|
|
1843
|
+
valueType?: 'full' | 'description' | 'details';
|
|
1844
|
+
/**
|
|
1845
|
+
* Callback when value changes (receives the raw PlaceType)
|
|
1846
|
+
*/
|
|
1847
|
+
onValueChange?: (value: PlaceType | null) => void;
|
|
1848
|
+
/**
|
|
1849
|
+
* Callback when place details are fetched
|
|
1850
|
+
*/
|
|
1851
|
+
onPlaceDetailsChange?: (details: PlaceDetails | null) => void;
|
|
1852
|
+
}
|
|
1853
|
+
declare const RHFGooglePlacesAutocomplete: ({ name, helperText, valueType, onValueChange, onPlaceDetailsChange, fetchPlaceDetails, ...other }: RHFGooglePlacesAutocompleteProps) => react_jsx_runtime.JSX.Element;
|
|
1854
|
+
|
|
1655
1855
|
/**
|
|
1656
1856
|
* Type definitions for date picker components with clearable option.
|
|
1657
1857
|
*/
|
|
@@ -1748,6 +1948,18 @@ interface RHFRadioGroupProps extends Omit<RadioGroupProps, 'name' | 'control'> {
|
|
|
1748
1948
|
}
|
|
1749
1949
|
declare const RHFRadioGroup: ({ name, label, options, helperText, slotProps, ...other }: RHFRadioGroupProps) => react_jsx_runtime.JSX.Element;
|
|
1750
1950
|
|
|
1951
|
+
type RHFSelectOption = {
|
|
1952
|
+
value: string | number;
|
|
1953
|
+
label: string;
|
|
1954
|
+
disabled?: boolean;
|
|
1955
|
+
};
|
|
1956
|
+
type RHFSelectProps = Omit<TextFieldProps, 'select' | 'name'> & {
|
|
1957
|
+
name: string;
|
|
1958
|
+
options: RHFSelectOption[];
|
|
1959
|
+
placeholder?: string;
|
|
1960
|
+
};
|
|
1961
|
+
declare const RHFSelect: ({ name, options, helperText, placeholder, slotProps, ...rest }: RHFSelectProps) => react_jsx_runtime.JSX.Element;
|
|
1962
|
+
|
|
1751
1963
|
interface RHFUploadProps extends Omit<UploadProps, 'value'> {
|
|
1752
1964
|
name: string;
|
|
1753
1965
|
multiple?: boolean;
|
|
@@ -1823,6 +2035,7 @@ declare const Field: {
|
|
|
1823
2035
|
};
|
|
1824
2036
|
}) => react_jsx_runtime.JSX.Element;
|
|
1825
2037
|
Upload: ({ name, multiple, helperText, ...rest }: RHFUploadProps) => react_jsx_runtime.JSX.Element;
|
|
2038
|
+
Select: ({ name, options, helperText, placeholder, slotProps, ...rest }: RHFSelectProps) => react_jsx_runtime.JSX.Element;
|
|
1826
2039
|
Text: ({ name, helperText, type, slotProps, ...rest }: _mui_material.TextFieldProps) => react_jsx_runtime.JSX.Element;
|
|
1827
2040
|
Radio: ({ name, label, options, helperText, slotProps, ...other }: RHFRadioGroupProps) => react_jsx_runtime.JSX.Element;
|
|
1828
2041
|
Checkbox: ({ name, description, helperText, label, sx, slotProps, ...other }: RHFCheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -1832,6 +2045,7 @@ declare const Field: {
|
|
|
1832
2045
|
Time: react.MemoExoticComponent<({ name, slotProps, helperText, clearable, format, ...other }: RHFTimePickerProps) => react_jsx_runtime.JSX.Element>;
|
|
1833
2046
|
DateTime: react.MemoExoticComponent<({ name, slotProps, helperText, clearable, format, ...other }: RHFDateTimePickerProps) => react_jsx_runtime.JSX.Element>;
|
|
1834
2047
|
DateRange: typeof RHFDateRangePicker;
|
|
2048
|
+
GooglePlacesAutocomplete: ({ name, helperText, valueType, onValueChange, onPlaceDetailsChange, fetchPlaceDetails, ...other }: RHFGooglePlacesAutocompleteProps) => react_jsx_runtime.JSX.Element;
|
|
1835
2049
|
};
|
|
1836
2050
|
|
|
1837
2051
|
type RHFSwitchProps = Omit<FormControlLabelProps, 'name' | 'control'> & {
|
|
@@ -2453,4 +2667,4 @@ type ThemeProviderProps = {
|
|
|
2453
2667
|
};
|
|
2454
2668
|
declare const ThemeProvider: ({ children }: ThemeProviderProps) => react_jsx_runtime.JSX.Element;
|
|
2455
2669
|
|
|
2456
|
-
export { AnimatedLogo, Attachment, Bank, BellNotification, Building, Calendar, ChatBubbleQuestionSolid, CheckCircleSolid, CheckboxDefault, CheckboxIndeterminate, CheckboxSelect, Circle, ClipboardCheck, Clock, CloudUpload, type ColorSchema, Copy, CopyButton, CustomDialog, type CustomDialogProps, CustomDrawer, type CustomDrawerProps, type CustomShadowOptions, type CustomSpacingOptions, type DatePickerProps, type DatePreset, type DatePresetOption, type DateRange, DateRangeDropdown, type DateRangeDropdownProps, DateRangePicker, type DateRangePickerProps, type DateTimePickerProps, Download, Edit, EmptyContent, type EmptyContentProps, ErrorToast, Eye, EyeClosed, FeedbackDialog, type FeedbackDialogProps, type FeedbackDialogSlotProps, Field, FilterDropdown, type FilterDropdownProps, FilterList, Form, HelpCircle, Icon, type IconProps, type IconType, Image, type ImageProps, type ImageStatus, InfoCircle, InfoCircleSolid, InfoToast, KeyCommand, Loader, LoadingScreen, LocalStorageAvailable, LocalStorageGetItem, Logo, LongArrowUpLeftSolid, MoreHorizontal, NavArrowDown, NavArrowDownSolid, NavArrowLeft, NavArrowRight, OTPInput, type OTPInputProps, Plus, PlusSquare, RHFAutocomplete, type RHFAutocompleteProps, RHFCheckbox, type RHFCheckboxProps, RHFDatePicker, type RHFDatePickerProps, RHFDateRangePicker, type RHFDateRangePickerProps, RHFDateTimePicker, type RHFDateTimePickerProps, RHFMultiCheckbox, type RHFMultiCheckboxOption, type RHFMultiCheckboxProps, RHFMultiSwitch, RHFOTPInput, type RHFOTPInputProps, RHFRadioGroup, type RHFRadioGroupProps, RHFSwitch, RHFTextField, RHFTimePicker, type RHFTimePickerProps, RHFUpload, type RHFUploadProps, RadioDefault, RadioSelect, type RadiusOptions, STORAGE_KEY, Search, Settings, SettingsConsumer, SettingsContext, type SettingsContextProps, SettingsProvider, type SettingsValueProps, type SortDirection, SortDown, SortDropdown, type SortDropdownProps, type SortOption, SortUp, SplashScreen, StatDown, StatUp, SuccessToast, Table, TablePagination, ThemeProvider, type TimePickerProps, Toast, ToolbarButton, type ToolbarButtonProps, ToolbarDatePickerButton, type ToolbarDatePickerButtonProps, ToolbarFilterButton, type ToolbarFilterButtonProps, ToolbarSearchField, type ToolbarSearchFieldProps, ToolbarSettingsButton, type ToolbarSettingsButtonProps, ToolbarSortButton, type ToolbarSortButtonProps, ToolbarTodayButton, type ToolbarTodayButtonProps, ToolbarViewSwitcher, type ToolbarViewSwitcherProps, Trash, Upload, type UploadProps, type UseBooleanReturnType, type UseSetStateReturnType, User, UserSolid, type ViewOption, WarningToast, XMark, XMarkSolid, action, apexChartsStyles, background, baseAction, basePalette, bgBlur, bgGradient, border, borderGradient, breakpoints, colorSchemes, common, components, createPaletteChannel, createShadowColor, createTheme, customShadows, customSpacing, darkPalette, defaultPresets, defaultSettings, dialogClasses, drawerClasses, error, fCurrency, fData, fNumber, fPercent, fShortenNumber, feedbackDialogClasses, formatFullname, getCurrencySymbol, getDateRangeFromPreset, getDefaultChartOptions, getInitials, getStorage, grey, hexToRgbChannel, hideScrollX, hideScrollY, icon, iconClasses, info, isEqual, lightPalette, maxLine, mediaQueries, menuItem, neutral, orderBy, paper, paramCase, primary, primaryFont, pxToRem, radius, remToPx, removeStorage, responsiveFontSizes, schemeConfig, secondary, secondaryFont, sentenceCase, setFont, setStorage, shadows, snakeCase, splitFullname, stylesMode, success, surface, tertiaryFont, text, textGradient, toolbarClasses, typography, updateComponentsWithSettings, updateCoreWithSettings, useBoolean, useCopyToClipboard, useCountdownDate, useCountdownSeconds, useEventListener, useLocalStorage, usePopover, useResponsive, useScrollOffSetTop, useSetState, useSettings, useWidth, varAlpha, warning };
|
|
2670
|
+
export { type AddressComponent, AnimatedLogo, Attachment, Bank, BellNotification, Building, Calendar, ChatBubbleQuestionSolid, CheckCircleSolid, CheckboxDefault, CheckboxIndeterminate, CheckboxSelect, Circle, ClipboardCheck, Clock, CloudUpload, type ColorSchema, type Coordinates, Copy, CopyButton, CustomDialog, type CustomDialogProps, CustomDrawer, type CustomDrawerProps, type CustomShadowOptions, type CustomSpacingOptions, type DatePickerProps, type DatePreset, type DatePresetOption, type DateRange, DateRangeDropdown, type DateRangeDropdownProps, DateRangePicker, type DateRangePickerProps, type DateTimePickerProps, Download, Edit, EmptyContent, type EmptyContentProps, ErrorToast, Eye, EyeClosed, FeedbackDialog, type FeedbackDialogProps, type FeedbackDialogSlotProps, Field, FilterDropdown, type FilterDropdownProps, FilterList, Form, GooglePlacesAutocomplete, type GooglePlacesAutocompleteProps, type GooglePlacesContextValue, GooglePlacesProvider, type GooglePlacesProviderProps, HelpCircle, Icon, type IconProps, type IconType, Image, type ImageProps, type ImageStatus, InfoCircle, InfoCircleSolid, InfoToast, KeyCommand, Loader, LoadingScreen, LocalStorageAvailable, LocalStorageGetItem, Logo, LongArrowUpLeftSolid, type MainTextMatchedSubstrings, MapPinXMark, MoreHorizontal, NavArrowDown, NavArrowDownSolid, NavArrowLeft, NavArrowRight, OTPInput, type OTPInputProps, type ParsedAddress, type PlaceDetails, type PlaceType, Plus, PlusSquare, RHFAutocomplete, type RHFAutocompleteProps, RHFCheckbox, type RHFCheckboxProps, RHFDatePicker, type RHFDatePickerProps, RHFDateRangePicker, type RHFDateRangePickerProps, RHFDateTimePicker, type RHFDateTimePickerProps, RHFGooglePlacesAutocomplete, type RHFGooglePlacesAutocompleteProps, RHFMultiCheckbox, type RHFMultiCheckboxOption, type RHFMultiCheckboxProps, RHFMultiSwitch, RHFOTPInput, type RHFOTPInputProps, RHFRadioGroup, type RHFRadioGroupProps, RHFSelect, type RHFSelectOption, type RHFSelectProps, RHFSwitch, RHFTextField, RHFTimePicker, type RHFTimePickerProps, RHFUpload, type RHFUploadProps, RadioDefault, RadioSelect, type RadiusOptions, STORAGE_KEY, Search, Settings, SettingsConsumer, SettingsContext, type SettingsContextProps, SettingsProvider, type SettingsValueProps, type SortDirection, SortDown, SortDropdown, type SortDropdownProps, type SortOption, SortUp, SplashScreen, StatDown, StatUp, type StructuredFormatting, SuccessToast, Table, TablePagination, ThemeProvider, type TimePickerProps, Toast, ToolbarButton, type ToolbarButtonProps, ToolbarDatePickerButton, type ToolbarDatePickerButtonProps, ToolbarFilterButton, type ToolbarFilterButtonProps, ToolbarSearchField, type ToolbarSearchFieldProps, ToolbarSettingsButton, type ToolbarSettingsButtonProps, ToolbarSortButton, type ToolbarSortButtonProps, ToolbarTodayButton, type ToolbarTodayButtonProps, ToolbarViewSwitcher, type ToolbarViewSwitcherProps, Trash, Upload, type UploadProps, type UseBooleanReturnType, type UseGooglePlacesAutocompleteOptions, type UseGooglePlacesAutocompleteReturn, type UseSetStateReturnType, User, UserSolid, type ViewOption, WarningToast, XMark, XMarkSolid, action, apexChartsStyles, background, baseAction, basePalette, bgBlur, bgGradient, border, borderGradient, breakpoints, colorSchemes, common, components, createPaletteChannel, createShadowColor, createTheme, customShadows, customSpacing, darkPalette, defaultPresets, defaultSettings, dialogClasses, drawerClasses, error, fCurrency, fData, fNumber, fPercent, fShortenNumber, feedbackDialogClasses, formatFullname, getCurrencySymbol, getDateRangeFromPreset, getDefaultChartOptions, getInitials, getStorage, grey, hexToRgbChannel, hideScrollX, hideScrollY, icon, iconClasses, info, isEqual, lightPalette, maxLine, mediaQueries, menuItem, neutral, orderBy, paper, paramCase, parseAddressComponents, primary, primaryFont, pxToRem, radius, remToPx, removeStorage, responsiveFontSizes, schemeConfig, secondary, secondaryFont, sentenceCase, setFont, setStorage, shadows, snakeCase, splitFullname, stylesMode, success, surface, tertiaryFont, text, textGradient, toolbarClasses, typography, updateComponentsWithSettings, updateCoreWithSettings, useBoolean, useCopyToClipboard, useCountdownDate, useCountdownSeconds, useEventListener, useGooglePlacesAutocomplete, useGooglePlacesContext, useGooglePlacesLoaded, useLocalStorage, usePopover, useResponsive, useScrollOffSetTop, useSetState, useSettings, useWidth, varAlpha, warning };
|