@facter/ds-core 1.33.11 → 1.34.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/dist/index.d.mts +89 -48
- package/dist/index.d.ts +89 -48
- package/dist/index.js +1027 -718
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1027 -718
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
package/dist/index.d.mts
CHANGED
|
@@ -18,7 +18,6 @@ import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
|
18
18
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
19
19
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
20
20
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
21
|
-
import { LucideIcon } from 'lucide-react';
|
|
22
21
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
23
22
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
24
23
|
import { ClassValue } from 'clsx';
|
|
@@ -80,6 +79,8 @@ interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>,
|
|
|
80
79
|
label?: string;
|
|
81
80
|
error?: boolean;
|
|
82
81
|
icon?: React$1.ComponentType<any>;
|
|
82
|
+
/** Extra ReactNode rendered after label text (used by Form.Input for tooltip icon) */
|
|
83
|
+
labelSuffix?: React$1.ReactNode;
|
|
83
84
|
containerClassName?: string;
|
|
84
85
|
labelClassName?: string;
|
|
85
86
|
}
|
|
@@ -858,27 +859,8 @@ interface TextareaProps extends Omit<React$1.TextareaHTMLAttributes<HTMLTextArea
|
|
|
858
859
|
}
|
|
859
860
|
declare const Textarea: React$1.NamedExoticComponent<TextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
860
861
|
|
|
861
|
-
interface FormLabelProps extends React$1.LabelHTMLAttributes<HTMLLabelElement> {
|
|
862
|
-
required?: boolean;
|
|
863
|
-
}
|
|
864
|
-
declare const FormLabel: React$1.ForwardRefExoticComponent<FormLabelProps & React$1.RefAttributes<HTMLLabelElement>>;
|
|
865
|
-
interface FormDescriptionProps extends React$1.HTMLAttributes<HTMLParagraphElement> {
|
|
866
|
-
}
|
|
867
|
-
declare const FormDescription: React$1.ForwardRefExoticComponent<FormDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
868
|
-
interface FormErrorProps extends React$1.HTMLAttributes<HTMLParagraphElement> {
|
|
869
|
-
message?: string;
|
|
870
|
-
}
|
|
871
|
-
declare const FormError: React$1.ForwardRefExoticComponent<FormErrorProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
872
|
-
interface FormFieldWrapperProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
873
|
-
label?: string;
|
|
874
|
-
description?: string;
|
|
875
|
-
required?: boolean;
|
|
876
|
-
error?: string;
|
|
877
|
-
}
|
|
878
|
-
declare const FormFieldWrapper: React$1.ForwardRefExoticComponent<FormFieldWrapperProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
879
|
-
|
|
880
862
|
interface FormContextValue<T extends FieldValues = FieldValues> {
|
|
881
|
-
form: UseFormReturn<T>;
|
|
863
|
+
form: UseFormReturn<T, any, any>;
|
|
882
864
|
}
|
|
883
865
|
interface FormFieldContextValue {
|
|
884
866
|
name: string;
|
|
@@ -886,10 +868,17 @@ interface FormFieldContextValue {
|
|
|
886
868
|
error?: string;
|
|
887
869
|
isRequired?: boolean;
|
|
888
870
|
}
|
|
871
|
+
interface FieldTooltipConfig {
|
|
872
|
+
title: string;
|
|
873
|
+
description: string;
|
|
874
|
+
}
|
|
875
|
+
type FieldTooltip = string | FieldTooltipConfig;
|
|
889
876
|
interface BaseFieldProps<T extends FieldValues = FieldValues> {
|
|
890
877
|
name: FieldPath<T>;
|
|
891
878
|
label?: string;
|
|
892
879
|
description?: string;
|
|
880
|
+
/** Tooltip shown via info icon next to the label. String or { title, description } */
|
|
881
|
+
tooltip?: FieldTooltip;
|
|
893
882
|
required?: boolean;
|
|
894
883
|
disabled?: boolean;
|
|
895
884
|
className?: string;
|
|
@@ -916,18 +905,11 @@ interface SelectOption {
|
|
|
916
905
|
interface FormSelectProps<T extends FieldValues = FieldValues> extends BaseFieldProps<T> {
|
|
917
906
|
options: SelectOption[];
|
|
918
907
|
placeholder?: string;
|
|
919
|
-
multiple?: boolean;
|
|
920
|
-
searchable?: boolean;
|
|
921
|
-
clearable?: boolean;
|
|
922
908
|
loading?: boolean;
|
|
923
909
|
emptyText?: string;
|
|
924
|
-
icon?: React$1.ComponentType<{
|
|
925
|
-
className?: string;
|
|
926
|
-
}>;
|
|
927
910
|
hideError?: boolean;
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
variant?: 'default' | 'card';
|
|
911
|
+
/** Enable search input in dropdown */
|
|
912
|
+
searchable?: boolean;
|
|
931
913
|
/** Server-side search callback. If not provided, filters locally */
|
|
932
914
|
onSearch?: (query: string) => void;
|
|
933
915
|
/** Infinite scroll: callback to load more items */
|
|
@@ -936,6 +918,25 @@ interface FormSelectProps<T extends FieldValues = FieldValues> extends BaseField
|
|
|
936
918
|
hasMore?: boolean;
|
|
937
919
|
/** Placeholder for the search input */
|
|
938
920
|
searchPlaceholder?: string;
|
|
921
|
+
/** Dropdown position: 'bottom' (default), 'top', or 'auto' */
|
|
922
|
+
dropdownPosition?: 'bottom' | 'top' | 'auto';
|
|
923
|
+
}
|
|
924
|
+
interface FormMultiSelectProps<T extends FieldValues = FieldValues> extends BaseFieldProps<T> {
|
|
925
|
+
options: SelectOption[];
|
|
926
|
+
placeholder?: string;
|
|
927
|
+
loading?: boolean;
|
|
928
|
+
emptyText?: string;
|
|
929
|
+
hideError?: boolean;
|
|
930
|
+
/** Enable search input in dropdown */
|
|
931
|
+
searchable?: boolean;
|
|
932
|
+
/** Placeholder for the search input */
|
|
933
|
+
searchPlaceholder?: string;
|
|
934
|
+
/** Allow clearing all selected values */
|
|
935
|
+
clearable?: boolean;
|
|
936
|
+
/** Max visible chips before showing "+N" badge (default: 3) */
|
|
937
|
+
maxVisibleChips?: number;
|
|
938
|
+
/** Dropdown position: 'bottom' (default), 'top', or 'auto' */
|
|
939
|
+
dropdownPosition?: 'bottom' | 'top' | 'auto';
|
|
939
940
|
}
|
|
940
941
|
interface FormTextareaProps<T extends FieldValues = FieldValues> extends BaseFieldProps<T>, Omit<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, 'name'> {
|
|
941
942
|
hideError?: boolean;
|
|
@@ -962,16 +963,40 @@ interface FormRadioGroupProps<T extends FieldValues = FieldValues> extends BaseF
|
|
|
962
963
|
hideError?: boolean;
|
|
963
964
|
}
|
|
964
965
|
|
|
965
|
-
|
|
966
|
+
interface FormLabelProps extends React$1.LabelHTMLAttributes<HTMLLabelElement> {
|
|
967
|
+
required?: boolean;
|
|
968
|
+
}
|
|
969
|
+
declare const FormLabel: React$1.ForwardRefExoticComponent<FormLabelProps & React$1.RefAttributes<HTMLLabelElement>>;
|
|
970
|
+
interface FormDescriptionProps extends React$1.HTMLAttributes<HTMLParagraphElement> {
|
|
971
|
+
}
|
|
972
|
+
declare const FormDescription: React$1.ForwardRefExoticComponent<FormDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
973
|
+
interface FormErrorProps extends React$1.HTMLAttributes<HTMLParagraphElement> {
|
|
974
|
+
message?: string;
|
|
975
|
+
}
|
|
976
|
+
declare const FormError: React$1.ForwardRefExoticComponent<FormErrorProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
977
|
+
interface FormFieldWrapperProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
978
|
+
label?: string;
|
|
979
|
+
description?: string;
|
|
980
|
+
required?: boolean;
|
|
981
|
+
error?: string;
|
|
982
|
+
}
|
|
983
|
+
declare const FormFieldWrapper: React$1.ForwardRefExoticComponent<FormFieldWrapperProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
984
|
+
|
|
985
|
+
declare function FormInput<T extends FieldValues = FieldValues>({ name, label, description, tooltip, required, disabled, className, mask, icon, showPasswordToggle, inputSize, hideError, type, maxLength, ...inputProps }: FormInputProps<T>): react_jsx_runtime.JSX.Element;
|
|
966
986
|
declare namespace FormInput {
|
|
967
987
|
var displayName: string;
|
|
968
988
|
}
|
|
969
989
|
|
|
970
|
-
declare function FormSelect<T extends FieldValues = FieldValues>({ name, label, description, required, disabled, className, options, placeholder,
|
|
990
|
+
declare function FormSelect<T extends FieldValues = FieldValues>({ name, label, description, tooltip, required, disabled, className, options, placeholder, hideError, emptyText, loading, searchable, onSearch, onLoadMore, hasMore, searchPlaceholder, dropdownPosition, }: FormSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
971
991
|
declare namespace FormSelect {
|
|
972
992
|
var displayName: string;
|
|
973
993
|
}
|
|
974
994
|
|
|
995
|
+
declare function FormMultiSelect<T extends FieldValues = FieldValues>({ name, label, description, tooltip, required, disabled, className, options, placeholder, hideError, emptyText, loading, searchable, searchPlaceholder, clearable, maxVisibleChips, dropdownPosition, }: FormMultiSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
996
|
+
declare namespace FormMultiSelect {
|
|
997
|
+
var displayName: string;
|
|
998
|
+
}
|
|
999
|
+
|
|
975
1000
|
declare function FormTextarea<T extends FieldValues = FieldValues>({ name, label, description, required, disabled, className, hideError, showCount, maxLength, ...textareaProps }: FormTextareaProps<T>): react_jsx_runtime.JSX.Element;
|
|
976
1001
|
declare namespace FormTextarea {
|
|
977
1002
|
var displayName: string;
|
|
@@ -1000,7 +1025,7 @@ interface FormFieldProviderProps {
|
|
|
1000
1025
|
declare function FormFieldProvider({ name, children }: FormFieldProviderProps): react_jsx_runtime.JSX.Element;
|
|
1001
1026
|
|
|
1002
1027
|
interface FormRootProps<T extends FieldValues = FieldValues> extends Omit<React$1.FormHTMLAttributes<HTMLFormElement>, 'onSubmit' | 'onError'> {
|
|
1003
|
-
form: UseFormReturn<T>;
|
|
1028
|
+
form: UseFormReturn<T, any, any>;
|
|
1004
1029
|
onSubmit: SubmitHandler<T>;
|
|
1005
1030
|
onError?: SubmitErrorHandler<T>;
|
|
1006
1031
|
}
|
|
@@ -1012,6 +1037,7 @@ declare namespace FormRoot {
|
|
|
1012
1037
|
declare const Form: typeof FormRoot & {
|
|
1013
1038
|
Input: typeof FormInput;
|
|
1014
1039
|
Select: typeof FormSelect;
|
|
1040
|
+
MultiSelect: typeof FormMultiSelect;
|
|
1015
1041
|
Textarea: typeof FormTextarea;
|
|
1016
1042
|
Checkbox: typeof FormCheckbox;
|
|
1017
1043
|
Switch: typeof FormSwitch;
|
|
@@ -1228,6 +1254,9 @@ declare const AuthLayout: typeof AuthLayoutRoot & {
|
|
|
1228
1254
|
Divider: typeof AuthLayoutDivider;
|
|
1229
1255
|
};
|
|
1230
1256
|
|
|
1257
|
+
type IconComponent$2 = React$1.ComponentType<{
|
|
1258
|
+
className?: string;
|
|
1259
|
+
}>;
|
|
1231
1260
|
interface SelectionLayoutProps {
|
|
1232
1261
|
children: React$1.ReactNode;
|
|
1233
1262
|
className?: string;
|
|
@@ -1275,7 +1304,7 @@ interface SelectionLayoutTabsProps {
|
|
|
1275
1304
|
interface SelectionLayoutTabProps {
|
|
1276
1305
|
value: string;
|
|
1277
1306
|
label: string;
|
|
1278
|
-
icon?:
|
|
1307
|
+
icon?: IconComponent$2;
|
|
1279
1308
|
badge?: string | number;
|
|
1280
1309
|
className?: string;
|
|
1281
1310
|
}
|
|
@@ -1287,7 +1316,7 @@ interface SelectionLayoutCardProps {
|
|
|
1287
1316
|
children?: React$1.ReactNode;
|
|
1288
1317
|
className?: string;
|
|
1289
1318
|
onClick?: () => void;
|
|
1290
|
-
icon?:
|
|
1319
|
+
icon?: IconComponent$2 | React$1.ReactNode;
|
|
1291
1320
|
title: string;
|
|
1292
1321
|
description?: string;
|
|
1293
1322
|
badge?: React$1.ReactNode;
|
|
@@ -1295,7 +1324,7 @@ interface SelectionLayoutCardProps {
|
|
|
1295
1324
|
onFavoriteClick?: () => void;
|
|
1296
1325
|
}
|
|
1297
1326
|
interface SelectionLayoutEmptyProps {
|
|
1298
|
-
icon?:
|
|
1327
|
+
icon?: IconComponent$2;
|
|
1299
1328
|
title: string;
|
|
1300
1329
|
description?: string;
|
|
1301
1330
|
action?: React$1.ReactNode;
|
|
@@ -1369,6 +1398,9 @@ declare const SelectionLayout: typeof SelectionLayoutRoot & {
|
|
|
1369
1398
|
Empty: typeof SelectionLayoutEmpty;
|
|
1370
1399
|
};
|
|
1371
1400
|
|
|
1401
|
+
type IconComponent$1 = React.ComponentType<{
|
|
1402
|
+
className?: string;
|
|
1403
|
+
}>;
|
|
1372
1404
|
interface DashboardLayoutContextValue {
|
|
1373
1405
|
sidebarExpanded: boolean;
|
|
1374
1406
|
setSidebarExpanded: (expanded: boolean) => void;
|
|
@@ -1402,7 +1434,7 @@ interface DashboardLayoutSidebarNavProps {
|
|
|
1402
1434
|
className?: string;
|
|
1403
1435
|
}
|
|
1404
1436
|
interface DashboardLayoutSidebarNavItemProps {
|
|
1405
|
-
icon?:
|
|
1437
|
+
icon?: IconComponent$1 | React.ReactNode;
|
|
1406
1438
|
label: string;
|
|
1407
1439
|
href?: string;
|
|
1408
1440
|
onClick?: () => void;
|
|
@@ -1413,7 +1445,7 @@ interface DashboardLayoutSidebarNavItemProps {
|
|
|
1413
1445
|
disabled?: boolean;
|
|
1414
1446
|
}
|
|
1415
1447
|
interface DashboardLayoutSidebarNavGroupProps {
|
|
1416
|
-
icon?:
|
|
1448
|
+
icon?: IconComponent$1 | React.ReactNode;
|
|
1417
1449
|
label: string;
|
|
1418
1450
|
children: React.ReactNode;
|
|
1419
1451
|
defaultOpen?: boolean;
|
|
@@ -1461,7 +1493,7 @@ interface DashboardLayoutBreadcrumbsProps {
|
|
|
1461
1493
|
items: Array<{
|
|
1462
1494
|
label: string;
|
|
1463
1495
|
href?: string;
|
|
1464
|
-
icon?:
|
|
1496
|
+
icon?: IconComponent$1;
|
|
1465
1497
|
}>;
|
|
1466
1498
|
className?: string;
|
|
1467
1499
|
separator?: React.ReactNode;
|
|
@@ -1471,7 +1503,7 @@ interface DashboardLayoutMobileNavProps {
|
|
|
1471
1503
|
className?: string;
|
|
1472
1504
|
}
|
|
1473
1505
|
interface DashboardLayoutMobileNavItemProps {
|
|
1474
|
-
icon:
|
|
1506
|
+
icon: IconComponent$1;
|
|
1475
1507
|
label: string;
|
|
1476
1508
|
href?: string;
|
|
1477
1509
|
onClick?: () => void;
|
|
@@ -1562,6 +1594,9 @@ declare const DashboardLayout: typeof DashboardLayoutRoot & {
|
|
|
1562
1594
|
MobileNavItem: typeof DashboardLayoutMobileNavItem;
|
|
1563
1595
|
};
|
|
1564
1596
|
|
|
1597
|
+
type IconComponent = React.ComponentType<{
|
|
1598
|
+
className?: string;
|
|
1599
|
+
}>;
|
|
1565
1600
|
interface SidebarContextValue {
|
|
1566
1601
|
expanded: boolean;
|
|
1567
1602
|
setExpanded: (expanded: boolean) => void;
|
|
@@ -1599,7 +1634,7 @@ interface SidebarSectionProps {
|
|
|
1599
1634
|
}
|
|
1600
1635
|
type BadgeVariant = 'default' | 'notification' | 'success' | 'warning';
|
|
1601
1636
|
interface SidebarNavItemProps {
|
|
1602
|
-
icon?:
|
|
1637
|
+
icon?: IconComponent | React.ReactNode;
|
|
1603
1638
|
label: string;
|
|
1604
1639
|
href?: string;
|
|
1605
1640
|
onClick?: () => void;
|
|
@@ -1610,7 +1645,7 @@ interface SidebarNavItemProps {
|
|
|
1610
1645
|
className?: string;
|
|
1611
1646
|
}
|
|
1612
1647
|
interface SidebarNavGroupProps {
|
|
1613
|
-
icon?:
|
|
1648
|
+
icon?: IconComponent | React.ReactNode;
|
|
1614
1649
|
label: string;
|
|
1615
1650
|
children: React.ReactNode;
|
|
1616
1651
|
id?: string;
|
|
@@ -1626,7 +1661,7 @@ interface SidebarFooterUser {
|
|
|
1626
1661
|
avatar?: string;
|
|
1627
1662
|
}
|
|
1628
1663
|
interface SidebarFooterMenuItem {
|
|
1629
|
-
icon?:
|
|
1664
|
+
icon?: IconComponent;
|
|
1630
1665
|
label: string;
|
|
1631
1666
|
onClick: () => void;
|
|
1632
1667
|
variant?: 'default' | 'destructive';
|
|
@@ -1686,7 +1721,9 @@ declare function useSidebarOptional(): SidebarContextValue | null;
|
|
|
1686
1721
|
declare function useMediaQuery(query: string): boolean;
|
|
1687
1722
|
|
|
1688
1723
|
interface MobileNavItemConfig {
|
|
1689
|
-
icon:
|
|
1724
|
+
icon: React.ComponentType<{
|
|
1725
|
+
className?: string;
|
|
1726
|
+
}> | React.ReactNode;
|
|
1690
1727
|
label: string;
|
|
1691
1728
|
href?: string;
|
|
1692
1729
|
onClick?: () => void;
|
|
@@ -1703,7 +1740,9 @@ interface MobileNavProps {
|
|
|
1703
1740
|
className?: string;
|
|
1704
1741
|
}
|
|
1705
1742
|
interface MobileNavItemProps {
|
|
1706
|
-
icon:
|
|
1743
|
+
icon: React.ComponentType<{
|
|
1744
|
+
className?: string;
|
|
1745
|
+
}> | React.ReactNode;
|
|
1707
1746
|
label: string;
|
|
1708
1747
|
isActive?: boolean;
|
|
1709
1748
|
onClick?: () => void;
|
|
@@ -1834,7 +1873,9 @@ declare namespace SectionHeaderRoot {
|
|
|
1834
1873
|
var displayName: string;
|
|
1835
1874
|
}
|
|
1836
1875
|
interface SectionHeaderIconProps {
|
|
1837
|
-
icon:
|
|
1876
|
+
icon: React$1.ComponentType<{
|
|
1877
|
+
className?: string;
|
|
1878
|
+
}>;
|
|
1838
1879
|
className?: string;
|
|
1839
1880
|
}
|
|
1840
1881
|
declare function SectionHeaderIcon({ icon: Icon, className }: SectionHeaderIconProps): react_jsx_runtime.JSX.Element;
|
|
@@ -2246,7 +2287,7 @@ interface WizardProps<T extends FieldValues = FieldValues> {
|
|
|
2246
2287
|
/** Child components (Wizard.Steps, Wizard.Content, etc.) */
|
|
2247
2288
|
children: ReactNode;
|
|
2248
2289
|
/** React Hook Form instance */
|
|
2249
|
-
form: UseFormReturn<T>;
|
|
2290
|
+
form: UseFormReturn<T, any, any>;
|
|
2250
2291
|
/** Array of step configurations */
|
|
2251
2292
|
steps: WizardStepConfig<T>[];
|
|
2252
2293
|
/** Initial step index (0-based) */
|
|
@@ -2295,7 +2336,7 @@ interface WizardContextValue<T extends FieldValues = FieldValues> {
|
|
|
2295
2336
|
/** Check if a step has errors */
|
|
2296
2337
|
hasStepErrors: (index: number) => boolean;
|
|
2297
2338
|
/** React Hook Form instance */
|
|
2298
|
-
form: UseFormReturn<T>;
|
|
2339
|
+
form: UseFormReturn<T, any, any>;
|
|
2299
2340
|
/** Current step configuration */
|
|
2300
2341
|
currentStepConfig: WizardStepConfig<T>;
|
|
2301
2342
|
/** Get step config by index */
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
|
18
18
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
19
19
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
20
20
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
21
|
-
import { LucideIcon } from 'lucide-react';
|
|
22
21
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
23
22
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
24
23
|
import { ClassValue } from 'clsx';
|
|
@@ -80,6 +79,8 @@ interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>,
|
|
|
80
79
|
label?: string;
|
|
81
80
|
error?: boolean;
|
|
82
81
|
icon?: React$1.ComponentType<any>;
|
|
82
|
+
/** Extra ReactNode rendered after label text (used by Form.Input for tooltip icon) */
|
|
83
|
+
labelSuffix?: React$1.ReactNode;
|
|
83
84
|
containerClassName?: string;
|
|
84
85
|
labelClassName?: string;
|
|
85
86
|
}
|
|
@@ -858,27 +859,8 @@ interface TextareaProps extends Omit<React$1.TextareaHTMLAttributes<HTMLTextArea
|
|
|
858
859
|
}
|
|
859
860
|
declare const Textarea: React$1.NamedExoticComponent<TextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
860
861
|
|
|
861
|
-
interface FormLabelProps extends React$1.LabelHTMLAttributes<HTMLLabelElement> {
|
|
862
|
-
required?: boolean;
|
|
863
|
-
}
|
|
864
|
-
declare const FormLabel: React$1.ForwardRefExoticComponent<FormLabelProps & React$1.RefAttributes<HTMLLabelElement>>;
|
|
865
|
-
interface FormDescriptionProps extends React$1.HTMLAttributes<HTMLParagraphElement> {
|
|
866
|
-
}
|
|
867
|
-
declare const FormDescription: React$1.ForwardRefExoticComponent<FormDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
868
|
-
interface FormErrorProps extends React$1.HTMLAttributes<HTMLParagraphElement> {
|
|
869
|
-
message?: string;
|
|
870
|
-
}
|
|
871
|
-
declare const FormError: React$1.ForwardRefExoticComponent<FormErrorProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
872
|
-
interface FormFieldWrapperProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
873
|
-
label?: string;
|
|
874
|
-
description?: string;
|
|
875
|
-
required?: boolean;
|
|
876
|
-
error?: string;
|
|
877
|
-
}
|
|
878
|
-
declare const FormFieldWrapper: React$1.ForwardRefExoticComponent<FormFieldWrapperProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
879
|
-
|
|
880
862
|
interface FormContextValue<T extends FieldValues = FieldValues> {
|
|
881
|
-
form: UseFormReturn<T>;
|
|
863
|
+
form: UseFormReturn<T, any, any>;
|
|
882
864
|
}
|
|
883
865
|
interface FormFieldContextValue {
|
|
884
866
|
name: string;
|
|
@@ -886,10 +868,17 @@ interface FormFieldContextValue {
|
|
|
886
868
|
error?: string;
|
|
887
869
|
isRequired?: boolean;
|
|
888
870
|
}
|
|
871
|
+
interface FieldTooltipConfig {
|
|
872
|
+
title: string;
|
|
873
|
+
description: string;
|
|
874
|
+
}
|
|
875
|
+
type FieldTooltip = string | FieldTooltipConfig;
|
|
889
876
|
interface BaseFieldProps<T extends FieldValues = FieldValues> {
|
|
890
877
|
name: FieldPath<T>;
|
|
891
878
|
label?: string;
|
|
892
879
|
description?: string;
|
|
880
|
+
/** Tooltip shown via info icon next to the label. String or { title, description } */
|
|
881
|
+
tooltip?: FieldTooltip;
|
|
893
882
|
required?: boolean;
|
|
894
883
|
disabled?: boolean;
|
|
895
884
|
className?: string;
|
|
@@ -916,18 +905,11 @@ interface SelectOption {
|
|
|
916
905
|
interface FormSelectProps<T extends FieldValues = FieldValues> extends BaseFieldProps<T> {
|
|
917
906
|
options: SelectOption[];
|
|
918
907
|
placeholder?: string;
|
|
919
|
-
multiple?: boolean;
|
|
920
|
-
searchable?: boolean;
|
|
921
|
-
clearable?: boolean;
|
|
922
908
|
loading?: boolean;
|
|
923
909
|
emptyText?: string;
|
|
924
|
-
icon?: React$1.ComponentType<{
|
|
925
|
-
className?: string;
|
|
926
|
-
}>;
|
|
927
910
|
hideError?: boolean;
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
variant?: 'default' | 'card';
|
|
911
|
+
/** Enable search input in dropdown */
|
|
912
|
+
searchable?: boolean;
|
|
931
913
|
/** Server-side search callback. If not provided, filters locally */
|
|
932
914
|
onSearch?: (query: string) => void;
|
|
933
915
|
/** Infinite scroll: callback to load more items */
|
|
@@ -936,6 +918,25 @@ interface FormSelectProps<T extends FieldValues = FieldValues> extends BaseField
|
|
|
936
918
|
hasMore?: boolean;
|
|
937
919
|
/** Placeholder for the search input */
|
|
938
920
|
searchPlaceholder?: string;
|
|
921
|
+
/** Dropdown position: 'bottom' (default), 'top', or 'auto' */
|
|
922
|
+
dropdownPosition?: 'bottom' | 'top' | 'auto';
|
|
923
|
+
}
|
|
924
|
+
interface FormMultiSelectProps<T extends FieldValues = FieldValues> extends BaseFieldProps<T> {
|
|
925
|
+
options: SelectOption[];
|
|
926
|
+
placeholder?: string;
|
|
927
|
+
loading?: boolean;
|
|
928
|
+
emptyText?: string;
|
|
929
|
+
hideError?: boolean;
|
|
930
|
+
/** Enable search input in dropdown */
|
|
931
|
+
searchable?: boolean;
|
|
932
|
+
/** Placeholder for the search input */
|
|
933
|
+
searchPlaceholder?: string;
|
|
934
|
+
/** Allow clearing all selected values */
|
|
935
|
+
clearable?: boolean;
|
|
936
|
+
/** Max visible chips before showing "+N" badge (default: 3) */
|
|
937
|
+
maxVisibleChips?: number;
|
|
938
|
+
/** Dropdown position: 'bottom' (default), 'top', or 'auto' */
|
|
939
|
+
dropdownPosition?: 'bottom' | 'top' | 'auto';
|
|
939
940
|
}
|
|
940
941
|
interface FormTextareaProps<T extends FieldValues = FieldValues> extends BaseFieldProps<T>, Omit<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, 'name'> {
|
|
941
942
|
hideError?: boolean;
|
|
@@ -962,16 +963,40 @@ interface FormRadioGroupProps<T extends FieldValues = FieldValues> extends BaseF
|
|
|
962
963
|
hideError?: boolean;
|
|
963
964
|
}
|
|
964
965
|
|
|
965
|
-
|
|
966
|
+
interface FormLabelProps extends React$1.LabelHTMLAttributes<HTMLLabelElement> {
|
|
967
|
+
required?: boolean;
|
|
968
|
+
}
|
|
969
|
+
declare const FormLabel: React$1.ForwardRefExoticComponent<FormLabelProps & React$1.RefAttributes<HTMLLabelElement>>;
|
|
970
|
+
interface FormDescriptionProps extends React$1.HTMLAttributes<HTMLParagraphElement> {
|
|
971
|
+
}
|
|
972
|
+
declare const FormDescription: React$1.ForwardRefExoticComponent<FormDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
973
|
+
interface FormErrorProps extends React$1.HTMLAttributes<HTMLParagraphElement> {
|
|
974
|
+
message?: string;
|
|
975
|
+
}
|
|
976
|
+
declare const FormError: React$1.ForwardRefExoticComponent<FormErrorProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
977
|
+
interface FormFieldWrapperProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
978
|
+
label?: string;
|
|
979
|
+
description?: string;
|
|
980
|
+
required?: boolean;
|
|
981
|
+
error?: string;
|
|
982
|
+
}
|
|
983
|
+
declare const FormFieldWrapper: React$1.ForwardRefExoticComponent<FormFieldWrapperProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
984
|
+
|
|
985
|
+
declare function FormInput<T extends FieldValues = FieldValues>({ name, label, description, tooltip, required, disabled, className, mask, icon, showPasswordToggle, inputSize, hideError, type, maxLength, ...inputProps }: FormInputProps<T>): react_jsx_runtime.JSX.Element;
|
|
966
986
|
declare namespace FormInput {
|
|
967
987
|
var displayName: string;
|
|
968
988
|
}
|
|
969
989
|
|
|
970
|
-
declare function FormSelect<T extends FieldValues = FieldValues>({ name, label, description, required, disabled, className, options, placeholder,
|
|
990
|
+
declare function FormSelect<T extends FieldValues = FieldValues>({ name, label, description, tooltip, required, disabled, className, options, placeholder, hideError, emptyText, loading, searchable, onSearch, onLoadMore, hasMore, searchPlaceholder, dropdownPosition, }: FormSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
971
991
|
declare namespace FormSelect {
|
|
972
992
|
var displayName: string;
|
|
973
993
|
}
|
|
974
994
|
|
|
995
|
+
declare function FormMultiSelect<T extends FieldValues = FieldValues>({ name, label, description, tooltip, required, disabled, className, options, placeholder, hideError, emptyText, loading, searchable, searchPlaceholder, clearable, maxVisibleChips, dropdownPosition, }: FormMultiSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
996
|
+
declare namespace FormMultiSelect {
|
|
997
|
+
var displayName: string;
|
|
998
|
+
}
|
|
999
|
+
|
|
975
1000
|
declare function FormTextarea<T extends FieldValues = FieldValues>({ name, label, description, required, disabled, className, hideError, showCount, maxLength, ...textareaProps }: FormTextareaProps<T>): react_jsx_runtime.JSX.Element;
|
|
976
1001
|
declare namespace FormTextarea {
|
|
977
1002
|
var displayName: string;
|
|
@@ -1000,7 +1025,7 @@ interface FormFieldProviderProps {
|
|
|
1000
1025
|
declare function FormFieldProvider({ name, children }: FormFieldProviderProps): react_jsx_runtime.JSX.Element;
|
|
1001
1026
|
|
|
1002
1027
|
interface FormRootProps<T extends FieldValues = FieldValues> extends Omit<React$1.FormHTMLAttributes<HTMLFormElement>, 'onSubmit' | 'onError'> {
|
|
1003
|
-
form: UseFormReturn<T>;
|
|
1028
|
+
form: UseFormReturn<T, any, any>;
|
|
1004
1029
|
onSubmit: SubmitHandler<T>;
|
|
1005
1030
|
onError?: SubmitErrorHandler<T>;
|
|
1006
1031
|
}
|
|
@@ -1012,6 +1037,7 @@ declare namespace FormRoot {
|
|
|
1012
1037
|
declare const Form: typeof FormRoot & {
|
|
1013
1038
|
Input: typeof FormInput;
|
|
1014
1039
|
Select: typeof FormSelect;
|
|
1040
|
+
MultiSelect: typeof FormMultiSelect;
|
|
1015
1041
|
Textarea: typeof FormTextarea;
|
|
1016
1042
|
Checkbox: typeof FormCheckbox;
|
|
1017
1043
|
Switch: typeof FormSwitch;
|
|
@@ -1228,6 +1254,9 @@ declare const AuthLayout: typeof AuthLayoutRoot & {
|
|
|
1228
1254
|
Divider: typeof AuthLayoutDivider;
|
|
1229
1255
|
};
|
|
1230
1256
|
|
|
1257
|
+
type IconComponent$2 = React$1.ComponentType<{
|
|
1258
|
+
className?: string;
|
|
1259
|
+
}>;
|
|
1231
1260
|
interface SelectionLayoutProps {
|
|
1232
1261
|
children: React$1.ReactNode;
|
|
1233
1262
|
className?: string;
|
|
@@ -1275,7 +1304,7 @@ interface SelectionLayoutTabsProps {
|
|
|
1275
1304
|
interface SelectionLayoutTabProps {
|
|
1276
1305
|
value: string;
|
|
1277
1306
|
label: string;
|
|
1278
|
-
icon?:
|
|
1307
|
+
icon?: IconComponent$2;
|
|
1279
1308
|
badge?: string | number;
|
|
1280
1309
|
className?: string;
|
|
1281
1310
|
}
|
|
@@ -1287,7 +1316,7 @@ interface SelectionLayoutCardProps {
|
|
|
1287
1316
|
children?: React$1.ReactNode;
|
|
1288
1317
|
className?: string;
|
|
1289
1318
|
onClick?: () => void;
|
|
1290
|
-
icon?:
|
|
1319
|
+
icon?: IconComponent$2 | React$1.ReactNode;
|
|
1291
1320
|
title: string;
|
|
1292
1321
|
description?: string;
|
|
1293
1322
|
badge?: React$1.ReactNode;
|
|
@@ -1295,7 +1324,7 @@ interface SelectionLayoutCardProps {
|
|
|
1295
1324
|
onFavoriteClick?: () => void;
|
|
1296
1325
|
}
|
|
1297
1326
|
interface SelectionLayoutEmptyProps {
|
|
1298
|
-
icon?:
|
|
1327
|
+
icon?: IconComponent$2;
|
|
1299
1328
|
title: string;
|
|
1300
1329
|
description?: string;
|
|
1301
1330
|
action?: React$1.ReactNode;
|
|
@@ -1369,6 +1398,9 @@ declare const SelectionLayout: typeof SelectionLayoutRoot & {
|
|
|
1369
1398
|
Empty: typeof SelectionLayoutEmpty;
|
|
1370
1399
|
};
|
|
1371
1400
|
|
|
1401
|
+
type IconComponent$1 = React.ComponentType<{
|
|
1402
|
+
className?: string;
|
|
1403
|
+
}>;
|
|
1372
1404
|
interface DashboardLayoutContextValue {
|
|
1373
1405
|
sidebarExpanded: boolean;
|
|
1374
1406
|
setSidebarExpanded: (expanded: boolean) => void;
|
|
@@ -1402,7 +1434,7 @@ interface DashboardLayoutSidebarNavProps {
|
|
|
1402
1434
|
className?: string;
|
|
1403
1435
|
}
|
|
1404
1436
|
interface DashboardLayoutSidebarNavItemProps {
|
|
1405
|
-
icon?:
|
|
1437
|
+
icon?: IconComponent$1 | React.ReactNode;
|
|
1406
1438
|
label: string;
|
|
1407
1439
|
href?: string;
|
|
1408
1440
|
onClick?: () => void;
|
|
@@ -1413,7 +1445,7 @@ interface DashboardLayoutSidebarNavItemProps {
|
|
|
1413
1445
|
disabled?: boolean;
|
|
1414
1446
|
}
|
|
1415
1447
|
interface DashboardLayoutSidebarNavGroupProps {
|
|
1416
|
-
icon?:
|
|
1448
|
+
icon?: IconComponent$1 | React.ReactNode;
|
|
1417
1449
|
label: string;
|
|
1418
1450
|
children: React.ReactNode;
|
|
1419
1451
|
defaultOpen?: boolean;
|
|
@@ -1461,7 +1493,7 @@ interface DashboardLayoutBreadcrumbsProps {
|
|
|
1461
1493
|
items: Array<{
|
|
1462
1494
|
label: string;
|
|
1463
1495
|
href?: string;
|
|
1464
|
-
icon?:
|
|
1496
|
+
icon?: IconComponent$1;
|
|
1465
1497
|
}>;
|
|
1466
1498
|
className?: string;
|
|
1467
1499
|
separator?: React.ReactNode;
|
|
@@ -1471,7 +1503,7 @@ interface DashboardLayoutMobileNavProps {
|
|
|
1471
1503
|
className?: string;
|
|
1472
1504
|
}
|
|
1473
1505
|
interface DashboardLayoutMobileNavItemProps {
|
|
1474
|
-
icon:
|
|
1506
|
+
icon: IconComponent$1;
|
|
1475
1507
|
label: string;
|
|
1476
1508
|
href?: string;
|
|
1477
1509
|
onClick?: () => void;
|
|
@@ -1562,6 +1594,9 @@ declare const DashboardLayout: typeof DashboardLayoutRoot & {
|
|
|
1562
1594
|
MobileNavItem: typeof DashboardLayoutMobileNavItem;
|
|
1563
1595
|
};
|
|
1564
1596
|
|
|
1597
|
+
type IconComponent = React.ComponentType<{
|
|
1598
|
+
className?: string;
|
|
1599
|
+
}>;
|
|
1565
1600
|
interface SidebarContextValue {
|
|
1566
1601
|
expanded: boolean;
|
|
1567
1602
|
setExpanded: (expanded: boolean) => void;
|
|
@@ -1599,7 +1634,7 @@ interface SidebarSectionProps {
|
|
|
1599
1634
|
}
|
|
1600
1635
|
type BadgeVariant = 'default' | 'notification' | 'success' | 'warning';
|
|
1601
1636
|
interface SidebarNavItemProps {
|
|
1602
|
-
icon?:
|
|
1637
|
+
icon?: IconComponent | React.ReactNode;
|
|
1603
1638
|
label: string;
|
|
1604
1639
|
href?: string;
|
|
1605
1640
|
onClick?: () => void;
|
|
@@ -1610,7 +1645,7 @@ interface SidebarNavItemProps {
|
|
|
1610
1645
|
className?: string;
|
|
1611
1646
|
}
|
|
1612
1647
|
interface SidebarNavGroupProps {
|
|
1613
|
-
icon?:
|
|
1648
|
+
icon?: IconComponent | React.ReactNode;
|
|
1614
1649
|
label: string;
|
|
1615
1650
|
children: React.ReactNode;
|
|
1616
1651
|
id?: string;
|
|
@@ -1626,7 +1661,7 @@ interface SidebarFooterUser {
|
|
|
1626
1661
|
avatar?: string;
|
|
1627
1662
|
}
|
|
1628
1663
|
interface SidebarFooterMenuItem {
|
|
1629
|
-
icon?:
|
|
1664
|
+
icon?: IconComponent;
|
|
1630
1665
|
label: string;
|
|
1631
1666
|
onClick: () => void;
|
|
1632
1667
|
variant?: 'default' | 'destructive';
|
|
@@ -1686,7 +1721,9 @@ declare function useSidebarOptional(): SidebarContextValue | null;
|
|
|
1686
1721
|
declare function useMediaQuery(query: string): boolean;
|
|
1687
1722
|
|
|
1688
1723
|
interface MobileNavItemConfig {
|
|
1689
|
-
icon:
|
|
1724
|
+
icon: React.ComponentType<{
|
|
1725
|
+
className?: string;
|
|
1726
|
+
}> | React.ReactNode;
|
|
1690
1727
|
label: string;
|
|
1691
1728
|
href?: string;
|
|
1692
1729
|
onClick?: () => void;
|
|
@@ -1703,7 +1740,9 @@ interface MobileNavProps {
|
|
|
1703
1740
|
className?: string;
|
|
1704
1741
|
}
|
|
1705
1742
|
interface MobileNavItemProps {
|
|
1706
|
-
icon:
|
|
1743
|
+
icon: React.ComponentType<{
|
|
1744
|
+
className?: string;
|
|
1745
|
+
}> | React.ReactNode;
|
|
1707
1746
|
label: string;
|
|
1708
1747
|
isActive?: boolean;
|
|
1709
1748
|
onClick?: () => void;
|
|
@@ -1834,7 +1873,9 @@ declare namespace SectionHeaderRoot {
|
|
|
1834
1873
|
var displayName: string;
|
|
1835
1874
|
}
|
|
1836
1875
|
interface SectionHeaderIconProps {
|
|
1837
|
-
icon:
|
|
1876
|
+
icon: React$1.ComponentType<{
|
|
1877
|
+
className?: string;
|
|
1878
|
+
}>;
|
|
1838
1879
|
className?: string;
|
|
1839
1880
|
}
|
|
1840
1881
|
declare function SectionHeaderIcon({ icon: Icon, className }: SectionHeaderIconProps): react_jsx_runtime.JSX.Element;
|
|
@@ -2246,7 +2287,7 @@ interface WizardProps<T extends FieldValues = FieldValues> {
|
|
|
2246
2287
|
/** Child components (Wizard.Steps, Wizard.Content, etc.) */
|
|
2247
2288
|
children: ReactNode;
|
|
2248
2289
|
/** React Hook Form instance */
|
|
2249
|
-
form: UseFormReturn<T>;
|
|
2290
|
+
form: UseFormReturn<T, any, any>;
|
|
2250
2291
|
/** Array of step configurations */
|
|
2251
2292
|
steps: WizardStepConfig<T>[];
|
|
2252
2293
|
/** Initial step index (0-based) */
|
|
@@ -2295,7 +2336,7 @@ interface WizardContextValue<T extends FieldValues = FieldValues> {
|
|
|
2295
2336
|
/** Check if a step has errors */
|
|
2296
2337
|
hasStepErrors: (index: number) => boolean;
|
|
2297
2338
|
/** React Hook Form instance */
|
|
2298
|
-
form: UseFormReturn<T>;
|
|
2339
|
+
form: UseFormReturn<T, any, any>;
|
|
2299
2340
|
/** Current step configuration */
|
|
2300
2341
|
currentStepConfig: WizardStepConfig<T>;
|
|
2301
2342
|
/** Get step config by index */
|