najm-kit 2.1.35 → 2.1.37

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/README.md CHANGED
@@ -165,3 +165,54 @@ import { useSelection } from 'najm-kit';
165
165
  - All components are unstyled by default — apply `buttonVariants()`, `badgeVariants()`, etc. with Tailwind
166
166
  - Requires Tailwind CSS **v4** in the host application (see Styling above)
167
167
  - CodeMirror components are optional peer deps — import from `najm-kit/json` only if needed
168
+
169
+ ## NTable responsive columns
170
+
171
+ `NTable` accepts an `NTableColumnDef<T>[]`. Each column's `meta` can carry:
172
+
173
+ - `visible?: boolean` — app-owned eligibility gate. Defaults to `true`. Set
174
+ this from your role / capability decision. Columns with `visible: false`
175
+ are removed from headers, body cells, the loading skeleton, and the
176
+ column-settings menu.
177
+ - `hiddenBelow?: "sm" | "md" | "lg" | "xl" | "2xl"` — hide the table column
178
+ below the chosen Tailwind breakpoint. The column remains visible at that
179
+ breakpoint and above (mobile-first). Table view only.
180
+
181
+ ```tsx
182
+ import { NTable, type NTableColumnDef } from "najm-kit";
183
+
184
+ const columns: NTableColumnDef<Family>[] = [
185
+ { accessorKey: "name", header: "Family account" },
186
+ {
187
+ accessorKey: "email",
188
+ header: "Email",
189
+ meta: {
190
+ visible: can("families.email.read"),
191
+ hiddenBelow: "lg",
192
+ },
193
+ },
194
+ ];
195
+ ```
196
+
197
+ Notes:
198
+
199
+ - `visible` is **application-owned eligibility**, not an NTable role system.
200
+ `NTable` never imports `najm-auth` or reads a session; convert your own
201
+ role / capabilities to a boolean.
202
+ - Omitting `visible` is the same as `true`.
203
+ - `hiddenBelow` is table-only. Card view, JSON view, and custom modes
204
+ ignore it. Cards must do their own capability gating inside `renderCard`.
205
+ - Hiding a column is **presentation only**. The backend must still enforce
206
+ the permission and privacy-project the field. Never rely on UI hiding to
207
+ protect sensitive data.
208
+ - The user-controlled column visibility menu (settings → Columns) keeps
209
+ working independently. It can report a column as selected while CSS
210
+ hides it below the configured breakpoint.
211
+ - The columns the TanStack table receives are already filtered, so the
212
+ settings menu will not list `visible: false` columns.
213
+
214
+ If you need to inspect or build your own effective column list, the same
215
+ pure helper is exported as `filterResponsiveColumns`. The literal class
216
+ map is also exported as `hiddenBelowClasses`, and
217
+ `resolveHiddenBelowClass(breakpoint)` returns the class for a single
218
+ breakpoint or `undefined` when no breakpoint is set.
package/dist/index.d.ts CHANGED
@@ -2822,6 +2822,41 @@ declare const createTableStore: () => {
2822
2822
  };
2823
2823
  };
2824
2824
 
