@facter/ds-core 1.34.1 → 1.35.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.
- package/dist/index.d.mts +33 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +210 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +208 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -829,6 +829,24 @@ declare const toast: ((message: string) => string | number) & {
|
|
|
829
829
|
};
|
|
830
830
|
};
|
|
831
831
|
|
|
832
|
+
interface NumberStepperProps {
|
|
833
|
+
value?: number;
|
|
834
|
+
onChange?: (value: number) => void;
|
|
835
|
+
onBlur?: () => void;
|
|
836
|
+
min?: number;
|
|
837
|
+
max?: number;
|
|
838
|
+
step?: number;
|
|
839
|
+
defaultValue?: number;
|
|
840
|
+
label?: string;
|
|
841
|
+
required?: boolean;
|
|
842
|
+
disabled?: boolean;
|
|
843
|
+
error?: boolean;
|
|
844
|
+
labelSuffix?: React$1.ReactNode;
|
|
845
|
+
className?: string;
|
|
846
|
+
name?: string;
|
|
847
|
+
}
|
|
848
|
+
declare const NumberStepper: React$1.ForwardRefExoticComponent<NumberStepperProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
849
|
+
|
|
832
850
|
declare const checkboxVariants: (props?: ({
|
|
833
851
|
variant?: "default" | "outline" | "secondary" | "muted" | null | undefined;
|
|
834
852
|
size?: "sm" | "lg" | "md" | null | undefined;
|
|
@@ -1017,6 +1035,19 @@ declare namespace FormRadioGroup {
|
|
|
1017
1035
|
var displayName: string;
|
|
1018
1036
|
}
|
|
1019
1037
|
|
|
1038
|
+
interface FormNumberStepperProps<T extends FieldValues = FieldValues> extends BaseFieldProps<T> {
|
|
1039
|
+
min?: number;
|
|
1040
|
+
max?: number;
|
|
1041
|
+
step?: number;
|
|
1042
|
+
defaultValue?: number;
|
|
1043
|
+
hideError?: boolean;
|
|
1044
|
+
tooltip?: FieldTooltip;
|
|
1045
|
+
}
|
|
1046
|
+
declare function FormNumberStepper<T extends FieldValues = FieldValues>({ name, label, description, tooltip, required, disabled, className, min, max, step, defaultValue, hideError, }: FormNumberStepperProps<T>): react_jsx_runtime.JSX.Element;
|
|
1047
|
+
declare namespace FormNumberStepper {
|
|
1048
|
+
var displayName: string;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1020
1051
|
declare function useFormFieldContext(): FormFieldContextValue;
|
|
1021
1052
|
interface FormFieldProviderProps {
|
|
1022
1053
|
name: string;
|
|
@@ -1042,6 +1073,7 @@ declare const Form: typeof FormRoot & {
|
|
|
1042
1073
|
Checkbox: typeof FormCheckbox;
|
|
1043
1074
|
Switch: typeof FormSwitch;
|
|
1044
1075
|
RadioGroup: typeof FormRadioGroup;
|
|
1076
|
+
NumberStepper: typeof FormNumberStepper;
|
|
1045
1077
|
Label: React$1.ForwardRefExoticComponent<FormLabelProps & React$1.RefAttributes<HTMLLabelElement>>;
|
|
1046
1078
|
Description: React$1.ForwardRefExoticComponent<FormDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1047
1079
|
Error: React$1.ForwardRefExoticComponent<FormErrorProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -2826,4 +2858,4 @@ declare const useTheme: () => ThemeProviderState;
|
|
|
2826
2858
|
*/
|
|
2827
2859
|
declare function cn(...inputs: ClassValue[]): string;
|
|
2828
2860
|
|
|
2829
|
-
export { AuthLayout, type AuthLayoutBodyProps, type AuthLayoutContentProps, type AuthLayoutDividerProps, type AuthLayoutFooterProps, type AuthLayoutHeaderProps, type AuthLayoutImageProps, type AuthLayoutLinkProps, type AuthLayoutProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, type BaseFieldProps, BigNumberCard, type BigNumberCardContentProps, type BigNumberCardHeaderProps, type BigNumberCardLinkProps, type BigNumberCardRootProps, type BigNumberCardSize, type BigNumberCardSparklineProps, type BigNumberCardTitleProps, type BigNumberCardTrendProps, type BigNumberCardValueProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type ChartDataPoint, Checkbox, type CheckboxProps, type Company, DENSITY_CONFIG, DashboardLayout, type DashboardLayoutBreadcrumbsProps, type DashboardLayoutContentProps, type DashboardLayoutContextValue, type DashboardLayoutHeaderActionsProps, type DashboardLayoutHeaderProps, type DashboardLayoutHeaderTitleProps, type DashboardLayoutHeaderUserProps, type DashboardLayoutMobileNavItemProps, type DashboardLayoutMobileNavProps, type DashboardLayoutProps, type DashboardLayoutSidebarFooterProps, type DashboardLayoutSidebarHeaderProps, type DashboardLayoutSidebarNavGroupProps, type DashboardLayoutSidebarNavItemProps, type DashboardLayoutSidebarNavProps, type DashboardLayoutSidebarProps, type DashboardLayoutSidebarSectionProps, DataTable, type DataTableBulkActionsProps, type DataTableColumnHeaderProps, type DataTableColumnVisibilityProps, type DataTableContentProps, type DataTableContextValue, type DataTableDensity, type DataTableDensityToggleProps, type DataTableEmptyStateProps, type DataTableExportFormat, type DataTableExportProps, type DataTableFilterOption, type DataTableFilterProps, type DataTableFiltersProps, type DataTableLoadingProps, type DataTableMeta, type DataTablePaginationMode, type DataTablePaginationProps, type DataTableProps, type DataTableRowActionsProps, type DataTableSearchProps, type DataTableState, type DataTableTab, type DataTableTabsProps, type DataTableToolbarProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogWrapper, type DialogWrapperProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, FloatingBarCompound as FloatingBar, FloatingBarAction, type FloatingBarActionProps, FloatingBarCounter, type FloatingBarCounterProps, FloatingBarDivider, type FloatingBarDividerProps, FloatingBarIconAction, type FloatingBarIconActionProps, type FloatingBarProps, Form, FormCheckbox, type FormCheckboxProps, type FormContextValue, FormDescription, type FormDescriptionProps, FormError, type FormErrorProps, type FormFieldContextValue, FormFieldProvider, FormFieldWrapper, type FormFieldWrapperProps, FormInput, type FormInputProps, FormLabel, type FormLabelProps, FormRadioGroup, type FormRadioGroupProps, type FormRootProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, FormTextarea, type FormTextareaProps, GlobalLoaderController, Input, type InputProps, ItemCard, ItemCardActionButton, type ItemCardActionButtonProps, ItemCardActions, type ItemCardActionsProps, ItemCardActionsRow, type ItemCardActionsRowProps, ItemCardBadge, type ItemCardBadgeProps, ItemCardContent, ItemCardContentItem, type ItemCardContentItemProps, type ItemCardContentProps, ItemCardEmpty, type ItemCardEmptyProps, ItemCardFooter, ItemCardFooterDivider, type ItemCardFooterDividerProps, ItemCardFooterItem, type ItemCardFooterItemProps, type ItemCardFooterProps, ItemCardHeader, type ItemCardHeaderProps, ItemCardIcon, type ItemCardIconProps, ItemCardRoot, type ItemCardRootProps, ItemCardSubtitle, type ItemCardSubtitleProps, ItemCardTitle, ItemCardTitleGroup, type ItemCardTitleGroupProps, type ItemCardTitleProps, Kanban, type KanbanBoardProps, type KanbanCardProps, type KanbanColumnConfig, type KanbanColumnProps, type KanbanContextValue, type KanbanDragResult, type KanbanEmptyProps, type KanbanItem, Loader, type LoaderProps, LoaderProvider, Logo, type LogoProps, type MaskType, MobileNav, type MobileNavFabAction, MobileNavItem, type MobileNavItemConfig, type MobileNavItemProps, type MobileNavProps, Navbar, NavbarCompanyProfile, type NavbarCompanyProfileProps, NavbarNotification, type NavbarNotificationProps, type NavbarProps, NavbarUserMenu, type NavbarUserMenuProps, type NotificationItem, PageHeader, type PageHeaderProps, type PaginatedResponse, type PaginationMeta, type PaginationParams, Popover, PopoverContent, PopoverTrigger, type RadioOption, type RadioOptionColor, RippleBackground, type RippleBackgroundProps, RippleEffect, type RippleEffectProps, RippleWrapper, type RippleWrapperProps, ScrollArea, ScrollBar, SectionHeader, SectionHeaderActions, type SectionHeaderActionsProps, SectionHeaderBadge, type SectionHeaderBadgeProps, SectionHeaderContent, type SectionHeaderContentProps, SectionHeaderIcon, type SectionHeaderIconProps, SectionHeaderRoot, type SectionHeaderRootProps, SectionHeaderSubtitle, type SectionHeaderSubtitleProps, SectionHeaderTitle, type SectionHeaderTitleProps, Select, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectOption, type SelectProps, SelectSeparator, SelectionLayout, type SelectionLayoutCardProps, type SelectionLayoutEmptyProps, type SelectionLayoutHeaderProps, type SelectionLayoutHeadlineProps, type SelectionLayoutListProps, type SelectionLayoutLogoProps, type SelectionLayoutMainProps, type SelectionLayoutProps, type SelectionLayoutSearchProps, type SelectionLayoutSidebarProps, type SelectionLayoutStatsProps, type SelectionLayoutTabProps, type SelectionLayoutTabsProps, Separator, Sidebar, type SidebarContextValue, type SidebarFooterMenuItem, type SidebarFooterProps, type SidebarFooterUser, type SidebarHeaderProps, type SidebarNavGroupProps, type SidebarNavItemProps, type SidebarNavProps, type SidebarProps, type SidebarSectionProps, SimpleTooltip, type SimpleTooltipProps, Skeleton, type SkeletonProps, Sparkline, type SparklineColor, StatsCard, type StatsCardChangeProps, type StatsCardChartProps, type ColorScheme as StatsCardColorScheme, type StatsCardContentProps, type StatsCardHeaderProps, type StatsCardIconProps, type StatsCardRootProps, type StatsCardSubtitleProps, type StatsCardTitleProps, type StatsCardTodayProps, type StatsCardValueProps, type Variant as StatsCardVariant, type StepState, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThemeProvider, ThemeToggle, type ThemeToggleProps, Toaster, type ToasterProps, Tooltip, TooltipAction, type TooltipActionProps, TooltipActions, type TooltipActionsProps, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipDescription, type TooltipDescriptionProps, TooltipHeader, type TooltipHeaderProps, TooltipIcon, type TooltipIconProps, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTitle, type TooltipTitleProps, TooltipTrigger, type UseDataTableConfig, type UserMenuItemConfig, type ValidationSchema, Wizard, WizardContent, type WizardContentProps, type WizardContextValue, WizardNavigation, type WizardNavigationProps, WizardPanel, type WizardPanelProps, WizardProgress, type WizardProgressProps, type WizardProps, WizardProvider, type WizardStepConfig, WizardStepConnector, type WizardStepConnectorProps, WizardStepIndicator, type WizardStepIndicatorProps, WizardSteps, type WizardStepsProps, cn, itemCardBadgeVariants, itemCardIconVariants, itemCardVariants, loader, toast, useAutoPageSize, useAvailableHeight, useDashboardLayout, useDataTable, useDataTableColumnVisibility, useDataTableDensity, useDataTableEmpty, useDataTableInstance, useDataTableLoading, useDataTableMeta, useDataTablePagination, useDataTableSelection, useDataTableSorting, useDataTableState, useDebounce, useDebouncedCallback, useFormFieldContext, useItemCard, useKanban, useKanbanOptional, useLoader, useMediaQuery, useSidebar, useSidebarOptional, useTheme, useWizardContext, useWizardContextOptional };
|
|
2861
|
+
export { AuthLayout, type AuthLayoutBodyProps, type AuthLayoutContentProps, type AuthLayoutDividerProps, type AuthLayoutFooterProps, type AuthLayoutHeaderProps, type AuthLayoutImageProps, type AuthLayoutLinkProps, type AuthLayoutProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, type BaseFieldProps, BigNumberCard, type BigNumberCardContentProps, type BigNumberCardHeaderProps, type BigNumberCardLinkProps, type BigNumberCardRootProps, type BigNumberCardSize, type BigNumberCardSparklineProps, type BigNumberCardTitleProps, type BigNumberCardTrendProps, type BigNumberCardValueProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type ChartDataPoint, Checkbox, type CheckboxProps, type Company, DENSITY_CONFIG, DashboardLayout, type DashboardLayoutBreadcrumbsProps, type DashboardLayoutContentProps, type DashboardLayoutContextValue, type DashboardLayoutHeaderActionsProps, type DashboardLayoutHeaderProps, type DashboardLayoutHeaderTitleProps, type DashboardLayoutHeaderUserProps, type DashboardLayoutMobileNavItemProps, type DashboardLayoutMobileNavProps, type DashboardLayoutProps, type DashboardLayoutSidebarFooterProps, type DashboardLayoutSidebarHeaderProps, type DashboardLayoutSidebarNavGroupProps, type DashboardLayoutSidebarNavItemProps, type DashboardLayoutSidebarNavProps, type DashboardLayoutSidebarProps, type DashboardLayoutSidebarSectionProps, DataTable, type DataTableBulkActionsProps, type DataTableColumnHeaderProps, type DataTableColumnVisibilityProps, type DataTableContentProps, type DataTableContextValue, type DataTableDensity, type DataTableDensityToggleProps, type DataTableEmptyStateProps, type DataTableExportFormat, type DataTableExportProps, type DataTableFilterOption, type DataTableFilterProps, type DataTableFiltersProps, type DataTableLoadingProps, type DataTableMeta, type DataTablePaginationMode, type DataTablePaginationProps, type DataTableProps, type DataTableRowActionsProps, type DataTableSearchProps, type DataTableState, type DataTableTab, type DataTableTabsProps, type DataTableToolbarProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogWrapper, type DialogWrapperProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, type FieldTooltip, type FieldTooltipConfig, FloatingBarCompound as FloatingBar, FloatingBarAction, type FloatingBarActionProps, FloatingBarCounter, type FloatingBarCounterProps, FloatingBarDivider, type FloatingBarDividerProps, FloatingBarIconAction, type FloatingBarIconActionProps, type FloatingBarProps, Form, FormCheckbox, type FormCheckboxProps, type FormContextValue, FormDescription, type FormDescriptionProps, FormError, type FormErrorProps, type FormFieldContextValue, FormFieldProvider, FormFieldWrapper, type FormFieldWrapperProps, FormInput, type FormInputProps, FormLabel, type FormLabelProps, FormMultiSelect, type FormMultiSelectProps, FormNumberStepper, type FormNumberStepperProps, FormRadioGroup, type FormRadioGroupProps, type FormRootProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, FormTextarea, type FormTextareaProps, GlobalLoaderController, Input, type InputProps, ItemCard, ItemCardActionButton, type ItemCardActionButtonProps, ItemCardActions, type ItemCardActionsProps, ItemCardActionsRow, type ItemCardActionsRowProps, ItemCardBadge, type ItemCardBadgeProps, ItemCardContent, ItemCardContentItem, type ItemCardContentItemProps, type ItemCardContentProps, ItemCardEmpty, type ItemCardEmptyProps, ItemCardFooter, ItemCardFooterDivider, type ItemCardFooterDividerProps, ItemCardFooterItem, type ItemCardFooterItemProps, type ItemCardFooterProps, ItemCardHeader, type ItemCardHeaderProps, ItemCardIcon, type ItemCardIconProps, ItemCardRoot, type ItemCardRootProps, ItemCardSubtitle, type ItemCardSubtitleProps, ItemCardTitle, ItemCardTitleGroup, type ItemCardTitleGroupProps, type ItemCardTitleProps, Kanban, type KanbanBoardProps, type KanbanCardProps, type KanbanColumnConfig, type KanbanColumnProps, type KanbanContextValue, type KanbanDragResult, type KanbanEmptyProps, type KanbanItem, Loader, type LoaderProps, LoaderProvider, Logo, type LogoProps, type MaskType, MobileNav, type MobileNavFabAction, MobileNavItem, type MobileNavItemConfig, type MobileNavItemProps, type MobileNavProps, Navbar, NavbarCompanyProfile, type NavbarCompanyProfileProps, NavbarNotification, type NavbarNotificationProps, type NavbarProps, NavbarUserMenu, type NavbarUserMenuProps, type NotificationItem, NumberStepper, type NumberStepperProps, PageHeader, type PageHeaderProps, type PaginatedResponse, type PaginationMeta, type PaginationParams, Popover, PopoverContent, PopoverTrigger, type RadioOption, type RadioOptionColor, RippleBackground, type RippleBackgroundProps, RippleEffect, type RippleEffectProps, RippleWrapper, type RippleWrapperProps, ScrollArea, ScrollBar, SectionHeader, SectionHeaderActions, type SectionHeaderActionsProps, SectionHeaderBadge, type SectionHeaderBadgeProps, SectionHeaderContent, type SectionHeaderContentProps, SectionHeaderIcon, type SectionHeaderIconProps, SectionHeaderRoot, type SectionHeaderRootProps, SectionHeaderSubtitle, type SectionHeaderSubtitleProps, SectionHeaderTitle, type SectionHeaderTitleProps, Select, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectOption, type SelectProps, SelectSeparator, SelectionLayout, type SelectionLayoutCardProps, type SelectionLayoutEmptyProps, type SelectionLayoutHeaderProps, type SelectionLayoutHeadlineProps, type SelectionLayoutListProps, type SelectionLayoutLogoProps, type SelectionLayoutMainProps, type SelectionLayoutProps, type SelectionLayoutSearchProps, type SelectionLayoutSidebarProps, type SelectionLayoutStatsProps, type SelectionLayoutTabProps, type SelectionLayoutTabsProps, Separator, Sidebar, type SidebarContextValue, type SidebarFooterMenuItem, type SidebarFooterProps, type SidebarFooterUser, type SidebarHeaderProps, type SidebarNavGroupProps, type SidebarNavItemProps, type SidebarNavProps, type SidebarProps, type SidebarSectionProps, SimpleTooltip, type SimpleTooltipProps, Skeleton, type SkeletonProps, Sparkline, type SparklineColor, StatsCard, type StatsCardChangeProps, type StatsCardChartProps, type ColorScheme as StatsCardColorScheme, type StatsCardContentProps, type StatsCardHeaderProps, type StatsCardIconProps, type StatsCardRootProps, type StatsCardSubtitleProps, type StatsCardTitleProps, type StatsCardTodayProps, type StatsCardValueProps, type Variant as StatsCardVariant, type StepState, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThemeProvider, ThemeToggle, type ThemeToggleProps, Toaster, type ToasterProps, Tooltip, TooltipAction, type TooltipActionProps, TooltipActions, type TooltipActionsProps, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipDescription, type TooltipDescriptionProps, TooltipHeader, type TooltipHeaderProps, TooltipIcon, type TooltipIconProps, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTitle, type TooltipTitleProps, TooltipTrigger, type UseDataTableConfig, type UserMenuItemConfig, type ValidationSchema, Wizard, WizardContent, type WizardContentProps, type WizardContextValue, WizardNavigation, type WizardNavigationProps, WizardPanel, type WizardPanelProps, WizardProgress, type WizardProgressProps, type WizardProps, WizardProvider, type WizardStepConfig, WizardStepConnector, type WizardStepConnectorProps, WizardStepIndicator, type WizardStepIndicatorProps, WizardSteps, type WizardStepsProps, cn, itemCardBadgeVariants, itemCardIconVariants, itemCardVariants, loader, toast, useAutoPageSize, useAvailableHeight, useDashboardLayout, useDataTable, useDataTableColumnVisibility, useDataTableDensity, useDataTableEmpty, useDataTableInstance, useDataTableLoading, useDataTableMeta, useDataTablePagination, useDataTableSelection, useDataTableSorting, useDataTableState, useDebounce, useDebouncedCallback, useFormFieldContext, useItemCard, useKanban, useKanbanOptional, useLoader, useMediaQuery, useSidebar, useSidebarOptional, useTheme, useWizardContext, useWizardContextOptional };
|
package/dist/index.d.ts
CHANGED
|
@@ -829,6 +829,24 @@ declare const toast: ((message: string) => string | number) & {
|
|
|
829
829
|
};
|
|
830
830
|
};
|
|
831
831
|
|
|
832
|
+
interface NumberStepperProps {
|
|
833
|
+
value?: number;
|
|
834
|
+
onChange?: (value: number) => void;
|
|
835
|
+
onBlur?: () => void;
|
|
836
|
+
min?: number;
|
|
837
|
+
max?: number;
|
|
838
|
+
step?: number;
|
|
839
|
+
defaultValue?: number;
|
|
840
|
+
label?: string;
|
|
841
|
+
required?: boolean;
|
|
842
|
+
disabled?: boolean;
|
|
843
|
+
error?: boolean;
|
|
844
|
+
labelSuffix?: React$1.ReactNode;
|
|
845
|
+
className?: string;
|
|
846
|
+
name?: string;
|
|
847
|
+
}
|
|
848
|
+
declare const NumberStepper: React$1.ForwardRefExoticComponent<NumberStepperProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
849
|
+
|
|
832
850
|
declare const checkboxVariants: (props?: ({
|
|
833
851
|
variant?: "default" | "outline" | "secondary" | "muted" | null | undefined;
|
|
834
852
|
size?: "sm" | "lg" | "md" | null | undefined;
|
|
@@ -1017,6 +1035,19 @@ declare namespace FormRadioGroup {
|
|
|
1017
1035
|
var displayName: string;
|
|
1018
1036
|
}
|
|
1019
1037
|
|
|
1038
|
+
interface FormNumberStepperProps<T extends FieldValues = FieldValues> extends BaseFieldProps<T> {
|
|
1039
|
+
min?: number;
|
|
1040
|
+
max?: number;
|
|
1041
|
+
step?: number;
|
|
1042
|
+
defaultValue?: number;
|
|
1043
|
+
hideError?: boolean;
|
|
1044
|
+
tooltip?: FieldTooltip;
|
|
1045
|
+
}
|
|
1046
|
+
declare function FormNumberStepper<T extends FieldValues = FieldValues>({ name, label, description, tooltip, required, disabled, className, min, max, step, defaultValue, hideError, }: FormNumberStepperProps<T>): react_jsx_runtime.JSX.Element;
|
|
1047
|
+
declare namespace FormNumberStepper {
|
|
1048
|
+
var displayName: string;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1020
1051
|
declare function useFormFieldContext(): FormFieldContextValue;
|
|
1021
1052
|
interface FormFieldProviderProps {
|
|
1022
1053
|
name: string;
|
|
@@ -1042,6 +1073,7 @@ declare const Form: typeof FormRoot & {
|
|
|
1042
1073
|
Checkbox: typeof FormCheckbox;
|
|
1043
1074
|
Switch: typeof FormSwitch;
|
|
1044
1075
|
RadioGroup: typeof FormRadioGroup;
|
|
1076
|
+
NumberStepper: typeof FormNumberStepper;
|
|
1045
1077
|
Label: React$1.ForwardRefExoticComponent<FormLabelProps & React$1.RefAttributes<HTMLLabelElement>>;
|
|
1046
1078
|
Description: React$1.ForwardRefExoticComponent<FormDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1047
1079
|
Error: React$1.ForwardRefExoticComponent<FormErrorProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -2826,4 +2858,4 @@ declare const useTheme: () => ThemeProviderState;
|
|
|
2826
2858
|
*/
|
|
2827
2859
|
declare function cn(...inputs: ClassValue[]): string;
|
|
2828
2860
|
|
|
2829
|
-
export { AuthLayout, type AuthLayoutBodyProps, type AuthLayoutContentProps, type AuthLayoutDividerProps, type AuthLayoutFooterProps, type AuthLayoutHeaderProps, type AuthLayoutImageProps, type AuthLayoutLinkProps, type AuthLayoutProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, type BaseFieldProps, BigNumberCard, type BigNumberCardContentProps, type BigNumberCardHeaderProps, type BigNumberCardLinkProps, type BigNumberCardRootProps, type BigNumberCardSize, type BigNumberCardSparklineProps, type BigNumberCardTitleProps, type BigNumberCardTrendProps, type BigNumberCardValueProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type ChartDataPoint, Checkbox, type CheckboxProps, type Company, DENSITY_CONFIG, DashboardLayout, type DashboardLayoutBreadcrumbsProps, type DashboardLayoutContentProps, type DashboardLayoutContextValue, type DashboardLayoutHeaderActionsProps, type DashboardLayoutHeaderProps, type DashboardLayoutHeaderTitleProps, type DashboardLayoutHeaderUserProps, type DashboardLayoutMobileNavItemProps, type DashboardLayoutMobileNavProps, type DashboardLayoutProps, type DashboardLayoutSidebarFooterProps, type DashboardLayoutSidebarHeaderProps, type DashboardLayoutSidebarNavGroupProps, type DashboardLayoutSidebarNavItemProps, type DashboardLayoutSidebarNavProps, type DashboardLayoutSidebarProps, type DashboardLayoutSidebarSectionProps, DataTable, type DataTableBulkActionsProps, type DataTableColumnHeaderProps, type DataTableColumnVisibilityProps, type DataTableContentProps, type DataTableContextValue, type DataTableDensity, type DataTableDensityToggleProps, type DataTableEmptyStateProps, type DataTableExportFormat, type DataTableExportProps, type DataTableFilterOption, type DataTableFilterProps, type DataTableFiltersProps, type DataTableLoadingProps, type DataTableMeta, type DataTablePaginationMode, type DataTablePaginationProps, type DataTableProps, type DataTableRowActionsProps, type DataTableSearchProps, type DataTableState, type DataTableTab, type DataTableTabsProps, type DataTableToolbarProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogWrapper, type DialogWrapperProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, FloatingBarCompound as FloatingBar, FloatingBarAction, type FloatingBarActionProps, FloatingBarCounter, type FloatingBarCounterProps, FloatingBarDivider, type FloatingBarDividerProps, FloatingBarIconAction, type FloatingBarIconActionProps, type FloatingBarProps, Form, FormCheckbox, type FormCheckboxProps, type FormContextValue, FormDescription, type FormDescriptionProps, FormError, type FormErrorProps, type FormFieldContextValue, FormFieldProvider, FormFieldWrapper, type FormFieldWrapperProps, FormInput, type FormInputProps, FormLabel, type FormLabelProps, FormRadioGroup, type FormRadioGroupProps, type FormRootProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, FormTextarea, type FormTextareaProps, GlobalLoaderController, Input, type InputProps, ItemCard, ItemCardActionButton, type ItemCardActionButtonProps, ItemCardActions, type ItemCardActionsProps, ItemCardActionsRow, type ItemCardActionsRowProps, ItemCardBadge, type ItemCardBadgeProps, ItemCardContent, ItemCardContentItem, type ItemCardContentItemProps, type ItemCardContentProps, ItemCardEmpty, type ItemCardEmptyProps, ItemCardFooter, ItemCardFooterDivider, type ItemCardFooterDividerProps, ItemCardFooterItem, type ItemCardFooterItemProps, type ItemCardFooterProps, ItemCardHeader, type ItemCardHeaderProps, ItemCardIcon, type ItemCardIconProps, ItemCardRoot, type ItemCardRootProps, ItemCardSubtitle, type ItemCardSubtitleProps, ItemCardTitle, ItemCardTitleGroup, type ItemCardTitleGroupProps, type ItemCardTitleProps, Kanban, type KanbanBoardProps, type KanbanCardProps, type KanbanColumnConfig, type KanbanColumnProps, type KanbanContextValue, type KanbanDragResult, type KanbanEmptyProps, type KanbanItem, Loader, type LoaderProps, LoaderProvider, Logo, type LogoProps, type MaskType, MobileNav, type MobileNavFabAction, MobileNavItem, type MobileNavItemConfig, type MobileNavItemProps, type MobileNavProps, Navbar, NavbarCompanyProfile, type NavbarCompanyProfileProps, NavbarNotification, type NavbarNotificationProps, type NavbarProps, NavbarUserMenu, type NavbarUserMenuProps, type NotificationItem, PageHeader, type PageHeaderProps, type PaginatedResponse, type PaginationMeta, type PaginationParams, Popover, PopoverContent, PopoverTrigger, type RadioOption, type RadioOptionColor, RippleBackground, type RippleBackgroundProps, RippleEffect, type RippleEffectProps, RippleWrapper, type RippleWrapperProps, ScrollArea, ScrollBar, SectionHeader, SectionHeaderActions, type SectionHeaderActionsProps, SectionHeaderBadge, type SectionHeaderBadgeProps, SectionHeaderContent, type SectionHeaderContentProps, SectionHeaderIcon, type SectionHeaderIconProps, SectionHeaderRoot, type SectionHeaderRootProps, SectionHeaderSubtitle, type SectionHeaderSubtitleProps, SectionHeaderTitle, type SectionHeaderTitleProps, Select, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectOption, type SelectProps, SelectSeparator, SelectionLayout, type SelectionLayoutCardProps, type SelectionLayoutEmptyProps, type SelectionLayoutHeaderProps, type SelectionLayoutHeadlineProps, type SelectionLayoutListProps, type SelectionLayoutLogoProps, type SelectionLayoutMainProps, type SelectionLayoutProps, type SelectionLayoutSearchProps, type SelectionLayoutSidebarProps, type SelectionLayoutStatsProps, type SelectionLayoutTabProps, type SelectionLayoutTabsProps, Separator, Sidebar, type SidebarContextValue, type SidebarFooterMenuItem, type SidebarFooterProps, type SidebarFooterUser, type SidebarHeaderProps, type SidebarNavGroupProps, type SidebarNavItemProps, type SidebarNavProps, type SidebarProps, type SidebarSectionProps, SimpleTooltip, type SimpleTooltipProps, Skeleton, type SkeletonProps, Sparkline, type SparklineColor, StatsCard, type StatsCardChangeProps, type StatsCardChartProps, type ColorScheme as StatsCardColorScheme, type StatsCardContentProps, type StatsCardHeaderProps, type StatsCardIconProps, type StatsCardRootProps, type StatsCardSubtitleProps, type StatsCardTitleProps, type StatsCardTodayProps, type StatsCardValueProps, type Variant as StatsCardVariant, type StepState, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThemeProvider, ThemeToggle, type ThemeToggleProps, Toaster, type ToasterProps, Tooltip, TooltipAction, type TooltipActionProps, TooltipActions, type TooltipActionsProps, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipDescription, type TooltipDescriptionProps, TooltipHeader, type TooltipHeaderProps, TooltipIcon, type TooltipIconProps, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTitle, type TooltipTitleProps, TooltipTrigger, type UseDataTableConfig, type UserMenuItemConfig, type ValidationSchema, Wizard, WizardContent, type WizardContentProps, type WizardContextValue, WizardNavigation, type WizardNavigationProps, WizardPanel, type WizardPanelProps, WizardProgress, type WizardProgressProps, type WizardProps, WizardProvider, type WizardStepConfig, WizardStepConnector, type WizardStepConnectorProps, WizardStepIndicator, type WizardStepIndicatorProps, WizardSteps, type WizardStepsProps, cn, itemCardBadgeVariants, itemCardIconVariants, itemCardVariants, loader, toast, useAutoPageSize, useAvailableHeight, useDashboardLayout, useDataTable, useDataTableColumnVisibility, useDataTableDensity, useDataTableEmpty, useDataTableInstance, useDataTableLoading, useDataTableMeta, useDataTablePagination, useDataTableSelection, useDataTableSorting, useDataTableState, useDebounce, useDebouncedCallback, useFormFieldContext, useItemCard, useKanban, useKanbanOptional, useLoader, useMediaQuery, useSidebar, useSidebarOptional, useTheme, useWizardContext, useWizardContextOptional };
|
|
2861
|
+
export { AuthLayout, type AuthLayoutBodyProps, type AuthLayoutContentProps, type AuthLayoutDividerProps, type AuthLayoutFooterProps, type AuthLayoutHeaderProps, type AuthLayoutImageProps, type AuthLayoutLinkProps, type AuthLayoutProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, type BaseFieldProps, BigNumberCard, type BigNumberCardContentProps, type BigNumberCardHeaderProps, type BigNumberCardLinkProps, type BigNumberCardRootProps, type BigNumberCardSize, type BigNumberCardSparklineProps, type BigNumberCardTitleProps, type BigNumberCardTrendProps, type BigNumberCardValueProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type ChartDataPoint, Checkbox, type CheckboxProps, type Company, DENSITY_CONFIG, DashboardLayout, type DashboardLayoutBreadcrumbsProps, type DashboardLayoutContentProps, type DashboardLayoutContextValue, type DashboardLayoutHeaderActionsProps, type DashboardLayoutHeaderProps, type DashboardLayoutHeaderTitleProps, type DashboardLayoutHeaderUserProps, type DashboardLayoutMobileNavItemProps, type DashboardLayoutMobileNavProps, type DashboardLayoutProps, type DashboardLayoutSidebarFooterProps, type DashboardLayoutSidebarHeaderProps, type DashboardLayoutSidebarNavGroupProps, type DashboardLayoutSidebarNavItemProps, type DashboardLayoutSidebarNavProps, type DashboardLayoutSidebarProps, type DashboardLayoutSidebarSectionProps, DataTable, type DataTableBulkActionsProps, type DataTableColumnHeaderProps, type DataTableColumnVisibilityProps, type DataTableContentProps, type DataTableContextValue, type DataTableDensity, type DataTableDensityToggleProps, type DataTableEmptyStateProps, type DataTableExportFormat, type DataTableExportProps, type DataTableFilterOption, type DataTableFilterProps, type DataTableFiltersProps, type DataTableLoadingProps, type DataTableMeta, type DataTablePaginationMode, type DataTablePaginationProps, type DataTableProps, type DataTableRowActionsProps, type DataTableSearchProps, type DataTableState, type DataTableTab, type DataTableTabsProps, type DataTableToolbarProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogWrapper, type DialogWrapperProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, type FieldTooltip, type FieldTooltipConfig, FloatingBarCompound as FloatingBar, FloatingBarAction, type FloatingBarActionProps, FloatingBarCounter, type FloatingBarCounterProps, FloatingBarDivider, type FloatingBarDividerProps, FloatingBarIconAction, type FloatingBarIconActionProps, type FloatingBarProps, Form, FormCheckbox, type FormCheckboxProps, type FormContextValue, FormDescription, type FormDescriptionProps, FormError, type FormErrorProps, type FormFieldContextValue, FormFieldProvider, FormFieldWrapper, type FormFieldWrapperProps, FormInput, type FormInputProps, FormLabel, type FormLabelProps, FormMultiSelect, type FormMultiSelectProps, FormNumberStepper, type FormNumberStepperProps, FormRadioGroup, type FormRadioGroupProps, type FormRootProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, FormTextarea, type FormTextareaProps, GlobalLoaderController, Input, type InputProps, ItemCard, ItemCardActionButton, type ItemCardActionButtonProps, ItemCardActions, type ItemCardActionsProps, ItemCardActionsRow, type ItemCardActionsRowProps, ItemCardBadge, type ItemCardBadgeProps, ItemCardContent, ItemCardContentItem, type ItemCardContentItemProps, type ItemCardContentProps, ItemCardEmpty, type ItemCardEmptyProps, ItemCardFooter, ItemCardFooterDivider, type ItemCardFooterDividerProps, ItemCardFooterItem, type ItemCardFooterItemProps, type ItemCardFooterProps, ItemCardHeader, type ItemCardHeaderProps, ItemCardIcon, type ItemCardIconProps, ItemCardRoot, type ItemCardRootProps, ItemCardSubtitle, type ItemCardSubtitleProps, ItemCardTitle, ItemCardTitleGroup, type ItemCardTitleGroupProps, type ItemCardTitleProps, Kanban, type KanbanBoardProps, type KanbanCardProps, type KanbanColumnConfig, type KanbanColumnProps, type KanbanContextValue, type KanbanDragResult, type KanbanEmptyProps, type KanbanItem, Loader, type LoaderProps, LoaderProvider, Logo, type LogoProps, type MaskType, MobileNav, type MobileNavFabAction, MobileNavItem, type MobileNavItemConfig, type MobileNavItemProps, type MobileNavProps, Navbar, NavbarCompanyProfile, type NavbarCompanyProfileProps, NavbarNotification, type NavbarNotificationProps, type NavbarProps, NavbarUserMenu, type NavbarUserMenuProps, type NotificationItem, NumberStepper, type NumberStepperProps, PageHeader, type PageHeaderProps, type PaginatedResponse, type PaginationMeta, type PaginationParams, Popover, PopoverContent, PopoverTrigger, type RadioOption, type RadioOptionColor, RippleBackground, type RippleBackgroundProps, RippleEffect, type RippleEffectProps, RippleWrapper, type RippleWrapperProps, ScrollArea, ScrollBar, SectionHeader, SectionHeaderActions, type SectionHeaderActionsProps, SectionHeaderBadge, type SectionHeaderBadgeProps, SectionHeaderContent, type SectionHeaderContentProps, SectionHeaderIcon, type SectionHeaderIconProps, SectionHeaderRoot, type SectionHeaderRootProps, SectionHeaderSubtitle, type SectionHeaderSubtitleProps, SectionHeaderTitle, type SectionHeaderTitleProps, Select, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectOption, type SelectProps, SelectSeparator, SelectionLayout, type SelectionLayoutCardProps, type SelectionLayoutEmptyProps, type SelectionLayoutHeaderProps, type SelectionLayoutHeadlineProps, type SelectionLayoutListProps, type SelectionLayoutLogoProps, type SelectionLayoutMainProps, type SelectionLayoutProps, type SelectionLayoutSearchProps, type SelectionLayoutSidebarProps, type SelectionLayoutStatsProps, type SelectionLayoutTabProps, type SelectionLayoutTabsProps, Separator, Sidebar, type SidebarContextValue, type SidebarFooterMenuItem, type SidebarFooterProps, type SidebarFooterUser, type SidebarHeaderProps, type SidebarNavGroupProps, type SidebarNavItemProps, type SidebarNavProps, type SidebarProps, type SidebarSectionProps, SimpleTooltip, type SimpleTooltipProps, Skeleton, type SkeletonProps, Sparkline, type SparklineColor, StatsCard, type StatsCardChangeProps, type StatsCardChartProps, type ColorScheme as StatsCardColorScheme, type StatsCardContentProps, type StatsCardHeaderProps, type StatsCardIconProps, type StatsCardRootProps, type StatsCardSubtitleProps, type StatsCardTitleProps, type StatsCardTodayProps, type StatsCardValueProps, type Variant as StatsCardVariant, type StepState, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThemeProvider, ThemeToggle, type ThemeToggleProps, Toaster, type ToasterProps, Tooltip, TooltipAction, type TooltipActionProps, TooltipActions, type TooltipActionsProps, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipDescription, type TooltipDescriptionProps, TooltipHeader, type TooltipHeaderProps, TooltipIcon, type TooltipIconProps, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTitle, type TooltipTitleProps, TooltipTrigger, type UseDataTableConfig, type UserMenuItemConfig, type ValidationSchema, Wizard, WizardContent, type WizardContentProps, type WizardContextValue, WizardNavigation, type WizardNavigationProps, WizardPanel, type WizardPanelProps, WizardProgress, type WizardProgressProps, type WizardProps, WizardProvider, type WizardStepConfig, WizardStepConnector, type WizardStepConnectorProps, WizardStepIndicator, type WizardStepIndicatorProps, WizardSteps, type WizardStepsProps, cn, itemCardBadgeVariants, itemCardIconVariants, itemCardVariants, loader, toast, useAutoPageSize, useAvailableHeight, useDashboardLayout, useDataTable, useDataTableColumnVisibility, useDataTableDensity, useDataTableEmpty, useDataTableInstance, useDataTableLoading, useDataTableMeta, useDataTablePagination, useDataTableSelection, useDataTableSorting, useDataTableState, useDebounce, useDebouncedCallback, useFormFieldContext, useItemCard, useKanban, useKanbanOptional, useLoader, useMediaQuery, useSidebar, useSidebarOptional, useTheme, useWizardContext, useWizardContextOptional };
|
package/dist/index.js
CHANGED
|
@@ -3073,6 +3073,163 @@ var toast = Object.assign(
|
|
|
3073
3073
|
promise: (promise, options) => sonner.toast.promise(promise, options)
|
|
3074
3074
|
}
|
|
3075
3075
|
);
|
|
3076
|
+
var NumberStepper = React10__namespace.forwardRef(
|
|
3077
|
+
({
|
|
3078
|
+
value = 1,
|
|
3079
|
+
onChange,
|
|
3080
|
+
onBlur,
|
|
3081
|
+
min = 0,
|
|
3082
|
+
max,
|
|
3083
|
+
step = 0.5,
|
|
3084
|
+
defaultValue,
|
|
3085
|
+
label,
|
|
3086
|
+
required,
|
|
3087
|
+
disabled,
|
|
3088
|
+
error,
|
|
3089
|
+
labelSuffix,
|
|
3090
|
+
className,
|
|
3091
|
+
name
|
|
3092
|
+
}, ref) => {
|
|
3093
|
+
const inputRef = React10__namespace.useRef(null);
|
|
3094
|
+
const [displayValue, setDisplayValue] = React10__namespace.useState(String(value));
|
|
3095
|
+
const [isFocused, setIsFocused] = React10__namespace.useState(false);
|
|
3096
|
+
React10__namespace.useImperativeHandle(ref, () => inputRef.current, []);
|
|
3097
|
+
React10__namespace.useEffect(() => {
|
|
3098
|
+
if (!isFocused) {
|
|
3099
|
+
setDisplayValue(String(value));
|
|
3100
|
+
}
|
|
3101
|
+
}, [value, isFocused]);
|
|
3102
|
+
const canDecrement = value - step >= min;
|
|
3103
|
+
const canIncrement = max === void 0 || value + step <= max;
|
|
3104
|
+
const handleDecrement = React10__namespace.useCallback(() => {
|
|
3105
|
+
if (!canDecrement || disabled) return;
|
|
3106
|
+
const newValue = Math.round((value - step) * 1e3) / 1e3;
|
|
3107
|
+
onChange?.(newValue);
|
|
3108
|
+
}, [value, step, min, disabled, onChange, canDecrement]);
|
|
3109
|
+
const handleIncrement = React10__namespace.useCallback(() => {
|
|
3110
|
+
if (!canIncrement || disabled) return;
|
|
3111
|
+
const newValue = Math.round((value + step) * 1e3) / 1e3;
|
|
3112
|
+
onChange?.(newValue);
|
|
3113
|
+
}, [value, step, max, disabled, onChange, canIncrement]);
|
|
3114
|
+
const handleInputChange = React10__namespace.useCallback(
|
|
3115
|
+
(e) => {
|
|
3116
|
+
const raw = e.target.value;
|
|
3117
|
+
setDisplayValue(raw);
|
|
3118
|
+
if (raw === "" || raw === "-" || raw === ".") return;
|
|
3119
|
+
const parsed = parseFloat(raw);
|
|
3120
|
+
if (isNaN(parsed)) return;
|
|
3121
|
+
onChange?.(parsed);
|
|
3122
|
+
},
|
|
3123
|
+
[onChange]
|
|
3124
|
+
);
|
|
3125
|
+
const handleInputFocus = React10__namespace.useCallback(() => {
|
|
3126
|
+
setIsFocused(true);
|
|
3127
|
+
}, []);
|
|
3128
|
+
const handleInputBlur = React10__namespace.useCallback(() => {
|
|
3129
|
+
setIsFocused(false);
|
|
3130
|
+
const parsed = parseFloat(displayValue);
|
|
3131
|
+
if (isNaN(parsed) || displayValue === "") {
|
|
3132
|
+
const resetValue = defaultValue ?? min;
|
|
3133
|
+
setDisplayValue(String(resetValue));
|
|
3134
|
+
if (value !== resetValue) onChange?.(resetValue);
|
|
3135
|
+
onBlur?.();
|
|
3136
|
+
return;
|
|
3137
|
+
}
|
|
3138
|
+
let clamped = parsed;
|
|
3139
|
+
if (clamped < min) clamped = min;
|
|
3140
|
+
if (max !== void 0 && clamped > max) clamped = max;
|
|
3141
|
+
setDisplayValue(String(clamped));
|
|
3142
|
+
if (clamped !== value) onChange?.(clamped);
|
|
3143
|
+
onBlur?.();
|
|
3144
|
+
}, [displayValue, value, min, max, onChange, onBlur]);
|
|
3145
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
|
|
3146
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3147
|
+
"div",
|
|
3148
|
+
{
|
|
3149
|
+
className: cn(
|
|
3150
|
+
"flex items-center h-12 rounded-md border-2 transition-colors overflow-hidden bg-background",
|
|
3151
|
+
error ? "border-red-500 focus-within:border-red-600" : "border-border focus-within:border-primary",
|
|
3152
|
+
disabled && "opacity-50 cursor-not-allowed"
|
|
3153
|
+
),
|
|
3154
|
+
children: [
|
|
3155
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3156
|
+
"button",
|
|
3157
|
+
{
|
|
3158
|
+
type: "button",
|
|
3159
|
+
tabIndex: -1,
|
|
3160
|
+
onClick: handleDecrement,
|
|
3161
|
+
disabled: disabled || !canDecrement,
|
|
3162
|
+
className: cn(
|
|
3163
|
+
"flex items-center justify-center w-11 h-full transition-colors select-none shrink-0",
|
|
3164
|
+
"text-muted-foreground hover:text-foreground hover:bg-muted",
|
|
3165
|
+
"disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-muted-foreground disabled:cursor-not-allowed"
|
|
3166
|
+
),
|
|
3167
|
+
"aria-label": "Diminuir",
|
|
3168
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) })
|
|
3169
|
+
}
|
|
3170
|
+
),
|
|
3171
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-6 bg-border shrink-0" }),
|
|
3172
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3173
|
+
"input",
|
|
3174
|
+
{
|
|
3175
|
+
ref: inputRef,
|
|
3176
|
+
name,
|
|
3177
|
+
type: "text",
|
|
3178
|
+
inputMode: "decimal",
|
|
3179
|
+
value: displayValue,
|
|
3180
|
+
onChange: handleInputChange,
|
|
3181
|
+
onFocus: handleInputFocus,
|
|
3182
|
+
onBlur: handleInputBlur,
|
|
3183
|
+
disabled,
|
|
3184
|
+
className: cn(
|
|
3185
|
+
"flex-1 min-w-0 h-full text-center text-sm font-medium bg-transparent outline-none",
|
|
3186
|
+
"disabled:cursor-not-allowed",
|
|
3187
|
+
label ? "pt-1" : ""
|
|
3188
|
+
)
|
|
3189
|
+
}
|
|
3190
|
+
),
|
|
3191
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-6 bg-border shrink-0" }),
|
|
3192
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3193
|
+
"button",
|
|
3194
|
+
{
|
|
3195
|
+
type: "button",
|
|
3196
|
+
tabIndex: -1,
|
|
3197
|
+
onClick: handleIncrement,
|
|
3198
|
+
disabled: disabled || !canIncrement,
|
|
3199
|
+
className: cn(
|
|
3200
|
+
"flex items-center justify-center w-11 h-full transition-colors select-none shrink-0",
|
|
3201
|
+
"text-muted-foreground hover:text-foreground hover:bg-muted",
|
|
3202
|
+
"disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-muted-foreground disabled:cursor-not-allowed"
|
|
3203
|
+
),
|
|
3204
|
+
"aria-label": "Aumentar",
|
|
3205
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: [
|
|
3206
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
3207
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
3208
|
+
] })
|
|
3209
|
+
}
|
|
3210
|
+
)
|
|
3211
|
+
]
|
|
3212
|
+
}
|
|
3213
|
+
),
|
|
3214
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3215
|
+
"label",
|
|
3216
|
+
{
|
|
3217
|
+
className: cn(
|
|
3218
|
+
"absolute left-3 top-[-6px] text-xs font-medium bg-background px-1 cursor-pointer inline-flex items-center gap-1",
|
|
3219
|
+
error ? "text-red-500" : "text-foreground"
|
|
3220
|
+
),
|
|
3221
|
+
onClick: () => inputRef.current?.focus(),
|
|
3222
|
+
children: [
|
|
3223
|
+
label,
|
|
3224
|
+
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-500 ml-0.5", children: "*" }),
|
|
3225
|
+
labelSuffix
|
|
3226
|
+
]
|
|
3227
|
+
}
|
|
3228
|
+
)
|
|
3229
|
+
] });
|
|
3230
|
+
}
|
|
3231
|
+
);
|
|
3232
|
+
NumberStepper.displayName = "NumberStepper";
|
|
3076
3233
|
var switchVariants = classVarianceAuthority.cva(
|
|
3077
3234
|
[
|
|
3078
3235
|
"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent",
|
|
@@ -4597,6 +4754,55 @@ function FormRadioGroup({
|
|
|
4597
4754
|
) });
|
|
4598
4755
|
}
|
|
4599
4756
|
FormRadioGroup.displayName = "Form.RadioGroup";
|
|
4757
|
+
function FormNumberStepper({
|
|
4758
|
+
name,
|
|
4759
|
+
label,
|
|
4760
|
+
description,
|
|
4761
|
+
tooltip,
|
|
4762
|
+
required,
|
|
4763
|
+
disabled,
|
|
4764
|
+
className,
|
|
4765
|
+
min = 0,
|
|
4766
|
+
max,
|
|
4767
|
+
step = 0.5,
|
|
4768
|
+
defaultValue,
|
|
4769
|
+
hideError = false
|
|
4770
|
+
}) {
|
|
4771
|
+
const form = reactHookForm.useFormContext();
|
|
4772
|
+
const fieldState = form.getFieldState(name, form.formState);
|
|
4773
|
+
const error = fieldState.error?.message;
|
|
4774
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FormFieldProvider, { name, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4775
|
+
reactHookForm.Controller,
|
|
4776
|
+
{
|
|
4777
|
+
control: form.control,
|
|
4778
|
+
name,
|
|
4779
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-1", className), children: [
|
|
4780
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4781
|
+
NumberStepper,
|
|
4782
|
+
{
|
|
4783
|
+
ref: field.ref,
|
|
4784
|
+
name: field.name,
|
|
4785
|
+
value: typeof field.value === "number" ? field.value : 0,
|
|
4786
|
+
onChange: field.onChange,
|
|
4787
|
+
onBlur: field.onBlur,
|
|
4788
|
+
min,
|
|
4789
|
+
max,
|
|
4790
|
+
step,
|
|
4791
|
+
defaultValue,
|
|
4792
|
+
label,
|
|
4793
|
+
required,
|
|
4794
|
+
disabled,
|
|
4795
|
+
error: !!error,
|
|
4796
|
+
labelSuffix: tooltip ? /* @__PURE__ */ jsxRuntime.jsx(FieldTooltipIcon, { tooltip }) : void 0
|
|
4797
|
+
}
|
|
4798
|
+
),
|
|
4799
|
+
description && !error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground px-1", children: description }),
|
|
4800
|
+
!hideError && error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-red-500 px-1", children: error })
|
|
4801
|
+
] })
|
|
4802
|
+
}
|
|
4803
|
+
) });
|
|
4804
|
+
}
|
|
4805
|
+
FormNumberStepper.displayName = "Form.NumberStepper";
|
|
4600
4806
|
function FormRoot({
|
|
4601
4807
|
form,
|
|
4602
4808
|
onSubmit,
|
|
@@ -4625,6 +4831,7 @@ var Form = Object.assign(FormRoot, {
|
|
|
4625
4831
|
Checkbox: FormCheckbox,
|
|
4626
4832
|
Switch: FormSwitch,
|
|
4627
4833
|
RadioGroup: FormRadioGroup,
|
|
4834
|
+
NumberStepper: FormNumberStepper,
|
|
4628
4835
|
// Partes auxiliares
|
|
4629
4836
|
Label: FormLabel,
|
|
4630
4837
|
Description: FormDescription,
|
|
@@ -9096,6 +9303,8 @@ exports.FormFieldProvider = FormFieldProvider;
|
|
|
9096
9303
|
exports.FormFieldWrapper = FormFieldWrapper;
|
|
9097
9304
|
exports.FormInput = FormInput;
|
|
9098
9305
|
exports.FormLabel = FormLabel;
|
|
9306
|
+
exports.FormMultiSelect = FormMultiSelect;
|
|
9307
|
+
exports.FormNumberStepper = FormNumberStepper;
|
|
9099
9308
|
exports.FormRadioGroup = FormRadioGroup;
|
|
9100
9309
|
exports.FormSelect = FormSelect;
|
|
9101
9310
|
exports.FormSwitch = FormSwitch;
|
|
@@ -9129,6 +9338,7 @@ exports.Navbar = Navbar;
|
|
|
9129
9338
|
exports.NavbarCompanyProfile = NavbarCompanyProfile;
|
|
9130
9339
|
exports.NavbarNotification = NavbarNotification;
|
|
9131
9340
|
exports.NavbarUserMenu = NavbarUserMenu;
|
|
9341
|
+
exports.NumberStepper = NumberStepper;
|
|
9132
9342
|
exports.PageHeader = PageHeader;
|
|
9133
9343
|
exports.Popover = Popover;
|
|
9134
9344
|
exports.PopoverContent = PopoverContent;
|