najm-kit 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.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,8 @@ interface DialogConfig {
543
544
  width?: DialogWidth;
544
545
  height?: DialogHeight;
545
546
  className?: string;
547
+ /** Visual treatment for the dialog chrome. `window` adds a compact title bar with an inline bordered close button. */
548
+ variant?: DialogVariant;
546
549
  actionMode?: DialogActionMode;
547
550
  render?: DialogRenderer;
548
551
  }
@@ -566,6 +569,8 @@ interface PushDialogOptions {
566
569
  width?: DialogWidth;
567
570
  height?: DialogHeight;
568
571
  className?: string;
572
+ /** Visual treatment for the dialog chrome. `window` adds a compact title bar with an inline bordered close button. */
573
+ variant?: DialogVariant;
569
574
  /**
570
575
  * Controls which layer owns action buttons.
571
576
  * - auto: hide dialog buttons when content declares its own actions
@@ -620,6 +625,7 @@ type DialogStore = ReturnType<typeof createDialogStore>;
620
625
  declare function useDialogStore(): DialogStore;
621
626
 
622
627
  declare const dialogVariants: (props?: {
628
+ variant?: "default" | "window";
623
629
  size?: "sm" | "md" | "lg" | "xl" | "full" | "xxl";
624
630
  width?: "auto" | "sm" | "md" | "lg" | "xl" | "full" | "xxl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl";
625
631
  height?: "auto" | "sm" | "md" | "lg" | "xl" | "full" | "xxl";
@@ -3390,4 +3396,4 @@ interface InspectorSheetProps {
3390
3396
  }
3391
3397
  declare function NInspectorSheet({ open, onClose, title, children }: InspectorSheetProps): react_jsx_runtime.JSX.Element;
3392
3398
 
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 };
3399
+ 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 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,7 +2331,13 @@ function shouldRenderDialogButtons(showButtons, actionMode = "auto", contentOwns
2322
2331
  if (actionMode === "auto" && contentOwnsActions) return false;
2323
2332
  return true;
2324
2333
  }
2325
- function DialogChrome({ pageHeader, title, description, padding, contentRef, children }) {
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({ pageHeader, title, description, padding, variant = "default", contentRef, children }) {
2326
2341
  const noTitle = !title || title.trim() === "";
2327
2342
  const noDescription = !description || description.trim() === "";
2328
2343
  const noHeader = noTitle && noDescription;
@@ -2342,7 +2357,31 @@ function DialogChrome({ pageHeader, title, description, padding, contentRef, chi
2342
2357
  ] })
2343
2358
  }
2344
2359
  ) })
2345
- ] }) : /* @__PURE__ */ jsxs(DialogHeader, { className: cn(noHeader && "sr-only"), children: [
2360
+ ] }) : variant === "window" ? /* @__PURE__ */ jsxs(
2361
+ DialogHeader,
2362
+ {
2363
+ className: cn(
2364
+ "flex-row items-center justify-between gap-3 border-b border-border bg-secondary text-left text-secondary-foreground",
2365
+ windowHeaderSpacing[padding ?? "md"]
2366
+ ),
2367
+ children: [
2368
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 space-y-1", children: [
2369
+ /* @__PURE__ */ jsx(DialogTitle, { className: cn("truncate text-sm", noTitle && "sr-only"), children: title || "Dialog" }),
2370
+ /* @__PURE__ */ jsx(DialogDescription, { className: cn("text-xs", noDescription && "sr-only"), children: description })
2371
+ ] }),
2372
+ /* @__PURE__ */ jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx(
2373
+ IconButton,
2374
+ {
2375
+ "aria-label": "Close",
2376
+ variant: "ghost",
2377
+ size: "sm",
2378
+ className: "border border-border bg-background text-foreground hover:bg-accent",
2379
+ children: /* @__PURE__ */ jsx(X, { className: "h-3.5 w-3.5" })
2380
+ }
2381
+ ) })
2382
+ ]
2383
+ }
2384
+ ) : /* @__PURE__ */ jsxs(DialogHeader, { className: cn(noHeader && "sr-only"), children: [
2346
2385
  /* @__PURE__ */ jsx(DialogTitle, { className: cn(noTitle && "sr-only"), children: title }),
2347
2386
  /* @__PURE__ */ jsx(DialogDescription, { className: cn(noDescription && "sr-only"), children: description })
2348
2387
  ] }),
