najm-kit 2.1.22 → 2.1.24

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
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
- import React__default, { RefObject, ComponentType, ReactNode, InputHTMLAttributes, Ref, CSSProperties, MouseEvent, MouseEventHandler } from 'react';
3
+ import React__default, { RefObject, ReactNode, ComponentType, InputHTMLAttributes, Ref, CSSProperties, MouseEvent, MouseEventHandler } from 'react';
4
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
5
5
  import { VariantProps } from 'class-variance-authority';
6
6
  import * as LabelPrimitive from '@radix-ui/react-label';
@@ -1541,6 +1541,49 @@ interface UsageProps extends BaseProps$1 {
1541
1541
  type NStatCardProps = DefaultProps | UsageProps | CompactProps;
1542
1542
  declare function NStatCard(props: NStatCardProps): react_jsx_runtime.JSX.Element;
1543
1543
 
1544
+ type NDonutCardVariant = "compact" | "default" | "horizontal";
1545
+ type NDonutCardLegendMarker = "dot" | "icon" | "none";
1546
+ interface NDonutCardItem {
1547
+ id: string;
1548
+ label: React__default.ReactNode;
1549
+ value: number;
1550
+ color: string;
1551
+ icon?: NIconSource;
1552
+ }
1553
+ interface NDonutCardClassNames {
1554
+ root?: string;
1555
+ content?: string;
1556
+ ring?: string;
1557
+ center?: string;
1558
+ legend?: string;
1559
+ legendItem?: string;
1560
+ legendMarker?: string;
1561
+ legendLabel?: string;
1562
+ legendValue?: string;
1563
+ empty?: string;
1564
+ footer?: string;
1565
+ }
1566
+ interface NDonutCardProps {
1567
+ title: React__default.ReactNode;
1568
+ ariaLabel?: string;
1569
+ icon?: NIconSource;
1570
+ iconColor?: string;
1571
+ items: readonly NDonutCardItem[];
1572
+ valueFormatter: (value: number) => React__default.ReactNode;
1573
+ centerValueFormatter?: (value: number) => React__default.ReactNode;
1574
+ centerUnit?: React__default.ReactNode;
1575
+ totalLabel?: React__default.ReactNode;
1576
+ centerIcon?: NIconSource;
1577
+ emptyLabel?: React__default.ReactNode;
1578
+ footer?: React__default.ReactNode;
1579
+ variant?: NDonutCardVariant;
1580
+ legendMarker?: NDonutCardLegendMarker;
1581
+ percentageFormatter?: (ratio: number) => React__default.ReactNode;
1582
+ className?: string;
1583
+ classNames?: NDonutCardClassNames;
1584
+ }
1585
+ declare function NDonutCard({ title, ariaLabel, icon, iconColor, items, valueFormatter, centerValueFormatter, centerUnit, totalLabel, centerIcon, emptyLabel, footer, variant, legendMarker, percentageFormatter, className, classNames, }: NDonutCardProps): react_jsx_runtime.JSX.Element;
1586
+
1544
1587
  interface NDetailCardClassNames {
1545
1588
  root?: string;
1546
1589
  header?: string;
@@ -3560,4 +3603,4 @@ interface NGridItemProps extends Omit<React$1.AllHTMLAttributes<HTMLDivElement>,
3560
3603
  declare function NGrid({ as: Comp, children, cols, smCols, mdCols, lgCols, xlCols, gap, className, style, ...props }: NGridProps): react_jsx_runtime.JSX.Element;
3561
3604
  declare function NGridItem({ children, span, smSpan, mdSpan, lgSpan, xlSpan, className, ...props }: NGridItemProps): react_jsx_runtime.JSX.Element;
3562
3605
 
3563
- 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, type NCardDensity, NCardFooter, NCardInfo, type NCardInfoProps, NCardMedia, type NCardMediaAspect, type NCardMediaPlacement, type NCardMediaProps, type NCardMediaSize, type NCardMediaVariant, type CardProps as NCardProps, NCardSection, type NCardSectionProps, type NCardSectionSurface, 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 NDialogActionProps, NDialogDescription, type NDialogDescriptionProps, type NDialogDirectProps, NDialogHeader, type NDialogHeaderProps, NDialogPrimaryButton, type NDialogProps, NDialogSecondaryButton, 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, NGrid, type NGridCols, NGridItem, type NGridItemProps, type NGridProps, type NGridSpan, NIcon, type NIconProps, type NIconSource, NIndicator, NInspectorSheet, NLoadingState, type NLoadingStateProps, NMultiDialog, type NMultiDialogProps, NNavbar, NPageHeader, NPageHeaderActions, type NPageHeaderBreakpoint, NPageHeaderCompactActions, 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, type NajmResponsiveBreakpoint, type NajmResponsiveValue, 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 SidebarWidth, 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 };
3606
+ 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, type NCardDensity, NCardFooter, NCardInfo, type NCardInfoProps, NCardMedia, type NCardMediaAspect, type NCardMediaPlacement, type NCardMediaProps, type NCardMediaSize, type NCardMediaVariant, type CardProps as NCardProps, NCardSection, type NCardSectionProps, type NCardSectionSurface, 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 NDialogActionProps, NDialogDescription, type NDialogDescriptionProps, type NDialogDirectProps, NDialogHeader, type NDialogHeaderProps, NDialogPrimaryButton, type NDialogProps, NDialogSecondaryButton, NDonutCard, type NDonutCardClassNames, type NDonutCardItem, type NDonutCardLegendMarker, type NDonutCardProps, type NDonutCardVariant, 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, NGrid, type NGridCols, NGridItem, type NGridItemProps, type NGridProps, type NGridSpan, NIcon, type NIconProps, type NIconSource, NIndicator, NInspectorSheet, NLoadingState, type NLoadingStateProps, NMultiDialog, type NMultiDialogProps, NNavbar, NPageHeader, NPageHeaderActions, type NPageHeaderBreakpoint, NPageHeaderCompactActions, 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, type NajmResponsiveBreakpoint, type NajmResponsiveValue, 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 SidebarWidth, 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
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
- import React__default, { createContext, useContext, useCallback, useEffect, useState, useRef, useLayoutEffect, useMemo } from 'react';
2
+ import React__default, { createContext, useContext, useCallback, useEffect, useState, useRef, useMemo, useLayoutEffect } from 'react';
3
3
  import { Slot } from '@radix-ui/react-slot';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import * as LucideIcons from 'lucide-react';
6
- import { ChevronDown, AlertTriangle, RefreshCw, LoaderCircleIcon, X, XIcon, Menu, Search, ChevronRightIcon, CheckIcon, CircleIcon, ChevronDownIcon, ChevronUpIcon, ChevronLeftIcon, SearchIcon, Table as Table$1, FileJson, ChevronRight, CheckSquare, FilePlus, FolderPlus, Trash2, Share2, Move, ClipboardPaste, Copy, Scissors, Pencil, Download, Eye, ArrowUpDown, Loader2, ChevronUp, Folder, EyeOff, ChevronsUpDown, Check, Calendar as Calendar$1, FileUp, UploadCloud, CheckCircle2, AlertCircle, Star, Globe, Clock, Upload, Plus, MoreVertical, Edit, ChevronsLeft, ChevronLeft, ChevronsRight, Merge, PanelLeftOpen, PanelLeftClose, LogOut, Image, ArrowUp, ArrowDown, LoaderPinwheelIcon, LoaderIcon, ArrowUpRight, ArrowDownRight, SlidersHorizontal, Columns3, Settings, Filter, SearchX, Inbox, List, LayoutGrid, Code, FolderOpen } from 'lucide-react';
6
+ import { ChevronDown, AlertTriangle, RefreshCw, LoaderCircleIcon, X, XIcon, Menu, Search, ChevronRightIcon, CheckIcon, CircleIcon, ChevronDownIcon, ChevronUpIcon, ChevronLeftIcon, SearchIcon, Table as Table$1, FileJson, ChevronRight, ArrowUpDown, Loader2, ChevronUp, Folder, Eye, EyeOff, ChevronsUpDown, Check, Calendar as Calendar$1, FileUp, UploadCloud, CheckCircle2, AlertCircle, Star, Globe, Clock, Upload, Plus, Trash2, MoreVertical, Edit, ChevronsLeft, ChevronLeft, ChevronsRight, Pencil, Merge, PanelLeftOpen, PanelLeftClose, LogOut, Image, ArrowUp, ArrowDown, CheckSquare, FilePlus, FolderPlus, Share2, Move, ClipboardPaste, Copy, Scissors, Download, LoaderPinwheelIcon, LoaderIcon, ArrowUpRight, ArrowDownRight, SlidersHorizontal, Columns3, Settings, Filter, SearchX, Inbox, List, LayoutGrid, Code, FolderOpen } from 'lucide-react';
7
7
  import { cva } from 'class-variance-authority';
8
8
  import { clsx } from 'clsx';
9
9
  import { twMerge } from 'tailwind-merge';
@@ -5734,6 +5734,334 @@ function NStatCard(props) {
5734
5734
  if (props.variant === "compact") return /* @__PURE__ */ jsx(CompactCard, { ...props });
5735
5735
  return /* @__PURE__ */ jsx(DefaultCard, { ...props });
5736
5736
  }
5737
+ var SIZE = {
5738
+ compact: { ring: 96, center: 72 },
5739
+ default: { ring: 144, center: 112 },
5740
+ horizontal: { ring: 128, center: 92 }
5741
+ };
5742
+ function normalizeValue(v) {
5743
+ if (!Number.isFinite(v) || v <= 0) return 0;
5744
+ return v;
5745
+ }
5746
+ function buildConicGradient(items, total) {
5747
+ if (total <= 0) return void 0;
5748
+ let running = 0;
5749
+ const stops = [];
5750
+ for (const item of items) {
5751
+ const v = normalizeValue(item.value);
5752
+ if (v <= 0) continue;
5753
+ const pct = v / total;
5754
+ stops.push(`${item.color} ${running}turn ${running + pct}turn`);
5755
+ running += pct;
5756
+ }
5757
+ if (stops.length === 0) return void 0;
5758
+ return `conic-gradient(${stops.join(",")})`;
5759
+ }
5760
+ function Marker({ color }) {
5761
+ return /* @__PURE__ */ jsx(
5762
+ "span",
5763
+ {
5764
+ className: "block h-2.5 w-2.5 shrink-0 rounded-full",
5765
+ style: { backgroundColor: color },
5766
+ "aria-hidden": "true"
5767
+ }
5768
+ );
5769
+ }
5770
+ function LegendMarker({
5771
+ className,
5772
+ color,
5773
+ icon,
5774
+ mode
5775
+ }) {
5776
+ if (mode === "none") return null;
5777
+ if (mode === "icon" && icon) {
5778
+ return /* @__PURE__ */ jsx(
5779
+ "span",
5780
+ {
5781
+ "data-slot": "donut-legend-marker",
5782
+ className: cn("flex h-3.5 w-3.5 shrink-0 items-center justify-center", className),
5783
+ style: { color },
5784
+ "aria-hidden": "true",
5785
+ children: /* @__PURE__ */ jsx(NIcon, { icon, className: "h-3.5 w-3.5" })
5786
+ }
5787
+ );
5788
+ }
5789
+ return /* @__PURE__ */ jsx(
5790
+ "span",
5791
+ {
5792
+ "data-slot": "donut-legend-marker",
5793
+ className,
5794
+ "aria-hidden": "true",
5795
+ children: /* @__PURE__ */ jsx(Marker, { color })
5796
+ }
5797
+ );
5798
+ }
5799
+ function NDonutCard({
5800
+ title,
5801
+ ariaLabel,
5802
+ icon,
5803
+ iconColor,
5804
+ items,
5805
+ valueFormatter,
5806
+ centerValueFormatter,
5807
+ centerUnit,
5808
+ totalLabel,
5809
+ centerIcon,
5810
+ emptyLabel,
5811
+ footer,
5812
+ variant = "default",
5813
+ legendMarker = "dot",
5814
+ percentageFormatter,
5815
+ className,
5816
+ classNames
5817
+ }) {
5818
+ const computedTotal = useMemo(
5819
+ () => items.reduce((sum, item) => sum + normalizeValue(item.value), 0),
5820
+ [items]
5821
+ );
5822
+ const isZero = computedTotal <= 0;
5823
+ const gradient = useMemo(
5824
+ () => buildConicGradient(items, computedTotal),
5825
+ [items, computedTotal]
5826
+ );
5827
+ const normalized = useMemo(
5828
+ () => items.map((item) => ({
5829
+ ...item,
5830
+ value: normalizeValue(item.value),
5831
+ ratio: computedTotal > 0 ? normalizeValue(item.value) / computedTotal : 0
5832
+ })),
5833
+ [items, computedTotal]
5834
+ );
5835
+ const sz = SIZE[variant];
5836
+ const isTitleString = typeof title === "string";
5837
+ const accessibleLabel = isTitleString ? title : ariaLabel;
5838
+ const isCompact = variant === "compact";
5839
+ const isHorizontal = variant === "horizontal";
5840
+ const ringStyle = {
5841
+ width: sz.ring,
5842
+ height: sz.ring
5843
+ };
5844
+ if (gradient) ringStyle.background = gradient;
5845
+ const centerStyle = {
5846
+ width: sz.center,
5847
+ height: sz.center
5848
+ };
5849
+ return /* @__PURE__ */ jsxs(
5850
+ NCard,
5851
+ {
5852
+ title,
5853
+ icon,
5854
+ iconColor,
5855
+ bordered: true,
5856
+ className: cn(className, classNames?.root),
5857
+ classNames: { content: "@container p-0" },
5858
+ children: [
5859
+ /* @__PURE__ */ jsxs(
5860
+ "div",
5861
+ {
5862
+ "data-slot": "donut-card",
5863
+ "data-variant": variant,
5864
+ role: "group",
5865
+ "aria-label": accessibleLabel,
5866
+ className: cn(
5867
+ isHorizontal ? "grid grid-cols-1 justify-items-center gap-4 p-2 lg:p-3 xl:p-4 2xl:p-5 @min-[16rem]:grid-cols-[auto_minmax(0,1fr)] @min-[16rem]:items-center @min-[16rem]:justify-items-stretch @min-[16rem]:gap-5" : cn(
5868
+ "flex flex-col items-center p-2 lg:p-3 xl:p-4 2xl:p-5",
5869
+ isCompact ? "gap-2" : "gap-4"
5870
+ ),
5871
+ classNames?.content
5872
+ ),
5873
+ children: [
5874
+ /* @__PURE__ */ jsxs(
5875
+ "div",
5876
+ {
5877
+ className: cn("flex flex-col items-center gap-2", isHorizontal && "shrink-0"),
5878
+ children: [
5879
+ /* @__PURE__ */ jsxs(
5880
+ "div",
5881
+ {
5882
+ "data-slot": "donut-ring",
5883
+ className: cn(
5884
+ "relative shrink-0 rounded-full flex items-center justify-center",
5885
+ !gradient && "bg-muted",
5886
+ classNames?.ring
5887
+ ),
5888
+ style: ringStyle,
5889
+ "aria-hidden": "true",
5890
+ children: [
5891
+ /* @__PURE__ */ jsx(
5892
+ "div",
5893
+ {
5894
+ "data-slot": "donut-center",
5895
+ className: cn(
5896
+ "absolute flex flex-col items-center justify-center rounded-full bg-card",
5897
+ classNames?.center
5898
+ ),
5899
+ style: centerStyle
5900
+ }
5901
+ ),
5902
+ /* @__PURE__ */ jsx(
5903
+ "div",
5904
+ {
5905
+ "data-slot": "donut-center-content",
5906
+ className: cn(
5907
+ "relative z-10 flex max-w-[88%] flex-col items-center justify-center px-1 text-center",
5908
+ isCompact ? "gap-0" : "gap-0.5"
5909
+ ),
5910
+ children: centerIcon ? /* @__PURE__ */ jsx(NIcon, { icon: centerIcon, className: "h-7 w-7 text-muted-foreground" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
5911
+ /* @__PURE__ */ jsx(
5912
+ "span",
5913
+ {
5914
+ "data-slot": "donut-center-value",
5915
+ className: cn(
5916
+ "font-bold tabular-nums text-foreground leading-none break-words",
5917
+ isCompact ? "text-xs" : "text-base",
5918
+ isHorizontal && "text-sm"
5919
+ ),
5920
+ children: (centerValueFormatter ?? valueFormatter)(computedTotal)
5921
+ }
5922
+ ),
5923
+ centerUnit ? /* @__PURE__ */ jsx(
5924
+ "span",
5925
+ {
5926
+ "data-slot": "donut-center-unit",
5927
+ className: cn(
5928
+ "font-semibold uppercase leading-none text-foreground",
5929
+ isCompact ? "mt-0.5 text-[8px]" : "mt-1 text-[9px]"
5930
+ ),
5931
+ children: centerUnit
5932
+ }
5933
+ ) : null,
5934
+ totalLabel ? /* @__PURE__ */ jsx(
5935
+ "span",
5936
+ {
5937
+ "data-slot": "donut-center-label",
5938
+ className: cn(
5939
+ "text-muted-foreground leading-tight break-words",
5940
+ isCompact ? "mt-0.5 text-[8px]" : "mt-0.5 text-[10px]"
5941
+ ),
5942
+ children: totalLabel
5943
+ }
5944
+ ) : null
5945
+ ] })
5946
+ }
5947
+ )
5948
+ ]
5949
+ }
5950
+ ),
5951
+ isZero && emptyLabel ? /* @__PURE__ */ jsx(
5952
+ "p",
5953
+ {
5954
+ "data-slot": "donut-empty",
5955
+ className: cn("text-xs text-muted-foreground text-center", classNames?.empty),
5956
+ children: emptyLabel
5957
+ }
5958
+ ) : null
5959
+ ]
5960
+ }
5961
+ ),
5962
+ /* @__PURE__ */ jsx(
5963
+ "div",
5964
+ {
5965
+ "data-slot": "donut-legend",
5966
+ className: cn(
5967
+ "flex flex-col gap-1.5 w-full",
5968
+ isCompact && "gap-1",
5969
+ isHorizontal && "min-w-0 flex-1 gap-2 pt-0.5 @min-[16rem]:pt-0",
5970
+ classNames?.legend
5971
+ ),
5972
+ children: normalized.map((item) => /* @__PURE__ */ jsx(
5973
+ "div",
5974
+ {
5975
+ "data-slot": "donut-legend-item",
5976
+ className: cn(classNames?.legendItem),
5977
+ children: isHorizontal ? /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
5978
+ /* @__PURE__ */ jsx(
5979
+ LegendMarker,
5980
+ {
5981
+ className: cn("mt-0.5", classNames?.legendMarker),
5982
+ color: item.color,
5983
+ icon: item.icon,
5984
+ mode: legendMarker
5985
+ }
5986
+ ),
5987
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
5988
+ /* @__PURE__ */ jsx("span", { className: cn("text-xs text-muted-foreground leading-tight", classNames?.legendLabel), children: item.label }),
5989
+ /* @__PURE__ */ jsxs(
5990
+ "span",
5991
+ {
5992
+ className: cn(
5993
+ "whitespace-nowrap text-xs font-semibold tabular-nums text-foreground leading-tight",
5994
+ classNames?.legendValue
5995
+ ),
5996
+ children: [
5997
+ valueFormatter(item.value),
5998
+ percentageFormatter ? /* @__PURE__ */ jsxs("span", { className: "ml-1 text-[11px] font-normal text-muted-foreground", children: [
5999
+ " \xB7 ",
6000
+ percentageFormatter(item.ratio)
6001
+ ] }) : null
6002
+ ]
6003
+ }
6004
+ )
6005
+ ] })
6006
+ ] }) : /* @__PURE__ */ jsxs(
6007
+ "div",
6008
+ {
6009
+ className: cn(
6010
+ "flex items-center justify-between gap-2",
6011
+ isCompact ? "text-[11px]" : "text-sm"
6012
+ ),
6013
+ children: [
6014
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [
6015
+ /* @__PURE__ */ jsx(
6016
+ LegendMarker,
6017
+ {
6018
+ className: classNames?.legendMarker,
6019
+ color: item.color,
6020
+ icon: item.icon,
6021
+ mode: legendMarker
6022
+ }
6023
+ ),
6024
+ /* @__PURE__ */ jsx(
6025
+ "span",
6026
+ {
6027
+ className: cn(
6028
+ "text-muted-foreground truncate",
6029
+ classNames?.legendLabel
6030
+ ),
6031
+ children: item.label
6032
+ }
6033
+ )
6034
+ ] }),
6035
+ /* @__PURE__ */ jsxs(
6036
+ "span",
6037
+ {
6038
+ className: cn(
6039
+ "tabular-nums text-foreground whitespace-nowrap",
6040
+ isCompact ? "text-[11px] font-semibold" : "text-sm font-medium",
6041
+ classNames?.legendValue
6042
+ ),
6043
+ children: [
6044
+ valueFormatter(item.value),
6045
+ percentageFormatter ? /* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-normal ml-0.5", children: percentageFormatter(item.ratio) }) : null
6046
+ ]
6047
+ }
6048
+ )
6049
+ ]
6050
+ }
6051
+ )
6052
+ },
6053
+ item.id
6054
+ ))
6055
+ }
6056
+ )
6057
+ ]
6058
+ }
6059
+ ),
6060
+ footer ? /* @__PURE__ */ jsx(NCardFooter, { className: classNames?.footer, children: footer }) : null
6061
+ ]
6062
+ }
6063
+ );
6064
+ }
5737
6065
  function NDetailCard({
5738
6066
  title,
5739
6067
  description,
@@ -10283,20 +10611,65 @@ function NTableHeaderSkeleton() {
10283
10611
  const hasToolbar = Boolean(useTableStore.use.renderToolbar());
10284
10612
  const filterCount = Math.min(Math.max(filters?.length ?? 0, 1), 3);
10285
10613
  const hasActions = showViewToggle || showColumnVisibility || showAddButton || hasHeaderSlot || hasToolbar;
10614
+ const hasSettings = showViewToggle || showColumnVisibility || hasHeaderSlot || hasToolbar;
10286
10615
  if (!filters?.length && !hasActions) return null;
10287
- return /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 flex-wrap items-center justify-between gap-2", children: [
10288
- filters?.length ? /* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-1 flex-wrap gap-2", children: Array.from({ length: filterCount }).map((_, index) => /* @__PURE__ */ jsx(
10289
- NSkeleton,
10290
- {
10291
- className: cn("h-10 w-full rounded-lg", index < 2 ? "max-w-64" : "max-w-48")
10292
- },
10293
- index
10294
- )) }) : /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1" }),
10295
- hasActions && /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 gap-2", children: [
10296
- (showViewToggle || showColumnVisibility || hasHeaderSlot || hasToolbar) && /* @__PURE__ */ jsx(NSkeleton, { className: "h-10 w-10 rounded-lg" }),
10297
- showAddButton && /* @__PURE__ */ jsx(NSkeleton, { className: "h-10 w-10 rounded-lg" })
10298
- ] })
10299
- ] });
10616
+ return /* @__PURE__ */ jsxs(
10617
+ "div",
10618
+ {
10619
+ "data-ntable-loading-header": true,
10620
+ className: "flex shrink-0 flex-wrap items-center justify-between gap-2",
10621
+ children: [
10622
+ filters?.length ? /* @__PURE__ */ jsx(
10623
+ "div",
10624
+ {
10625
+ "data-ntable-loading-desktop-filters": true,
10626
+ className: "hidden min-w-0 flex-1 flex-wrap gap-2 md:flex",
10627
+ children: Array.from({ length: filterCount }).map((_, index) => /* @__PURE__ */ jsx(
10628
+ NSkeleton,
10629
+ {
10630
+ className: cn("h-10 w-full rounded-lg", index < 2 ? "max-w-64" : "max-w-48")
10631
+ },
10632
+ index
10633
+ ))
10634
+ }
10635
+ ) : /* @__PURE__ */ jsx("span", { className: "hidden min-w-0 flex-1 md:block" }),
10636
+ /* @__PURE__ */ jsxs(
10637
+ "div",
10638
+ {
10639
+ "data-ntable-loading-mobile-toolbar": true,
10640
+ className: "flex w-full min-w-0 items-center gap-2 md:hidden",
10641
+ children: [
10642
+ filters?.length ? /* @__PURE__ */ jsx(
10643
+ NSkeleton,
10644
+ {
10645
+ "data-ntable-loading-mobile-primary": true,
10646
+ className: "h-10 min-w-0 flex-1 rounded-lg"
10647
+ }
10648
+ ) : null,
10649
+ filters?.length > 1 ? /* @__PURE__ */ jsx(
10650
+ NSkeleton,
10651
+ {
10652
+ "data-ntable-loading-mobile-filter-button": true,
10653
+ className: "h-10 w-10 shrink-0 rounded-lg"
10654
+ }
10655
+ ) : null,
10656
+ showAddButton ? /* @__PURE__ */ jsx(
10657
+ NSkeleton,
10658
+ {
10659
+ "data-ntable-loading-mobile-add-button": true,
10660
+ className: "h-10 w-10 shrink-0 rounded-lg"
10661
+ }
10662
+ ) : null
10663
+ ]
10664
+ }
10665
+ ),
10666
+ hasActions && /* @__PURE__ */ jsxs("div", { className: "hidden shrink-0 gap-2 md:flex", children: [
10667
+ hasSettings && /* @__PURE__ */ jsx(NSkeleton, { className: "h-10 w-10 rounded-lg" }),
10668
+ showAddButton && /* @__PURE__ */ jsx(NSkeleton, { className: "h-10 w-10 rounded-lg" })
10669
+ ] })
10670
+ ]
10671
+ }
10672
+ );
10300
10673
  }
