najm-kit 2.1.0 → 2.1.2
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.ts +28 -1
- package/dist/index.mjs +151 -62
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -506,6 +506,7 @@ declare namespace NPageHeaderTop {
|
|
|
506
506
|
declare function NPageHeader({ icon: Icon, title, subtitle, actions, filters, top, search, children, className, headerClassName, card, bordered }: NPageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
507
507
|
|
|
508
508
|
type DialogActionMode = "auto" | "dialog" | "content";
|
|
509
|
+
type DialogVariant = "default" | "window";
|
|
509
510
|
interface ButtonConfig {
|
|
510
511
|
text: string;
|
|
511
512
|
variant?: "default" | "destructive" | "secondary" | "outline" | "tertiary" | "ghost";
|
|
@@ -543,6 +544,16 @@ interface DialogConfig {
|
|
|
543
544
|
width?: DialogWidth;
|
|
544
545
|
height?: DialogHeight;
|
|
545
546
|
className?: string;
|
|
547
|
+
/** Class applied to the rendered dialog header. */
|
|
548
|
+
headerClassName?: string;
|
|
549
|
+
/** Class applied to the dialog title. */
|
|
550
|
+
titleClassName?: string;
|
|
551
|
+
/** Class applied to the dialog description. */
|
|
552
|
+
descriptionClassName?: string;
|
|
553
|
+
/** Class applied to the inline close button used by window/page-header dialogs. */
|
|
554
|
+
closeButtonClassName?: string;
|
|
555
|
+
/** Visual treatment for the dialog chrome. `window` adds a compact title bar with an inline bordered close button. */
|
|
556
|
+
variant?: DialogVariant;
|
|
546
557
|
actionMode?: DialogActionMode;
|
|
547
558
|
render?: DialogRenderer;
|
|
548
559
|
}
|
|
@@ -566,6 +577,16 @@ interface PushDialogOptions {
|
|
|
566
577
|
width?: DialogWidth;
|
|
567
578
|
height?: DialogHeight;
|
|
568
579
|
className?: string;
|
|
580
|
+
/** Class applied to the rendered dialog header. */
|
|
581
|
+
headerClassName?: string;
|
|
582
|
+
/** Class applied to the dialog title. */
|
|
583
|
+
titleClassName?: string;
|
|
584
|
+
/** Class applied to the dialog description. */
|
|
585
|
+
descriptionClassName?: string;
|
|
586
|
+
/** Class applied to the inline close button used by window/page-header dialogs. */
|
|
587
|
+
closeButtonClassName?: string;
|
|
588
|
+
/** Visual treatment for the dialog chrome. `window` adds a compact title bar with an inline bordered close button. */
|
|
589
|
+
variant?: DialogVariant;
|
|
569
590
|
/**
|
|
570
591
|
* Controls which layer owns action buttons.
|
|
571
592
|
* - auto: hide dialog buttons when content declares its own actions
|
|
@@ -620,6 +641,7 @@ type DialogStore = ReturnType<typeof createDialogStore>;
|
|
|
620
641
|
declare function useDialogStore(): DialogStore;
|
|
621
642
|
|
|
622
643
|
declare const dialogVariants: (props?: {
|
|
644
|
+
variant?: "default" | "window";
|
|
623
645
|
size?: "sm" | "md" | "lg" | "xl" | "full" | "xxl";
|
|
624
646
|
width?: "auto" | "sm" | "md" | "lg" | "xl" | "full" | "xxl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl";
|
|
625
647
|
height?: "auto" | "sm" | "md" | "lg" | "xl" | "full" | "xxl";
|
|
@@ -1803,6 +1825,8 @@ interface SelectInputProps extends BaseProps {
|
|
|
1803
1825
|
icon?: InputIcon;
|
|
1804
1826
|
showIcon?: boolean;
|
|
1805
1827
|
disabled?: boolean;
|
|
1828
|
+
/** Class applied to the portalled dropdown surface. */
|
|
1829
|
+
dropdownClassName?: string;
|
|
1806
1830
|
}
|
|
1807
1831
|
interface ComboboxInputProps extends BaseProps {
|
|
1808
1832
|
value: string;
|
|
@@ -2099,6 +2123,7 @@ declare const VariantProvider: React__default.FC<{
|
|
|
2099
2123
|
declare const useVariant: () => FormVariant;
|
|
2100
2124
|
declare const useVariantPreset: () => FormSlotClassNames;
|
|
2101
2125
|
|
|
2126
|
+
type FormInputBackground = "card" | "background" | "secondary" | "muted" | "transparent";
|
|
2102
2127
|
interface BaseFormInputProps {
|
|
2103
2128
|
name: string;
|
|
2104
2129
|
formLabel?: string;
|
|
@@ -2111,6 +2136,8 @@ interface BaseFormInputProps {
|
|
|
2111
2136
|
readOnly?: boolean;
|
|
2112
2137
|
hidden?: boolean;
|
|
2113
2138
|
className?: string;
|
|
2139
|
+
/** Semantic surface color for the input control. */
|
|
2140
|
+
background?: FormInputBackground;
|
|
2114
2141
|
classNames?: FormSlotClassNames;
|
|
2115
2142
|
onChange?: (value: any) => void;
|
|
2116
2143
|
}
|
|
@@ -3390,4 +3417,4 @@ interface InspectorSheetProps {
|
|
|
3390
3417
|
}
|
|
3391
3418
|
declare function NInspectorSheet({ open, onClose, title, children }: InspectorSheetProps): react_jsx_runtime.JSX.Element;
|
|
3392
3419
|
|
|
3393
|
-
export { Alert, type AlertLook, type AlertOrientation, type AlertProps, type AlertSize, type AlertTone, type AlertVariant, NCard as AsyncCard, Avatar, AvatarFallback, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarProps$1 as AvatarProps, type AvatarShape$1 as AvatarShape, type AvatarSize, AvatarStatus, type AvatarStatusType, Badge, type BadgeColor, type BadgeIcon, type BadgeLook, type BadgeProps, type BadgeShape, type BadgeSize, type BadgeVariant, BaseInput, type BuildDefaultFileColumnsOptions, Button, type ButtonConfig, type ButtonIcon, type ButtonLoaderPosition, type ButtonProps, type ButtonRounded, type ButtonSize, type ButtonVariant, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroupInput, type CheckboxGroupInputProps, CheckboxInput, type CheckboxInputProps, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorArrayInput, type ColorArrayInputProps, type ColorFormat, ColorPickerInput, type ColorPickerInputProps, Combobox, ComboboxInput, type ComboboxInputProps, type ComboboxOption, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type ContextMenuItem, DateInput, type DateInputProps, type DeleteDialogOptions, Dialog, type DialogActionMode, type DialogApi, DialogClose, type DialogConfig, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, type DialogHeight, DialogOverlay, type DialogPadding, DialogPortal, type DialogRenderContext, type DialogRenderer, type DialogSize, type DialogStore, DialogTitle, DialogTrigger, type DialogWidth, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicArray, type DynamicArrayProps, EmojiInput, type EmojiInputProps, type FileBrowserMode, FileImportButton, FileInput, type FileInputProps, type FileNode, Form, FormControl, FormDescription, FormField, FormInput, type FormInputProps, FormItem, FormLabel, FormMessage, type FormProps, type FormSlotClassNames, type FormVariant, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, ImageInput, type ImageInputProps, Indicator, type IndicatorHorizontal, type IndicatorOverlay, type IndicatorPosition, type IndicatorProps, type IndicatorResponsivePosition, type IndicatorSize, type IndicatorVertical, Input, type InputIcon, Label, LangInput, type LangInputProps, type LinkComponentType, MultiSelectInput, type MultiSelectInputProps, NAJM_COMPONENT_NAMES, NAlert, type NAppCommandItem, NAppShell, type NAppShellAction, type NAppShellClassNames, type NAppShellProps, type NAppShellUser, NCard as NAsyncCard, type CardClassNames as NAsyncCardClassNames, type CardProps as NAsyncCardProps, NAvatar, type NAvatarClassNames, type NAvatarProps, type AvatarShape as NAvatarShape, NBadge, type NBadgeLook, type NBadgeProps, type NBulkAction, type NBulkActionButton, type NBulkActionSelect, NBulkActionsBar, type NBulkActionsBarProps, NButton, type NButtonProps, NCard, NCardAction, type CardClassNames as NCardClassNames, NCardFooter, type CardProps as NCardProps, NCommandPalette, type NCommandPaletteProps, NConfirmDialog, type NConfirmDialogProps, NContextMenu, type NContextMenuItem, type NContextMenuProps, NDataCardShell, type NDataCardShellActions, type NDataCardShellProps, NDeleteDialog, NDeleteDialogContent, type NDeleteDialogContentProps, type NDeleteDialogProps, NDetailCard, type NDetailCardClassNames, type NDetailCardProps, NDetailItem, type NDetailItemProps, NDetailList, type NDetailListItem, type NDetailListProps, NDialog, type NDialogDirectProps, type NDialogProps, type NEditorTab, NEditorTabs, type NEditorTabsProps, NEmptyState, type NEmptyStateProps, NErrorBoundary, NErrorState, type NErrorStateProps, NFileBrowser, type NFileBrowserCardProps, type NFileBrowserProps, type NFileBrowserRenderThumbProps, NFileTypeIcon, type NFileTypeIconProps, NFilterBar, NFolderIcon, type NFolderIconProps, NForm, NFormSectionHeader, type NFormSectionHeaderProps, NIcon, type NIconProps, type NIconSource, NIndicator, NInspectorSheet, NLoadingState, type NLoadingStateProps, NMultiDialog, type NMultiDialogProps, NNavbar, NPageHeader, NPageHeaderActions, NPageHeaderFilters, type NPageHeaderProps, NPageHeaderTop, NPageLayout, type NPageLayoutProps, NPortalScopeProvider, NProgress, type NProgressProps, NRowActions, NSection, NSectionHeader, type NSectionHeaderActionsProps, type NSectionHeaderContentProps, type NSectionHeaderProps, type NSectionHeaderSubtitleProps, type NSectionHeaderTitleProps, NSectionInfo, type NSectionInfoProps, type NSectionProps, NSectionWithInfo, type NSectionWithInfoItem, type NSectionWithInfoProps, NSheet, type NSheetProps, NSidebar, NSidebarContent, type NSidebarContentProps, NSidebarFooter, type NSidebarFooterProps, NSidebarHeader, type NSidebarHeaderProps, NSidebarItem, NSidebarLogo, type NSidebarLogoProps, NSidebarMobile, type NSidebarMobileProps, NSidebarSection, type NSidebarSectionProps, NSkeleton, NSkeletonCalendar, NSkeletonChart, NSkeletonDonut, NSkeletonEventList, NSkeletonWidget, NSkeletonWidgets, NSlider, type NSliderProps, NSmartPasteDialog, type NSmartPasteDialogProps, NSpinner, type NSpinnerProps, NStatCard, type NStatCardClassNames, type NStatCardProps, NStatCardSkeleton, type NStatCardVariant, Swap as NSwap, type NSwapProps, NTable, NTableCardRoot, type NTableCardRootProps, NTableCards, type NTableClassNames, NTableContent, NTableHeader, NTableLoadingSkeleton, type NTableMenu, type NTableMenuProp, NTablePagination, type NTableProps, NTableRowSkeleton, NTableSkeleton, type NTableState, NTabs, type NTabsClassNames, type NTabsColor, type NTabsItem, type NTabsProps, type NTabsStyles, NUploader, type NUploaderItem, type NUploaderItemStatus, type NUploaderProps, NViewBody, NViewToggle, type NajmAccent, type NajmAppearance, type NajmBorderSide, type NajmComponentName, type NajmComponentRadius, type NajmComponentStyleConfig, type NajmComponentThemeConfig, type NajmDensity, type NajmDesignConfig, NajmDesignProvider, type NajmDesignProviderProps, type NajmLayoutConfig, type NajmMode, type NajmPreset, type NajmRadiusScale, NajmScroll, type NajmScrollProps, type NajmSlotStyle, type NajmThemeConfig, NajmThemeProvider, type NajmThemeProviderProps, type NajmThemeTokens, type NajmTypographyConfig, type NajmVariantStyle, NativeSelect, type NativeSelectOption, type NativeSelectProps, type NavItem, type NavItemGroup, NumberInput, type NumberInputProps, PasswordInput, type PasswordInputProps, PhoneInput, type PhoneInputProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PrefixProvider, Progress, type ProgressColor, type ProgressLabelPosition, type ProgressProps, type ProgressSize, type PushDialogOptions, RADIUS_VALUE_MAP, RadioGroup, RadioGroupInput, type RadioGroupInputProps, RadioGroupItem, type RenderSlot, RepeatingFields, type RepeatingFieldsProps, ScrollArea, type ScrollAreaProps, SearchField, SearchField as SearchInput, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectInput, type SelectInputProps, SelectItem, type SelectItemType$1 as SelectItemDataType, type SelectItemType, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, type SidebarItemProps, type SidebarProps, type SidebarWidths, SimpleTooltip, type SimpleTooltipProps, NSkeleton as Skeleton, Slider, SliderInput, type SliderInputProps, type SliderOrientation, type SliderProps, type SliderSize, type SliderVariant, type SmartPastePreview, type SpinnerVariant, StarRatingInput, type StarRatingInputProps, StatusPill, type StatusPillProps, type StatusPillTone, type StepConfig, StepIndicator, type StepMeta, StepsHeader, StepsProgress, type StorageMenuAction, type StorageSortOption, type StorageTarget, Swap, type SwapEffect, SwapIndeterminate, SwapOff, SwapOn, type SwapProps, type SwapSize, type SwapState, Switch, type SwitchColor, SwitchInput, type SwitchInputProps, type SwitchSize, TAB_COLORS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderColor, TableRow, type TableState, type TableStore, TableStoreContext, Tabs, TabsContent, TabsList, type TabsListProps, type TabsOrientation, type TabsProps, TabsTrigger, type TabsTriggerProps, type TabsVariant, TextAreaInput, type TextAreaInputProps, TextInput, type TextInputProps, Textarea, TimeInput, type TimeInputProps, Toaster, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseContextMenuResult, type UseNFormOptions, type UseStorageContextMenuOptions, type UseStorageContextMenuResult, type UserMenuAction, VariantProvider, type WizardClassNames, WizardForm, type WizardFormProps, alertVariants, avatarVariants, badgeColorVariants, badgeVariants, buildDefaultFileColumns, buttonVariants, cn, composePreset, createDialogStore, createTableStore, defineNajmDesignConfig, defineNajmThemeConfig, detectFormat, dialogVariants, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNextEditorTabValue, indicatorVariants, inputBorderClasses, parseColor, parseNajmDesignConfig, parseNajmThemeConfig, resolvePreset, resolveRadiusValue, resolveSlot, resolveVariantAlias, sidebarBorderClasses, sliderVariants, stringifyNajmDesignConfig, stringifyNajmThemeConfig, surfaceBorderClasses, swapVariants, toPickerHex, toggleVariants, tooltipContentVariants, truncateByCharacters, useClickOutside, useContextMenu, useDebouncedValue, useDelayedLoading, useDialog, useDialogStore, useDynamicPageSize, useFormField, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useNForm, useNPortalScope, useNajmAppearance, useNajmComponentStyle, useNajmDesign, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useTableStore, useVariant, useVariantPreset };
|
|
3420
|
+
export { Alert, type AlertLook, type AlertOrientation, type AlertProps, type AlertSize, type AlertTone, type AlertVariant, NCard as AsyncCard, Avatar, AvatarFallback, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarProps$1 as AvatarProps, type AvatarShape$1 as AvatarShape, type AvatarSize, AvatarStatus, type AvatarStatusType, Badge, type BadgeColor, type BadgeIcon, type BadgeLook, type BadgeProps, type BadgeShape, type BadgeSize, type BadgeVariant, BaseInput, type BuildDefaultFileColumnsOptions, Button, type ButtonConfig, type ButtonIcon, type ButtonLoaderPosition, type ButtonProps, type ButtonRounded, type ButtonSize, type ButtonVariant, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroupInput, type CheckboxGroupInputProps, CheckboxInput, type CheckboxInputProps, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorArrayInput, type ColorArrayInputProps, type ColorFormat, ColorPickerInput, type ColorPickerInputProps, Combobox, ComboboxInput, type ComboboxInputProps, type ComboboxOption, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type ContextMenuItem, DateInput, type DateInputProps, type DeleteDialogOptions, Dialog, type DialogActionMode, type DialogApi, DialogClose, type DialogConfig, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, type DialogHeight, DialogOverlay, type DialogPadding, DialogPortal, type DialogRenderContext, type DialogRenderer, type DialogSize, type DialogStore, DialogTitle, DialogTrigger, type DialogVariant, type DialogWidth, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicArray, type DynamicArrayProps, EmojiInput, type EmojiInputProps, type FileBrowserMode, FileImportButton, FileInput, type FileInputProps, type FileNode, Form, FormControl, FormDescription, FormField, FormInput, type FormInputBackground, type FormInputProps, FormItem, FormLabel, FormMessage, type FormProps, type FormSlotClassNames, type FormVariant, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, ImageInput, type ImageInputProps, Indicator, type IndicatorHorizontal, type IndicatorOverlay, type IndicatorPosition, type IndicatorProps, type IndicatorResponsivePosition, type IndicatorSize, type IndicatorVertical, Input, type InputIcon, Label, LangInput, type LangInputProps, type LinkComponentType, MultiSelectInput, type MultiSelectInputProps, NAJM_COMPONENT_NAMES, NAlert, type NAppCommandItem, NAppShell, type NAppShellAction, type NAppShellClassNames, type NAppShellProps, type NAppShellUser, NCard as NAsyncCard, type CardClassNames as NAsyncCardClassNames, type CardProps as NAsyncCardProps, NAvatar, type NAvatarClassNames, type NAvatarProps, type AvatarShape as NAvatarShape, NBadge, type NBadgeLook, type NBadgeProps, type NBulkAction, type NBulkActionButton, type NBulkActionSelect, NBulkActionsBar, type NBulkActionsBarProps, NButton, type NButtonProps, NCard, NCardAction, type CardClassNames as NCardClassNames, NCardFooter, type CardProps as NCardProps, NCommandPalette, type NCommandPaletteProps, NConfirmDialog, type NConfirmDialogProps, NContextMenu, type NContextMenuItem, type NContextMenuProps, NDataCardShell, type NDataCardShellActions, type NDataCardShellProps, NDeleteDialog, NDeleteDialogContent, type NDeleteDialogContentProps, type NDeleteDialogProps, NDetailCard, type NDetailCardClassNames, type NDetailCardProps, NDetailItem, type NDetailItemProps, NDetailList, type NDetailListItem, type NDetailListProps, NDialog, type NDialogDirectProps, type NDialogProps, type NEditorTab, NEditorTabs, type NEditorTabsProps, NEmptyState, type NEmptyStateProps, NErrorBoundary, NErrorState, type NErrorStateProps, NFileBrowser, type NFileBrowserCardProps, type NFileBrowserProps, type NFileBrowserRenderThumbProps, NFileTypeIcon, type NFileTypeIconProps, NFilterBar, NFolderIcon, type NFolderIconProps, NForm, NFormSectionHeader, type NFormSectionHeaderProps, NIcon, type NIconProps, type NIconSource, NIndicator, NInspectorSheet, NLoadingState, type NLoadingStateProps, NMultiDialog, type NMultiDialogProps, NNavbar, NPageHeader, NPageHeaderActions, NPageHeaderFilters, type NPageHeaderProps, NPageHeaderTop, NPageLayout, type NPageLayoutProps, NPortalScopeProvider, NProgress, type NProgressProps, NRowActions, NSection, NSectionHeader, type NSectionHeaderActionsProps, type NSectionHeaderContentProps, type NSectionHeaderProps, type NSectionHeaderSubtitleProps, type NSectionHeaderTitleProps, NSectionInfo, type NSectionInfoProps, type NSectionProps, NSectionWithInfo, type NSectionWithInfoItem, type NSectionWithInfoProps, NSheet, type NSheetProps, NSidebar, NSidebarContent, type NSidebarContentProps, NSidebarFooter, type NSidebarFooterProps, NSidebarHeader, type NSidebarHeaderProps, NSidebarItem, NSidebarLogo, type NSidebarLogoProps, NSidebarMobile, type NSidebarMobileProps, NSidebarSection, type NSidebarSectionProps, NSkeleton, NSkeletonCalendar, NSkeletonChart, NSkeletonDonut, NSkeletonEventList, NSkeletonWidget, NSkeletonWidgets, NSlider, type NSliderProps, NSmartPasteDialog, type NSmartPasteDialogProps, NSpinner, type NSpinnerProps, NStatCard, type NStatCardClassNames, type NStatCardProps, NStatCardSkeleton, type NStatCardVariant, Swap as NSwap, type NSwapProps, NTable, NTableCardRoot, type NTableCardRootProps, NTableCards, type NTableClassNames, NTableContent, NTableHeader, NTableLoadingSkeleton, type NTableMenu, type NTableMenuProp, NTablePagination, type NTableProps, NTableRowSkeleton, NTableSkeleton, type NTableState, NTabs, type NTabsClassNames, type NTabsColor, type NTabsItem, type NTabsProps, type NTabsStyles, NUploader, type NUploaderItem, type NUploaderItemStatus, type NUploaderProps, NViewBody, NViewToggle, type NajmAccent, type NajmAppearance, type NajmBorderSide, type NajmComponentName, type NajmComponentRadius, type NajmComponentStyleConfig, type NajmComponentThemeConfig, type NajmDensity, type NajmDesignConfig, NajmDesignProvider, type NajmDesignProviderProps, type NajmLayoutConfig, type NajmMode, type NajmPreset, type NajmRadiusScale, NajmScroll, type NajmScrollProps, type NajmSlotStyle, type NajmThemeConfig, NajmThemeProvider, type NajmThemeProviderProps, type NajmThemeTokens, type NajmTypographyConfig, type NajmVariantStyle, NativeSelect, type NativeSelectOption, type NativeSelectProps, type NavItem, type NavItemGroup, NumberInput, type NumberInputProps, PasswordInput, type PasswordInputProps, PhoneInput, type PhoneInputProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PrefixProvider, Progress, type ProgressColor, type ProgressLabelPosition, type ProgressProps, type ProgressSize, type PushDialogOptions, RADIUS_VALUE_MAP, RadioGroup, RadioGroupInput, type RadioGroupInputProps, RadioGroupItem, type RenderSlot, RepeatingFields, type RepeatingFieldsProps, ScrollArea, type ScrollAreaProps, SearchField, SearchField as SearchInput, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectInput, type SelectInputProps, SelectItem, type SelectItemType$1 as SelectItemDataType, type SelectItemType, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, type SidebarItemProps, type SidebarProps, type SidebarWidths, SimpleTooltip, type SimpleTooltipProps, NSkeleton as Skeleton, Slider, SliderInput, type SliderInputProps, type SliderOrientation, type SliderProps, type SliderSize, type SliderVariant, type SmartPastePreview, type SpinnerVariant, StarRatingInput, type StarRatingInputProps, StatusPill, type StatusPillProps, type StatusPillTone, type StepConfig, StepIndicator, type StepMeta, StepsHeader, StepsProgress, type StorageMenuAction, type StorageSortOption, type StorageTarget, Swap, type SwapEffect, SwapIndeterminate, SwapOff, SwapOn, type SwapProps, type SwapSize, type SwapState, Switch, type SwitchColor, SwitchInput, type SwitchInputProps, type SwitchSize, TAB_COLORS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderColor, TableRow, type TableState, type TableStore, TableStoreContext, Tabs, TabsContent, TabsList, type TabsListProps, type TabsOrientation, type TabsProps, TabsTrigger, type TabsTriggerProps, type TabsVariant, TextAreaInput, type TextAreaInputProps, TextInput, type TextInputProps, Textarea, TimeInput, type TimeInputProps, Toaster, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseContextMenuResult, type UseNFormOptions, type UseStorageContextMenuOptions, type UseStorageContextMenuResult, type UserMenuAction, VariantProvider, type WizardClassNames, WizardForm, type WizardFormProps, alertVariants, avatarVariants, badgeColorVariants, badgeVariants, buildDefaultFileColumns, buttonVariants, cn, composePreset, createDialogStore, createTableStore, defineNajmDesignConfig, defineNajmThemeConfig, detectFormat, dialogVariants, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNextEditorTabValue, indicatorVariants, inputBorderClasses, parseColor, parseNajmDesignConfig, parseNajmThemeConfig, resolvePreset, resolveRadiusValue, resolveSlot, resolveVariantAlias, sidebarBorderClasses, sliderVariants, stringifyNajmDesignConfig, stringifyNajmThemeConfig, surfaceBorderClasses, swapVariants, toPickerHex, toggleVariants, tooltipContentVariants, truncateByCharacters, useClickOutside, useContextMenu, useDebouncedValue, useDelayedLoading, useDialog, useDialogStore, useDynamicPageSize, useFormField, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useNForm, useNPortalScope, useNajmAppearance, useNajmComponentStyle, useNajmDesign, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useTableStore, useVariant, useVariantPreset };
|
package/dist/index.mjs
CHANGED
|
@@ -1944,14 +1944,18 @@ var IconButton = React.forwardRef(
|
|
|
1944
1944
|
active = false,
|
|
1945
1945
|
type = "button",
|
|
1946
1946
|
children,
|
|
1947
|
+
style,
|
|
1947
1948
|
...props
|
|
1948
1949
|
}, ref) => {
|
|
1950
|
+
const recipe = useNajmComponentStyle("button");
|
|
1951
|
+
const recipeRadius = resolveRadiusValue(recipe?.radius);
|
|
1949
1952
|
return /* @__PURE__ */ jsx(
|
|
1950
1953
|
"button",
|
|
1951
1954
|
{
|
|
1952
1955
|
ref,
|
|
1953
1956
|
type,
|
|
1954
1957
|
"aria-pressed": active || void 0,
|
|
1958
|
+
style: recipeRadius ? { borderRadius: recipeRadius, ...style } : style,
|
|
1955
1959
|
className: cn(
|
|
1956
1960
|
"inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md transition-colors",
|
|
1957
1961
|
"outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
@@ -2247,6 +2251,10 @@ var dialogVariants = cva(
|
|
|
2247
2251
|
"flex flex-col w-full max-w-[95vw] h-full max-h-screen",
|
|
2248
2252
|
{
|
|
2249
2253
|
variants: {
|
|
2254
|
+
variant: {
|
|
2255
|
+
default: "",
|
|
2256
|
+
window: "rounded-sm"
|
|
2257
|
+
},
|
|
2250
2258
|
size: {
|
|
2251
2259
|
sm: "lg:max-w-md",
|
|
2252
2260
|
md: "lg:max-w-lg",
|
|
@@ -2280,6 +2288,7 @@ var dialogVariants = cva(
|
|
|
2280
2288
|
}
|
|
2281
2289
|
},
|
|
2282
2290
|
defaultVariants: {
|
|
2291
|
+
variant: "default",
|
|
2283
2292
|
size: "xl",
|
|
2284
2293
|
width: "3xl",
|
|
2285
2294
|
height: "auto"
|
|
@@ -2322,29 +2331,72 @@ function shouldRenderDialogButtons(showButtons, actionMode = "auto", contentOwns
|
|
|
2322
2331
|
if (actionMode === "auto" && contentOwnsActions) return false;
|
|
2323
2332
|
return true;
|
|
2324
2333
|
}
|
|
2325
|
-
|
|
2334
|
+
var windowHeaderSpacing = {
|
|
2335
|
+
none: "px-3 py-2",
|
|
2336
|
+
sm: "-mx-3 -mt-3 px-3 py-2",
|
|
2337
|
+
md: "-mx-6 -mt-6 px-3 py-2",
|
|
2338
|
+
lg: "-mx-8 -mt-8 px-3 py-2"
|
|
2339
|
+
};
|
|
2340
|
+
function DialogChrome({
|
|
2341
|
+
pageHeader,
|
|
2342
|
+
title,
|
|
2343
|
+
description,
|
|
2344
|
+
padding,
|
|
2345
|
+
variant = "default",
|
|
2346
|
+
headerClassName,
|
|
2347
|
+
titleClassName,
|
|
2348
|
+
descriptionClassName,
|
|
2349
|
+
closeButtonClassName,
|
|
2350
|
+
contentRef,
|
|
2351
|
+
children
|
|
2352
|
+
}) {
|
|
2326
2353
|
const noTitle = !title || title.trim() === "";
|
|
2327
2354
|
const noDescription = !description || description.trim() === "";
|
|
2328
2355
|
const noHeader = noTitle && noDescription;
|
|
2329
2356
|
const flush = padding === "none";
|
|
2330
2357
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2331
2358
|
pageHeader ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2332
|
-
/* @__PURE__ */ jsx(DialogTitle, { className: "sr-only", children: pageHeader.title || title || "Dialog" }),
|
|
2333
|
-
(pageHeader.subtitle || description) && /* @__PURE__ */ jsx(DialogDescription, { className: "sr-only", children: pageHeader.subtitle || description }),
|
|
2334
|
-
/* @__PURE__ */ jsx("div", { className: "shrink-0", children: /* @__PURE__ */ jsx(
|
|
2359
|
+
/* @__PURE__ */ jsx(DialogTitle, { className: cn("sr-only", titleClassName), children: pageHeader.title || title || "Dialog" }),
|
|
2360
|
+
(pageHeader.subtitle || description) && /* @__PURE__ */ jsx(DialogDescription, { className: cn("sr-only", descriptionClassName), children: pageHeader.subtitle || description }),
|
|
2361
|
+
/* @__PURE__ */ jsx("div", { className: cn("shrink-0", headerClassName), children: /* @__PURE__ */ jsx(
|
|
2335
2362
|
NPageHeader,
|
|
2336
2363
|
{
|
|
2337
2364
|
...pageHeader,
|
|
2338
2365
|
card: false,
|
|
2339
2366
|
actions: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2340
2367
|
pageHeader.actions,
|
|
2341
|
-
/* @__PURE__ */ jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { "aria-label": "Close", variant: "ghost", children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) }) })
|
|
2368
|
+
/* @__PURE__ */ jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { "aria-label": "Close", variant: "ghost", className: closeButtonClassName, children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) }) })
|
|
2342
2369
|
] })
|
|
2343
2370
|
}
|
|
2344
2371
|
) })
|
|
2345
|
-
] }) : /* @__PURE__ */ jsxs(
|
|
2346
|
-
|
|
2347
|
-
|
|
2372
|
+
] }) : variant === "window" ? /* @__PURE__ */ jsxs(
|
|
2373
|
+
DialogHeader,
|
|
2374
|
+
{
|
|
2375
|
+
className: cn(
|
|
2376
|
+
"flex-row items-center justify-between gap-3 border-b border-border bg-secondary text-left text-secondary-foreground",
|
|
2377
|
+
windowHeaderSpacing[padding ?? "md"],
|
|
2378
|
+
headerClassName
|
|
2379
|
+
),
|
|
2380
|
+
children: [
|
|
2381
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 space-y-1", children: [
|
|
2382
|
+
/* @__PURE__ */ jsx(DialogTitle, { className: cn("truncate text-sm", noTitle && "sr-only", titleClassName), children: title || "Dialog" }),
|
|
2383
|
+
/* @__PURE__ */ jsx(DialogDescription, { className: cn("text-xs", noDescription && "sr-only", descriptionClassName), children: description })
|
|
2384
|
+
] }),
|
|
2385
|
+
/* @__PURE__ */ jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
2386
|
+
IconButton,
|
|
2387
|
+
{
|
|
2388
|
+
"aria-label": "Close",
|
|
2389
|
+
variant: "ghost",
|
|
2390
|
+
size: "sm",
|
|
2391
|
+
className: cn("border border-border bg-background text-foreground hover:bg-accent", closeButtonClassName),
|
|
2392
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-3.5 w-3.5" })
|
|
2393
|
+
}
|
|
2394
|
+
) })
|
|
2395
|
+
]
|
|
2396
|
+
}
|
|
2397
|
+
) : /* @__PURE__ */ jsxs(DialogHeader, { className: cn(noHeader && "sr-only", headerClassName), children: [
|
|
2398
|
+
/* @__PURE__ */ jsx(DialogTitle, { className: cn(noTitle && "sr-only", titleClassName), children: title }),
|
|
2399
|
+
/* @__PURE__ */ jsx(DialogDescription, { className: cn(noDescription && "sr-only", descriptionClassName), children: description })
|
|
2348
2400
|
] }),
|
|
2349
2401
|
flush ? (
|
|
2350
2402
|
// Full-bleed content owns its own layout/scrolling; no outer scroll wrapper.
|
|
@@ -2378,6 +2430,11 @@ function DialogItem({ dialog, index, store }) {
|
|
|
2378
2430
|
width,
|
|
2379
2431
|
height,
|
|
2380
2432
|
className,
|
|
2433
|
+
headerClassName,
|
|
2434
|
+
titleClassName,
|
|
2435
|
+
descriptionClassName,
|
|
2436
|
+
closeButtonClassName,
|
|
2437
|
+
variant = "default",
|
|
2381
2438
|
actionMode = "auto"
|
|
2382
2439
|
} = dialog;
|
|
2383
2440
|
const { contentOwnsActions, setContentElement } = useContentOwnsActions();
|
|
@@ -2396,9 +2453,10 @@ function DialogItem({ dialog, index, store }) {
|
|
|
2396
2453
|
DialogContent,
|
|
2397
2454
|
{
|
|
2398
2455
|
"data-dialog-id": id,
|
|
2456
|
+
"data-variant": variant,
|
|
2399
2457
|
padding,
|
|
2400
|
-
hideClose: !!pageHeader,
|
|
2401
|
-
className: cn(dialogVariants({ size, width, height }), className),
|
|
2458
|
+
hideClose: !!pageHeader || variant === "window",
|
|
2459
|
+
className: cn(dialogVariants({ variant, size, width, height }), className),
|
|
2402
2460
|
style: { zIndex: 9990 + index },
|
|
2403
2461
|
children: [
|
|
2404
2462
|
/* @__PURE__ */ jsx(
|
|
@@ -2408,6 +2466,11 @@ function DialogItem({ dialog, index, store }) {
|
|
|
2408
2466
|
title,
|
|
2409
2467
|
description,
|
|
2410
2468
|
padding,
|
|
2469
|
+
variant,
|
|
2470
|
+
headerClassName,
|
|
2471
|
+
titleClassName,
|
|
2472
|
+
descriptionClassName,
|
|
2473
|
+
closeButtonClassName,
|
|
2411
2474
|
contentRef: setContentElement,
|
|
2412
2475
|
children
|
|
2413
2476
|
}
|
|
@@ -2460,7 +2523,7 @@ var buildButtonConfig2 = (partial, defaults) => {
|
|
|
2460
2523
|
return { ...defaults, ...partial };
|
|
2461
2524
|
};
|
|
2462
2525
|
var isDirectDialogProps = (props) => {
|
|
2463
|
-
return "trigger" in props || "open" in props || "defaultOpen" in props || "onOpenChange" in props || "title" in props || "description" in props || "children" in props || "primaryButton" in props || "secondaryButton" in props || "showButtons" in props || "size" in props || "width" in props || "height" in props || "className" in props || "pageHeader" in props || "padding" in props;
|
|
2526
|
+
return "trigger" in props || "open" in props || "defaultOpen" in props || "onOpenChange" in props || "title" in props || "description" in props || "children" in props || "primaryButton" in props || "secondaryButton" in props || "showButtons" in props || "size" in props || "width" in props || "height" in props || "className" in props || "headerClassName" in props || "titleClassName" in props || "descriptionClassName" in props || "closeButtonClassName" in props || "variant" in props || "pageHeader" in props || "padding" in props;
|
|
2464
2527
|
};
|
|
2465
2528
|
function NDirectDialog({
|
|
2466
2529
|
trigger,
|
|
@@ -2479,6 +2542,11 @@ function NDirectDialog({
|
|
|
2479
2542
|
width,
|
|
2480
2543
|
height,
|
|
2481
2544
|
className,
|
|
2545
|
+
headerClassName,
|
|
2546
|
+
titleClassName,
|
|
2547
|
+
descriptionClassName,
|
|
2548
|
+
closeButtonClassName,
|
|
2549
|
+
variant = "default",
|
|
2482
2550
|
actionMode = "auto",
|
|
2483
2551
|
closeOnPrimary = true,
|
|
2484
2552
|
closeOnSecondary = true
|
|
@@ -2537,53 +2605,67 @@ function NDirectDialog({
|
|
|
2537
2605
|
};
|
|
2538
2606
|
return /* @__PURE__ */ jsxs(Dialog, { open: currentOpen, onOpenChange: setOpen, children: [
|
|
2539
2607
|
trigger ? /* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: trigger }) : null,
|
|
2540
|
-
/* @__PURE__ */ jsxs(
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2608
|
+
/* @__PURE__ */ jsxs(
|
|
2609
|
+
DialogContent,
|
|
2610
|
+
{
|
|
2611
|
+
"data-variant": variant,
|
|
2612
|
+
padding,
|
|
2613
|
+
hideClose: !!pageHeader || variant === "window",
|
|
2614
|
+
className: cn(dialogVariants({ variant, size, width, height }), className),
|
|
2615
|
+
children: [
|
|
2616
|
+
/* @__PURE__ */ jsx(
|
|
2617
|
+
DialogChrome,
|
|
2618
|
+
{
|
|
2619
|
+
pageHeader,
|
|
2620
|
+
title,
|
|
2621
|
+
description,
|
|
2622
|
+
padding,
|
|
2623
|
+
variant,
|
|
2624
|
+
headerClassName,
|
|
2625
|
+
titleClassName,
|
|
2626
|
+
descriptionClassName,
|
|
2627
|
+
closeButtonClassName,
|
|
2628
|
+
contentRef: setContentElement,
|
|
2629
|
+
children
|
|
2630
|
+
}
|
|
2631
|
+
),
|
|
2632
|
+
/* @__PURE__ */ jsx(DialogFooter, { className: cn(!renderDialogButtons && "sr-only"), children: renderDialogButtons && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2633
|
+
/* @__PURE__ */ jsx(
|
|
2634
|
+
Button,
|
|
2635
|
+
{
|
|
2636
|
+
type: resolvedSecondaryButton.form ? "submit" : "button",
|
|
2637
|
+
"data-button-type": "secondary",
|
|
2638
|
+
onClick: resolvedSecondaryButton.form ? void 0 : handleSecondary,
|
|
2639
|
+
disabled: resolvedSecondaryButton.disabled || resolvedSecondaryButton.loading || false,
|
|
2640
|
+
variant: resolvedSecondaryButton.variant || "outline",
|
|
2641
|
+
leftIcon: resolvedSecondaryButton.icon,
|
|
2642
|
+
loading: resolvedSecondaryButton.loading,
|
|
2643
|
+
loadingText: resolvedSecondaryButton.loadingText,
|
|
2644
|
+
form: resolvedSecondaryButton.form,
|
|
2645
|
+
className: "w-auto",
|
|
2646
|
+
children: resolvedSecondaryButton.text
|
|
2647
|
+
}
|
|
2648
|
+
),
|
|
2649
|
+
/* @__PURE__ */ jsx(
|
|
2650
|
+
Button,
|
|
2651
|
+
{
|
|
2652
|
+
type: resolvedPrimaryButton.form ? "submit" : "button",
|
|
2653
|
+
"data-button-type": "primary",
|
|
2654
|
+
onClick: resolvedPrimaryButton.form ? void 0 : handlePrimary,
|
|
2655
|
+
disabled: resolvedPrimaryButton.disabled || isPrimaryLoading || false,
|
|
2656
|
+
variant: resolvedPrimaryButton.variant || "default",
|
|
2657
|
+
leftIcon: resolvedPrimaryButton.icon,
|
|
2658
|
+
loading: isPrimaryLoading,
|
|
2659
|
+
loadingText: resolvedPrimaryButton.loadingText,
|
|
2660
|
+
form: resolvedPrimaryButton.form,
|
|
2661
|
+
className: "w-auto",
|
|
2662
|
+
children: resolvedPrimaryButton.text
|
|
2663
|
+
}
|
|
2664
|
+
)
|
|
2665
|
+
] }) })
|
|
2666
|
+
]
|
|
2667
|
+
}
|
|
2668
|
+
)
|
|
2587
2669
|
] });
|
|
2588
2670
|
}
|
|
2589
2671
|
function NDialog(props) {
|
|
@@ -6073,7 +6155,7 @@ function renderItems(items) {
|
|
|
6073
6155
|
return /* @__PURE__ */ jsx(SelectItem, { value, children: label }, value);
|
|
6074
6156
|
});
|
|
6075
6157
|
}
|
|
6076
|
-
var SelectInput = ({ placeholder = "", value, onChange, icon, showIcon = true, iconColor, items, className = "", variant = "default", status = "default", bordered, borderColor, disabled = false }) => {
|
|
6158
|
+
var SelectInput = ({ placeholder = "", value, onChange, icon, showIcon = true, iconColor, items, className = "", dropdownClassName, variant = "default", status = "default", bordered, borderColor, disabled = false }) => {
|
|
6077
6159
|
const shouldDisplayIcon = Boolean(icon) && showIcon && !value;
|
|
6078
6160
|
const iconProps = getIconColorProps(iconColor, "h-4 w-4");
|
|
6079
6161
|
const displayLabel = value ? (() => {
|
|
@@ -6095,7 +6177,7 @@ var SelectInput = ({ placeholder = "", value, onChange, icon, showIcon = true, i
|
|
|
6095
6177
|
"aria-label": placeholder || "Select"
|
|
6096
6178
|
}
|
|
6097
6179
|
),
|
|
6098
|
-
/* @__PURE__ */ jsx(SelectContent, { children: renderItems(items) })
|
|
6180
|
+
/* @__PURE__ */ jsx(SelectContent, { className: dropdownClassName, children: renderItems(items) })
|
|
6099
6181
|
] }, String(value))
|
|
6100
6182
|
] });
|
|
6101
6183
|
};
|
|
@@ -7622,6 +7704,13 @@ function NFormSectionHeader({
|
|
|
7622
7704
|
var PrefixContext = createContext(void 0);
|
|
7623
7705
|
var PrefixProvider = ({ prefix, children }) => /* @__PURE__ */ jsx(PrefixContext.Provider, { value: prefix, children });
|
|
7624
7706
|
var usePrefix = () => useContext(PrefixContext);
|
|
7707
|
+
var inputBackgroundClasses = {
|
|
7708
|
+
card: "!bg-card [&>div:first-child]:!bg-card",
|
|
7709
|
+
background: "!bg-background [&>div:first-child]:!bg-background",
|
|
7710
|
+
secondary: "!bg-secondary [&>div:first-child]:!bg-secondary",
|
|
7711
|
+
muted: "!bg-muted [&>div:first-child]:!bg-muted",
|
|
7712
|
+
transparent: "!bg-transparent [&>div:first-child]:!bg-transparent"
|
|
7713
|
+
};
|
|
7625
7714
|
var Inputs = {
|
|
7626
7715
|
switch: SwitchInput,
|
|
7627
7716
|
checkbox: CheckboxInput,
|
|
@@ -7645,7 +7734,7 @@ var Inputs = {
|
|
|
7645
7734
|
time: TimeInput,
|
|
7646
7735
|
slider: SliderInput
|
|
7647
7736
|
};
|
|
7648
|
-
var FormInput = ({ name, type, formLabel, formDescription, required = false, disabled = false, readOnly = false, hidden = false, icon, iconColor, classNames, ...rest }) => {
|
|
7737
|
+
var FormInput = ({ name, type, formLabel, formDescription, required = false, disabled = false, readOnly = false, hidden = false, icon, iconColor, classNames, background, ...rest }) => {
|
|
7649
7738
|
const InputComponent = Inputs[type];
|
|
7650
7739
|
const { control } = useFormContext();
|
|
7651
7740
|
const { className, onChange: consumerOnChange, ...inputRest } = rest;
|
|
@@ -7665,7 +7754,7 @@ var FormInput = ({ name, type, formLabel, formDescription, required = false, dis
|
|
|
7665
7754
|
const slot = {
|
|
7666
7755
|
item: cn(preset.item, classNames?.item),
|
|
7667
7756
|
label: cn(preset.label, classNames?.label),
|
|
7668
|
-
input: cn(presetInput, classNames?.input, className),
|
|
7757
|
+
input: cn(presetInput, background && inputBackgroundClasses[background], classNames?.input, className),
|
|
7669
7758
|
description: cn(preset.description, classNames?.description),
|
|
7670
7759
|
error: cn(preset.error, classNames?.error)
|
|
7671
7760
|
};
|