@@ -2378,6 +2417,7 @@ function DialogItem({ dialog, index, store }) {
2378
2417
  width,
2379
2418
  height,
2380
2419
  className,
2420
+ variant = "default",
2381
2421
  actionMode = "auto"
2382
2422
  } = dialog;
2383
2423
  const { contentOwnsActions, setContentElement } = useContentOwnsActions();
@@ -2396,9 +2436,10 @@ function DialogItem({ dialog, index, store }) {
2396
2436
  DialogContent,
2397
2437
  {
2398
2438
  "data-dialog-id": id,
2439
+ "data-variant": variant,
2399
2440
  padding,
2400
- hideClose: !!pageHeader,
2401
- className: cn(dialogVariants({ size, width, height }), className),
2441
+ hideClose: !!pageHeader || variant === "window",
2442
+ className: cn(dialogVariants({ variant, size, width, height }), className),
2402
2443
  style: { zIndex: 9990 + index },
2403
2444
  children: [
2404
2445
  /* @__PURE__ */ jsx(
@@ -2408,6 +2449,7 @@ function DialogItem({ dialog, index, store }) {
2408
2449
  title,
2409
2450
  description,
2410
2451
  padding,
2452
+ variant,
2411
2453
  contentRef: setContentElement,
2412
2454
  children
2413
2455
  }
@@ -2460,7 +2502,7 @@ var buildButtonConfig2 = (partial, defaults) => {
2460
2502
  return { ...defaults, ...partial };
2461
2503
  };
2462
2504
  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;
2505
+ 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 || "variant" in props || "pageHeader" in props || "padding" in props;
2464
2506
  };
2465
2507
  function NDirectDialog({
2466
2508
  trigger,
@@ -2479,6 +2521,7 @@ function NDirectDialog({
2479
2521
  width,
2480
2522
  height,
2481
2523
  className,
2524
+ variant = "default",
2482
2525
  actionMode = "auto",
2483
2526
  closeOnPrimary = true,
2484
2527
  closeOnSecondary = true
@@ -2537,53 +2580,63 @@ function NDirectDialog({
2537
2580
  };
2538
2581
  return /* @__PURE__ */ jsxs(Dialog, { open: currentOpen, onOpenChange: setOpen, children: [
2539
2582
  trigger ? /* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: trigger }) : null,
2540
- /* @__PURE__ */ jsxs(DialogContent, { padding, hideClose: !!pageHeader, className: cn(dialogVariants({ size, width, height }), className), children: [
2541
- /* @__PURE__ */ jsx(
2542
- DialogChrome,
2543
- {
2544
- pageHeader,
2545
- title,
2546
- description,
2547
- padding,
2548
- contentRef: setContentElement,
2549
- children
2550
- }
2551
- ),
2552
- /* @__PURE__ */ jsx(DialogFooter, { className: cn(!renderDialogButtons && "sr-only"), children: renderDialogButtons && /* @__PURE__ */ jsxs(Fragment, { children: [
2553
- /* @__PURE__ */ jsx(
2554
- Button,
2555
- {
2556
- type: resolvedSecondaryButton.form ? "submit" : "button",
2557
- "data-button-type": "secondary",
2558
- onClick: resolvedSecondaryButton.form ? void 0 : handleSecondary,
2559
- disabled: resolvedSecondaryButton.disabled || resolvedSecondaryButton.loading || false,
2560
- variant: resolvedSecondaryButton.variant || "outline",
2561
- leftIcon: resolvedSecondaryButton.icon,
2562
- loading: resolvedSecondaryButton.loading,
2563
- loadingText: resolvedSecondaryButton.loadingText,
2564
- form: resolvedSecondaryButton.form,
2565
- className: "w-auto",
2566
- children: resolvedSecondaryButton.text
2567
- }
2568
- ),
2569
- /* @__PURE__ */ jsx(
2570
- Button,
2571
- {
2572
- type: resolvedPrimaryButton.form ? "submit" : "button",
2573
- "data-button-type": "primary",
2574
- onClick: resolvedPrimaryButton.form ? void 0 : handlePrimary,
2575
- disabled: resolvedPrimaryButton.disabled || isPrimaryLoading || false,
2576
- variant: resolvedPrimaryButton.variant || "default",
2577
- leftIcon: resolvedPrimaryButton.icon,
2578
- loading: isPrimaryLoading,
2579
- loadingText: resolvedPrimaryButton.loadingText,
2580
- form: resolvedPrimaryButton.form,
2581
- className: "w-auto",
2582
- children: resolvedPrimaryButton.text
2583
- }
2584
- )
2585
- ] }) })
2586
- ] })
2583
+ /* @__PURE__ */ jsxs(
2584
+ DialogContent,
2585
+ {
2586
+ "data-variant": variant,
2587
+ padding,
2588
+ hideClose: !!pageHeader || variant === "window",
2589
+ className: cn(dialogVariants({ variant, size, width, height }), className),
2590
+ children: [
2591
+ /* @__PURE__ */ jsx(
2592
+ DialogChrome,
2593
+ {
2594
+ pageHeader,
2595
+ title,
2596
+ description,
2597
+ padding,
2598
+ variant,
2599
+ contentRef: setContentElement,
2600
+ children
2601
+ }
2602
+ ),
2603
+ /* @__PURE__ */ jsx(DialogFooter, { className: cn(!renderDialogButtons && "sr-only"), children: renderDialogButtons && /* @__PURE__ */ jsxs(Fragment, { children: [
2604
+ /* @__PURE__ */ jsx(
2605
+ Button,
2606
+ {
2607
+ type: resolvedSecondaryButton.form ? "submit" : "button",
2608
+ "data-button-type": "secondary",
2609
+ onClick: resolvedSecondaryButton.form ? void 0 : handleSecondary,
2610
+ disabled: resolvedSecondaryButton.disabled || resolvedSecondaryButton.loading || false,
2611
+ variant: resolvedSecondaryButton.variant || "outline",
2612
+ leftIcon: resolvedSecondaryButton.icon,
2613
+ loading: resolvedSecondaryButton.loading,
2614
+ loadingText: resolvedSecondaryButton.loadingText,
2615
+ form: resolvedSecondaryButton.form,
2616
+ className: "w-auto",
2617
+ children: resolvedSecondaryButton.text
2618
+ }
2619
+ ),
2620
+ /* @__PURE__ */ jsx(
2621
+ Button,
2622
+ {
2623
+ type: resolvedPrimaryButton.form ? "submit" : "button",
2624
+ "data-button-type": "primary",
2625
+ onClick: resolvedPrimaryButton.form ? void 0 : handlePrimary,
2626
+ disabled: resolvedPrimaryButton.disabled || isPrimaryLoading || false,
2627
+ variant: resolvedPrimaryButton.variant || "default",
2628
+ leftIcon: resolvedPrimaryButton.icon,
2629
+ loading: isPrimaryLoading,
2630
+ loadingText: resolvedPrimaryButton.loadingText,
2631
+ form: resolvedPrimaryButton.form,
2632
+ className: "w-auto",
2633
+ children: resolvedPrimaryButton.text
2634
+ }
2635
+ )
2636
+ ] }) })
2637
+ ]
2638
+ }
2639
+ )
2587
2640
  ] });
2588
2641
  }
2589
2642
  function NDialog(props) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "najm-kit",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Reusable React UI component package for Najm framework",