10301
10674
  function NTableLoadingSkeleton({ rows = DEFAULT_ROWS2 }) {
10302
10675
  const columns = useTableStore.use.columns();
@@ -10379,21 +10752,55 @@ function NTableCardsLoadingSkeleton({ rows }) {
10379
10752
  children: Array.from({ length: cardCount }).map((_, index) => /* @__PURE__ */ jsx(
10380
10753
  Card,
10381
10754
  {
10382
- className: cn("rounded-lg bg-card p-4 shadow-none", surfaceBorderClasses(bordered)),
10383
- children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4", children: [
10384
- /* @__PURE__ */ jsx(NSkeleton, { className: "h-12 w-12 shrink-0 rounded-full" }),
10385
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-3", children: [
10386
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
10387
- /* @__PURE__ */ jsx(NSkeleton, { className: "h-5 w-36" }),
10388
- /* @__PURE__ */ jsx(NSkeleton, { className: "h-3 w-48 max-w-full" })
10389
- ] }),
10390
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
10391
- /* @__PURE__ */ jsx(NSkeleton, { className: "h-4 w-full" }),
10392
- /* @__PURE__ */ jsx(NSkeleton, { className: "h-4 w-4/5" }),
10393
- /* @__PURE__ */ jsx(NSkeleton, { className: "h-4 w-3/4" })
10394
- ] })
10395
- ] })
10396
- ] })
10755
+ className: cn("rounded-lg bg-card p-3 shadow-none sm:p-4", surfaceBorderClasses(bordered)),
10756
+ children: /* @__PURE__ */ jsxs(
10757
+ "div",
10758
+ {
10759
+ "data-ntable-loading-card-layout": "responsive-avatar",
10760
+ className: "grid grid-cols-[80px_minmax(0,1fr)] gap-3 sm:grid-cols-[72px_minmax(0,1fr)]",
10761
+ children: [
10762
+ /* @__PURE__ */ jsx("div", { className: "col-start-1 row-start-1 flex items-start justify-center sm:justify-start", children: /* @__PURE__ */ jsx(
10763
+ NSkeleton,
10764
+ {
10765
+ "data-ntable-loading-card-avatar": true,
10766
+ className: "size-20 shrink-0 rounded-full sm:size-16"
10767
+ }
10768
+ ) }),
10769
+ /* @__PURE__ */ jsxs("div", { className: "col-start-2 row-start-1 flex min-w-0 items-start justify-between gap-3", children: [
10770
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 space-y-2", children: [
10771
+ /* @__PURE__ */ jsx(NSkeleton, { className: "h-5 w-36 max-w-full" }),
10772
+ /* @__PURE__ */ jsx(NSkeleton, { className: "hidden h-3 w-16 sm:block" })
10773
+ ] }),
10774
+ /* @__PURE__ */ jsx(
10775
+ NSkeleton,
10776
+ {
10777
+ "data-ntable-loading-card-status": true,
10778
+ className: "hidden h-6 w-14 shrink-0 rounded-full sm:block"
10779
+ }
10780
+ )
10781
+ ] }),
10782
+ /* @__PURE__ */ jsx(
10783
+ "div",
10784
+ {
10785
+ "data-ntable-loading-card-details": true,
10786
+ className: "col-start-2 row-start-2 space-y-1 sm:col-span-full sm:col-start-1 sm:space-y-2 sm:rounded-lg sm:bg-muted/50 sm:p-3",
10787
+ children: Array.from({ length: 3 }).map((_2, detailIndex) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
10788
+ /* @__PURE__ */ jsx(NSkeleton, { className: "size-3.5 shrink-0 rounded-sm sm:size-4" }),
10789
+ /* @__PURE__ */ jsx(
10790
+ NSkeleton,
10791
+ {
10792
+ className: cn(
10793
+ "h-3 max-w-full sm:h-4",
10794
+ detailIndex === 0 ? "w-full" : detailIndex === 1 ? "w-4/5" : "w-3/4"
10795
+ )
10796
+ }
10797
+ )
10798
+ ] }, detailIndex))
10799
+ }
10800
+ )
10801
+ ]
10802
+ }
10803
+ )
10397
10804
  },