2825
+ type NTableColumnBreakpoint = Exclude<NajmResponsiveBreakpoint, "base">;
2826
+ interface NTableColumnMeta {
2827
+ /**
2828
+ * Whether this column is eligible to exist in NTable.
2829
+ * Defaults to true. Set from the application's role/capability decision.
2830
+ */
2831
+ visible?: boolean;
2832
+ /**
2833
+ * Hide this table column below the selected Tailwind breakpoint.
2834
+ * The column remains visible at that breakpoint and above.
2835
+ * Applies to table view only.
2836
+ */
2837
+ hiddenBelow?: NTableColumnBreakpoint;
2838
+ }
2839
+ /**
2840
+ * TanStack `ColumnDef` plus Najm's responsive metadata on `meta`.
2841
+ *
2842
+ * The runtime expectation is that `meta` may carry `{ visible, hiddenBelow }`,
2843
+ * so consumers get autocomplete for those fields.
2844
+ */
2845
+ type NTableColumnDef<TData, TValue = any> = ColumnDef<TData, TValue> & {
2846
+ meta?: ColumnDef<TData, TValue>["meta"] & NTableColumnMeta;
2847
+ };
2848
+ declare function resolveHiddenBelowClass(hiddenBelow: NTableColumnBreakpoint | undefined): string | undefined;
2849
+ declare const hiddenBelowClasses: Readonly<Record<NTableColumnBreakpoint, string>>;
2850
+ /**
2851
+ * Returns the effective columns for TanStack + the loading skeleton + the
2852
+ * column visibility menu. Capability-gated columns (`meta.visible === false`)
2853
+ * are removed without mutating the input. Grouped columns are filtered
2854
+ * recursively; groups with no eligible children are removed.
2855
+ *
2856
+ * The helper is pure: it never mutates the caller's column definitions.
2857
+ */
2858
+ declare function filterResponsiveColumns<TData, TValue>(columns: ReadonlyArray<ColumnDef<TData, TValue>>): ColumnDef<TData, TValue>[];
2859
+
2825
2860
  declare const TABLE_HEADER_COLOR_PRESETS: {
2826
2861
  readonly primary: "var(--primary)";
2827
2862
  readonly violet: "#7c3aed";
@@ -2854,7 +2889,7 @@ interface NTableMenu<T = any> {
2854
2889
  type NTableMenuProp<T = any> = NTableMenu<T> | ((row: T) => ContextMenuItem[]);
2855
2890
  interface NTableProps<T = any, M extends ViewMode = ViewMode> {
2856
2891
  data: T[];
2857
- columns: ColumnDef<T, any>[];
2892
+ columns: ReadonlyArray<NTableColumnDef<T, any>>;
2858
2893
  loading?: boolean;
2859
2894
  error?: any;
2860
2895
  getRowId?: (row: T) => string;
@@ -2953,7 +2988,20 @@ interface NTableProps<T = any, M extends ViewMode = ViewMode> {
2953
2988
  selectedRowId?: string | null;
2954
2989
  onStateChange?: (state: NTableState) => void;
2955
2990
  }
2956
- declare function NTable<T = any, M extends ViewMode = ViewMode>(props: NTableProps<T, M>): react_jsx_runtime.JSX.Element;
2991
+ type NTableColumnDefCompatibilityProps<T, M extends ViewMode> = Omit<NTableProps<NoInfer<T>, M>, "data" | "columns"> & {
2992
+ data: T[];
2993
+ columns: ReadonlyArray<ColumnDef<T, any>>;
2994
+ };
2995
+ /**
2996
+ * Backward-compatible overload for callers whose reusable column arrays are
2997
+ * declared with TanStack's plain `ColumnDef<T>[]`.
2998
+ */
2999
+ declare function NTable<T = any, M extends ViewMode = ViewMode>(props: NTableColumnDefCompatibilityProps<T, M>): React__default.ReactElement;
3000
+ /**
3001
+ * Najm-specific overload providing typed `meta.visible` and
3002
+ * `meta.hiddenBelow` metadata.
3003
+ */
3004
+ declare function NTable<T = any, M extends ViewMode = ViewMode>(props: NTableProps<T, M>): React__default.ReactElement;
2957
3005
 
2958
3006
  declare function NTableContent({ effectiveMode }: {
2959
3007
  effectiveMode?: string;
@@ -3302,7 +3350,7 @@ declare function useStoreSync(props: any): {
3302
3350
  declare function useDynamicPageSize(containerRef: React__default.RefObject<HTMLDivElement | null>): void;
3303
3351
  declare function useTable(): {
3304
3352
  table: _tanstack_table_core.Table<unknown>;
3305
- finalColumns: any;
3353
+ finalColumns: _tanstack_table_core.ColumnDef<unknown, unknown>[];
3306
3354
  sorting: SortingState;
3307
3355
  setSorting: React__default.Dispatch<React__default.SetStateAction<SortingState>>;
3308
3356
  columnFilters: ColumnFiltersState;
@@ -3696,4 +3744,4 @@ interface NGridItemProps extends Omit<React$1.AllHTMLAttributes<HTMLDivElement>,
3696
3744
  declare function NGrid({ as: Comp, children, cols, smCols, mdCols, lgCols, xlCols, gap, className, style, ...props }: NGridProps): react_jsx_runtime.JSX.Element;
3697
3745
  declare function NGridItem({ children, span, smSpan, mdSpan, lgSpan, xlSpan, className, ...props }: NGridItemProps): react_jsx_runtime.JSX.Element;
3698
3746
 
3699
- 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 NDonutCardLayout, 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, NThemeCustomizer, type NThemeCustomizerFontOption, type NThemeCustomizerLabels, type NThemeCustomizerProps, type NThemeCustomizerTab, 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 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, TimeZoneInput, type TimeZoneInputProps, 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 };
3747
+ 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 NDonutCardLayout, 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, type NTableColumnBreakpoint, type NTableColumnDef, type NTableColumnMeta, 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, NThemeCustomizer, type NThemeCustomizerFontOption, type NThemeCustomizerLabels, type NThemeCustomizerProps, type NThemeCustomizerTab, 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 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, TimeZoneInput, type TimeZoneInputProps, 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, filterResponsiveColumns, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNextEditorTabValue, hiddenBelowClasses, indicatorVariants, inputBorderClasses, parseColor, parseNajmDesignConfig, parseNajmThemeConfig, resolveHiddenBelowClass, 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
@@ -1621,6 +1621,23 @@ var PRESET_COLORS = [
1621
1621
  "#000000"
1622
1622
  ];
1623
1623
  var DEFAULT_FORMATS = ["hex", "rgb", "hsl", "oklch"];
1624
+ var CSS_VAR_RE = /^var\(\s*(--[\w-]+)\s*(?:,\s*(.+))?\)$/;
1625
+ function resolvePickerColor(value, themeContainer) {
1626
+ let current = value.trim();
1627
+ const seen = /* @__PURE__ */ new Set();
1628
+ for (let depth = 0; depth < 10; depth += 1) {
1629
+ if (parseColor(current)) return current;
1630
+ const match = current.match(CSS_VAR_RE);
1631
+ if (!match) return current;
1632
+ const [, property, fallback] = match;
1633
+ if (seen.has(property)) return fallback?.trim() || current;
1634
+ seen.add(property);
1635
+ const target = themeContainer ?? (typeof document !== "undefined" ? document.documentElement : null);
1636
+ const resolved = target?.style.getPropertyValue(property).trim() || (target && typeof getComputedStyle === "function" ? getComputedStyle(target).getPropertyValue(property).trim() : "");
1637
+ current = resolved || fallback?.trim() || current;
1638
+ }
1639
+ return current;
1640
+ }
1624
1641
  function ColorPickerInput(props) {
1625
1642
  if (props.mode === "popover") {
1626
1643
  return /* @__PURE__ */ jsx(PopoverColorPicker, { ...props });
@@ -1640,6 +1657,8 @@ function SwatchesColorPicker({
1640
1657
  hideSwatches = false
1641
1658
  }) {
1642
1659
  const inputRef = useRef(null);
1660
+ const themeContainer = React__default.useContext(NajmThemeContainerCtx);
1661
+ const resolvedValue = resolvePickerColor(value, themeContainer);
1643
1662
  return /* @__PURE__ */ jsxs(
1644
1663
  BaseInput,
1645
1664
  {
@@ -1665,7 +1684,7 @@ function SwatchesColorPicker({
1665
1684
  {
1666
1685
  ref: inputRef,
1667
1686
  type: "color",
1668
- value: toPickerHex(value),
1687
+ value: toPickerHex(resolvedValue),
1669
1688
  onChange: (e) => onChange(e.target.value),
1670
1689
  disabled,
1671
1690
  className: "sr-only"
@@ -1708,7 +1727,9 @@ function PopoverColorPicker({
1708
1727
  formats = DEFAULT_FORMATS,
1709
1728
  output = "preserve"
1710
1729
  }) {
1711
- const initialFormat = formats.includes(detectFormat(value)) ? detectFormat(value) : formats[0] ?? "hex";
1730
+ const themeContainer = React__default.useContext(NajmThemeContainerCtx);
1731
+ const resolvedValue = resolvePickerColor(value, themeContainer);
1732
+ const initialFormat = formats.includes(detectFormat(resolvedValue)) ? detectFormat(resolvedValue) : formats[0] ?? "hex";
1712
1733
  const [activeFormat, setActiveFormat] = useState(initialFormat);
1713
1734
  const [draft, setDraft] = useState(value);
1714
1735
  useEffect(() => {
@@ -1754,7 +1775,7 @@ function PopoverColorPicker({
1754
1775
  "span",
1755
1776
  {
1756
1777
  className: "w-8 h-8 rounded-md border border-border shrink-0",
1757
- style: { backgroundColor: toPickerHex(value) }
1778
+ style: { backgroundColor: value }
1758
1779
  }
1759
1780
  ),
1760
1781
  /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground font-mono truncate", children: value })
@@ -1765,7 +1786,9 @@ function PopoverColorPicker({
1765
1786
  /* @__PURE__ */ jsx(
1766
1787
  HexColorPicker,
1767
1788
  {
1768
- color: toPickerHex(draft),
1789
+ color: toPickerHex(
1790
+ draft === value ? resolvedValue : resolvePickerColor(draft, themeContainer)
1791
+ ),
1769
1792
  onChange: handlePickerChange,
1770
1793
  style: { width: "100%" }
1771
1794
  }
@@ -2744,7 +2767,18 @@ var THEME_TOKEN_GROUPS = [
2744
2767
  {
2745
2768
  id: "surface",
2746
2769
  label: "Surface",
2747
- tokens: ["background", "foreground", "card", "card-foreground", "popover", "popover-foreground"]
2770
+ tokens: [
2771
+ "background",
2772
+ "foreground",
2773
+ "card",
2774
+ "card-foreground",
2775
+ "popover",
2776
+ "popover-foreground",
2777
+ "muted",
2778
+ "muted-foreground",
2779
+ "destructive",
2780
+ "destructive-foreground"
2781
+ ]
2748
2782
  },
2749
2783
  {
2750
2784
  id: "brand",
@@ -2760,11 +2794,6 @@ var THEME_TOKEN_GROUPS = [
2760
2794
  "accent-foreground"
2761
2795
  ]
2762
2796
  },
2763
- {
2764
- id: "feedback",
2765
- label: "Feedback",
2766
- tokens: ["muted", "muted-foreground", "destructive", "destructive-foreground"]
2767
- },
2768
2797
  {
2769
2798
  id: "border-focus",
2770
2799
  label: "Border & Focus",
@@ -11047,6 +11076,45 @@ var createTableStore = () => {
11047
11076
  return createSelectors(store);
11048
11077
  };
11049
11078
 
11079
+ // src/components/table/responsiveColumns.ts
11080
+ var HIDDEN_BELOW_CLASSES = {
11081
+ sm: "hidden sm:table-cell",
11082
+ md: "hidden md:table-cell",
11083
+ lg: "hidden lg:table-cell",
11084
+ xl: "hidden xl:table-cell",
11085
+ "2xl": "hidden 2xl:table-cell"
11086
+ };
11087
+ function resolveHiddenBelowClass(hiddenBelow) {
11088
+ if (!hiddenBelow) return void 0;
11089
+ return HIDDEN_BELOW_CLASSES[hiddenBelow];
11090
+ }
11091
+ var hiddenBelowClasses = HIDDEN_BELOW_CLASSES;
11092
+ function readMeta(column) {
11093
+ return column.meta ?? void 0;
11094
+ }
11095
+ function isGroupedColumn(column) {
11096
+ return Array.isArray(column.columns);
11097
+ }
11098
+ function filterResponsiveColumns(columns) {
11099
+ const result = [];
11100
+ for (const column of columns) {
11101
+ if (isGroupedColumn(column)) {
11102
+ const childDefs = column.columns ?? [];
11103
+ const filteredChildren = filterResponsiveColumns(childDefs);
11104
+ const groupMeta = readMeta(column);
11105
+ if (groupMeta?.visible === false) continue;
11106
+ if (filteredChildren.length === 0) continue;
11107
+ const { columns: _ignored, ...rest } = column;
11108
+ result.push({ ...rest, columns: filteredChildren });
11109
+ continue;
11110
+ }
11111
+ const meta = readMeta(column);
11112
+ if (meta?.visible === false) continue;
11113
+ result.push(column);
11114
+ }
11115
+ return result;
11116
+ }
11117
+
11050
11118
  // src/components/table/hooks.ts
11051
11119
  var ROW_HEIGHT = 56;
11052
11120
  var DEFAULT_TABLE_HEADER_HEIGHT = 48;
@@ -11207,7 +11275,9 @@ function useTable() {
11207
11275
  const userGetRowCanExpand = useTableStore.use.getRowCanExpand();
11208
11276
  const renderSubRow = useTableStore.use.renderSubRow();
11209
11277
  const finalColumns = useMemo(() => {
11210
- const effectiveColumns = columns.length === 0 && CardComponent ? [{ id: "id", accessorKey: "id", header: "ID" }] : columns;
11278
+ const responsiveColumns = filterResponsiveColumns(columns);
11279
+ const callerProvidedColumns = columns.length > 0;
11280
+ const effectiveColumns = responsiveColumns.length === 0 && !callerProvidedColumns && CardComponent ? [{ id: "id", accessorKey: "id", header: "ID" }] : responsiveColumns;
11211
11281
  if (hasActions) {
11212
11282
  const isMenuActions = Boolean(menuButton && openRowMenu);
11213
11283
  return [
@@ -11553,18 +11623,22 @@ function NTableContent({ effectiveMode }) {
11553
11623
  style: headerCellStyle
11554
11624
  }
11555
11625
  ),
11556
- hg.headers.map((header) => /* @__PURE__ */ jsx(
11557
- TableHead,
11558
- {
11559
- className: "text-foreground h-12",
11560
- style: headerCellStyle,
11561
- children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", header.column.getCanSort() && showSorting && "cursor-pointer select-none"), onClick: header.column.getToggleSortingHandler(), children: [
11562
- flexRender(header.column.columnDef.header, header.getContext()),
11563
- header.column.getCanSort() && showSorting && /* @__PURE__ */ jsx("span", { children: getSortIcon(header.column) })
11564
- ] })
11565
- },
11566
- header.id
11567
- ))
11626
+ hg.headers.map((header) => {
11627
+ const headerMeta = header.column.columnDef.meta || {};
11628
+ const responsiveClass = resolveHiddenBelowClass(headerMeta.hiddenBelow);
11629
+ return /* @__PURE__ */ jsx(
11630
+ TableHead,
11631
+ {
11632
+ className: cn("text-foreground h-12", responsiveClass),
11633
+ style: headerCellStyle,
11634
+ children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", header.column.getCanSort() && showSorting && "cursor-pointer select-none"), onClick: header.column.getToggleSortingHandler(), children: [
11635
+ flexRender(header.column.columnDef.header, header.getContext()),
11636
+ header.column.getCanSort() && showSorting && /* @__PURE__ */ jsx("span", { children: getSortIcon(header.column) })
11637
+ ] })
11638
+ },
11639
+ header.id
11640
+ );
11641
+ })
11568
11642
  ] }, hg.id)) }),
11569
11643
  /* @__PURE__ */ jsx(TableBody, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => {
11570
11644
  const isSelectedByRowId = Boolean(selectedRowId && row.original?.id === selectedRowId);
@@ -11618,14 +11692,15 @@ function NTableContent({ effectiveMode }) {
11618
11692
  const columnDef = cell.column.columnDef;
11619
11693
  const meta = columnDef.meta || {};
11620
11694
  const isEditable = Boolean(onCellEdit) && Boolean(meta.editable);
11621
- return /* @__PURE__ */ jsx(TableCell, { className: "h-14", children: isEditable ? /* @__PURE__ */ jsx(EditableCell, { cell, onCellEdit }) : flexRender(columnDef.cell, cell.getContext()) }, cell.id);
11695
+ const responsiveClass = resolveHiddenBelowClass(meta.hiddenBelow);
11696
+ return /* @__PURE__ */ jsx(TableCell, { className: cn("h-14", responsiveClass), children: isEditable ? /* @__PURE__ */ jsx(EditableCell, { cell, onCellEdit }) : flexRender(columnDef.cell, cell.getContext()) }, cell.id);
11622
11697
  })
11623
11698
  ]
11624
11699
  }
11625
11700
  ),
11626
11701
  isExpanded && renderSubRow && /* @__PURE__ */ jsx(TableRow, { "data-expanded-row": "true", style: rowBorderStyle, className: "bg-muted/40 hover:bg-muted/40", children: /* @__PURE__ */ jsx(TableCell, { colSpan: totalCols, className: "p-0", children: renderSubRow(row.original) }) })
11627
11702
  ] }, row.id);
11628
- }) : /* @__PURE__ */ jsx(TableRow, { style: rowBorderStyle, children: /* @__PURE__ */ jsx(TableCell, { colSpan: columns.length + (showCheckbox ? 1 : 0) + (hasExpansion ? 1 : 0), className: "h-16 text-center", children: noResultsText }) }) })
11703
+ }) : /* @__PURE__ */ jsx(TableRow, { style: rowBorderStyle, children: /* @__PURE__ */ jsx(TableCell, { colSpan: (table.getVisibleLeafColumns?.()?.length ?? columns.length) + (showCheckbox ? 1 : 0) + (hasExpansion ? 1 : 0), className: "h-16 text-center", children: noResultsText }) }) })
11629
11704
  ] })