10398
10805
  index
10399
10806
  ))
@@ -11995,4 +12402,4 @@ function NGridItem({
11995
12402
  return /* @__PURE__ */ jsx("div", { className: itemClassName, ...props, children });
11996
12403
  }
11997
12404
 
11998
- export { Alert, NCard as AsyncCard, Avatar, AvatarFallback, AvatarGroup, AvatarImage, AvatarStatus, Badge, BaseInput, Button, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroupInput, CheckboxInput, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorArrayInput, ColorPickerInput, Combobox, ComboboxInput, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DateInput, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicArray_default as DynamicArray, EmojiInput, FileImportButton, FileInput, Form, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, IconButton, ImageInput, Indicator, Input, Label, LangInput, MultiSelectInput, NAJM_COMPONENT_NAMES, NAlert, NAppShell, NCard as NAsyncCard, NAvatar, NBadge, NBulkActionsBar, NButton, NCard, NCardAction, NCardFooter, NCardInfo, NCardMedia, NCardSection, NCommandPalette, NConfirmDialog, NContextMenu, NDataCardShell, NDeleteDialog, NDeleteDialogContent, NDetailCard, NDetailItem, NDetailList, NDialog, NDialogDescription, NDialogHeader, NDialogPrimaryButton, NDialogSecondaryButton, NEditorTabs, NEmptyState, NErrorBoundary, NErrorState, NFileBrowser, NFileTypeIcon, NFilterBar, NFolderIcon, NForm, NFormSectionHeader, NGrid, NGridItem, NIcon, NIndicator, NInspectorSheet, NLoadingState, NMultiDialog, NNavbar, NPageHeader, NPageHeaderActions, NPageHeaderCompactActions, NPageHeaderFilters, NPageHeaderTop, NPageLayout, NPortalScopeProvider, NProgress, NRowActions, NSection, NSectionHeader, NSectionInfo, NSectionWithInfo, NSheet, NSidebar, NSidebarContent, NSidebarFooter, NSidebarHeader, NSidebarItem, NSidebarLogo, NSidebarMobile, NSidebarSection, NSkeleton, NSkeletonCalendar, NSkeletonChart, NSkeletonDonut, NSkeletonEventList, NSkeletonWidget, NSkeletonWidgets, NSlider, NSmartPasteDialog, NSpinner, NStatCard, NStatCardSkeleton, Swap as NSwap, NTable, NTableCardRoot, NTableCards, NTableContent, NTableHeader, NTableJson, NTableLoadingSkeleton, NTablePagination, NTableRowSkeleton, NTableSkeleton, NTabs, NUploader, NViewBody, NViewToggle, NajmDesignProvider, NajmScroll, NajmThemeProvider, NativeSelect, NumberInput, PasswordInput, PhoneInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PrefixProvider, Progress, RADIUS_VALUE_MAP, RadioGroup2 as RadioGroup, RadioGroupInput, RadioGroupItem, RepeatingFields, ScrollArea, SearchField, SearchField as SearchInput, SegmentedControl, Select, SelectContent, SelectGroup, SelectInput, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SimpleTooltip, NSkeleton as Skeleton, Slider, SliderInput, StarRatingInput, StatusPill, StepIndicator, StepsHeader, StepsProgress, Swap, SwapIndeterminate, SwapOff, SwapOn, Switch, SwitchInput, TAB_COLORS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableStoreContext, Tabs, TabsContent, TabsList, TabsTrigger, TextAreaInput, TextInput, Textarea, TimeInput, Toaster, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VariantProvider, WizardForm, 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 };
12405
+ export { Alert, NCard as AsyncCard, Avatar, AvatarFallback, AvatarGroup, AvatarImage, AvatarStatus, Badge, BaseInput, Button, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroupInput, CheckboxInput, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorArrayInput, ColorPickerInput, Combobox, ComboboxInput, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DateInput, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicArray_default as DynamicArray, EmojiInput, FileImportButton, FileInput, Form, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, IconButton, ImageInput, Indicator, Input, Label, LangInput, MultiSelectInput, NAJM_COMPONENT_NAMES, NAlert, NAppShell, NCard as NAsyncCard, NAvatar, NBadge, NBulkActionsBar, NButton, NCard, NCardAction, NCardFooter, NCardInfo, NCardMedia, NCardSection, NCommandPalette, NConfirmDialog, NContextMenu, NDataCardShell, NDeleteDialog, NDeleteDialogContent, NDetailCard, NDetailItem, NDetailList, NDialog, NDialogDescription, NDialogHeader, NDialogPrimaryButton, NDialogSecondaryButton, NDonutCard, NEditorTabs, NEmptyState, NErrorBoundary, NErrorState, NFileBrowser, NFileTypeIcon, NFilterBar, NFolderIcon, NForm, NFormSectionHeader, NGrid, NGridItem, NIcon, NIndicator, NInspectorSheet, NLoadingState, NMultiDialog, NNavbar, NPageHeader, NPageHeaderActions, NPageHeaderCompactActions, NPageHeaderFilters, NPageHeaderTop, NPageLayout, NPortalScopeProvider, NProgress, NRowActions, NSection, NSectionHeader, NSectionInfo, NSectionWithInfo, NSheet, NSidebar, NSidebarContent, NSidebarFooter, NSidebarHeader, NSidebarItem, NSidebarLogo, NSidebarMobile, NSidebarSection, NSkeleton, NSkeletonCalendar, NSkeletonChart, NSkeletonDonut, NSkeletonEventList, NSkeletonWidget, NSkeletonWidgets, NSlider, NSmartPasteDialog, NSpinner, NStatCard, NStatCardSkeleton, Swap as NSwap, NTable, NTableCardRoot, NTableCards, NTableContent, NTableHeader, NTableJson, NTableLoadingSkeleton, NTablePagination, NTableRowSkeleton, NTableSkeleton, NTabs, NUploader, NViewBody, NViewToggle, NajmDesignProvider, NajmScroll, NajmThemeProvider, NativeSelect, NumberInput, PasswordInput, PhoneInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PrefixProvider, Progress, RADIUS_VALUE_MAP, RadioGroup2 as RadioGroup, RadioGroupInput, RadioGroupItem, RepeatingFields, ScrollArea, SearchField, SearchField as SearchInput, SegmentedControl, Select, SelectContent, SelectGroup, SelectInput, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SimpleTooltip, NSkeleton as Skeleton, Slider, SliderInput, StarRatingInput, StatusPill, StepIndicator, StepsHeader, StepsProgress, Swap, SwapIndeterminate, SwapOff, SwapOn, Switch, SwitchInput, TAB_COLORS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableStoreContext, Tabs, TabsContent, TabsList, TabsTrigger, TextAreaInput, TextInput, Textarea, TimeInput, Toaster, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VariantProvider, WizardForm, 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "najm-kit",
3
- "version": "2.1.22",
3
+ "version": "2.1.24",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Reusable React UI component package for Najm framework",
@@ -136,14 +136,14 @@
136
136
  "@types/react-dom": "^19",
137
137
  "@types/react-file-icon": "^1.0.5",
138
138
  "@uiw/react-codemirror": "^4.25.0",
139
- "@vitejs/plugin-react": "^4",
140
- "happy-dom": "^17",
141
- "postcss": "^8",
139
+ "@vitejs/plugin-react": "^5.2.0",
140
+ "happy-dom": "^20.11.1",
141
+ "postcss": "^8.5.22",
142
142
  "react-hook-form": "^7",
143
143
  "rimraf": "^6",
144
144
  "tailwindcss": "^4",
145
145
  "tsup": "^8",
146
146
  "typescript": "^5",
147
- "vite": "^6"
147
+ "vite": "^7.3.6"
148
148
  }
149
149
  }