11630
11705
  }
11631
11706
  );
@@ -12361,7 +12436,9 @@ function NTableHeaderSkeleton() {
12361
12436
  );
12362
12437
  }
12363
12438
  function NTableLoadingSkeleton({ rows = DEFAULT_ROWS2 }) {
12364
- const columns = useTableStore.use.columns();
12439
+ const rawColumns = useTableStore.use.columns();
12440
+ const responsiveColumns = React__default.useMemo(() => filterResponsiveColumns(rawColumns), [rawColumns]);
12441
+ const columns = responsiveColumns;
12365
12442
  const showCheckbox = useTableStore.use.showCheckbox();
12366
12443
  const headerClassName = useTableStore.use.headerClassName();
12367
12444
  const classNames = useTableStore.use.classNames();
@@ -12389,7 +12466,7 @@ function NTableLoadingSkeleton({ rows = DEFAULT_ROWS2 }) {
12389
12466
  columns.map((col, i) => /* @__PURE__ */ jsx(
12390
12467
  TableHead,
12391
12468
  {
12392
- className: "text-foreground h-12",
12469
+ className: cn("text-foreground h-12", resolveHiddenBelowClass(col?.meta?.hiddenBelow)),
12393
12470
  style: col?.size ? { width: col.size } : void 0,
12394
12471
  children: renderHeaderLabel(col?.header)
12395
12472
  },
@@ -12402,7 +12479,7 @@ function NTableLoadingSkeleton({ rows = DEFAULT_ROWS2 }) {
12402
12479
  columns.map((col, c) => /* @__PURE__ */ jsx(
12403
12480
  TableCell,
12404
12481
  {
12405
- className: "h-14",
12482
+ className: cn("h-14", resolveHiddenBelowClass(col?.meta?.hiddenBelow)),
12406
12483
  style: col?.size ? { width: col.size } : void 0,
12407
12484
  children: /* @__PURE__ */ jsx(NSkeleton, { className: "h-4 w-full" })
12408
12485
  },
@@ -14091,4 +14168,4 @@ function NGridItem({
14091
14168
  return /* @__PURE__ */ jsx("div", { className: itemClassName, ...props, children });
14092
14169
  }
14093
14170
 
14094
- 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, NThemeCustomizer, 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, TimeZoneInput, 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 };
14171
+ 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, NThemeCustomizer, 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, TimeZoneInput, Toaster, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VariantProvider, WizardForm, alertVariants, avatarVariants, badgeColorVariants, badgeVariants, buildDefaultFileColumns, buttonVariants, cn, composePreset, createDialogStore, createTableStore, defineNajmDesignConfig, defineNajmThemeConfig, detectFormat, dialogVariants, filterResponsiveColumns, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNextEditorTabValue, hiddenBelowClasses, indicatorVariants, inputBorderClasses, parseColor, parseNajmDesignConfig, parseNajmThemeConfig, resolveHiddenBelowClass, 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/theme.css CHANGED
@@ -23,6 +23,7 @@
23
23
  /* Classes built dynamically at runtime (borders.ts, BaseInput.tsx, responsive
24
24
  helpers) never appear as literals the scanner can find, so safelist them. */
25
25
  @source inline("{sm,md,lg}:{hidden,flex}");
26
+ @source inline("{sm,md,lg,xl,2xl}:table-cell");
26
27
  @source inline("border-{black,white}");
27
28
  @source inline("border-{gray,slate,zinc,neutral,stone,red,orange,amber,yellow,green,teal,blue,indigo,purple}{,-600}");
28
29
  @source inline("najm-border najm-border-t najm-border-r najm-border-b najm-border-l");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "najm-kit",
3
- "version": "2.1.35",
3
+ "version": "2.1.37",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Reusable React UI component package for Najm framework",