najm-kit 2.1.34 → 2.1.36
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 +51 -0
- package/dist/index.d.ts +53 -5
- package/dist/index.mjs +70 -20
- package/dist/theme.css +1 -0
- package/package.json +1 -1
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
|
@@ -2137,7 +2137,7 @@ interface TimeInputProps extends BaseProps {
|
|
|
2137
2137
|
showSeconds?: boolean;
|
|
2138
2138
|
disabled?: boolean;
|
|
2139
2139
|
}
|
|
2140
|
-
interface TimeZoneInputProps extends Omit<
|
|
2140
|
+
interface TimeZoneInputProps extends Omit<ComboboxInputProps, "items"> {
|
|
2141
2141
|
items?: SelectItemType[];
|
|
2142
2142
|
}
|
|
2143
2143
|
interface ImageInputProps extends BaseProps {
|
|
@@ -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:
|
|
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
|
-
|
|
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:
|
|
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
|
@@ -9727,13 +9727,15 @@ var TimeZoneInput = ({
|
|
|
9727
9727
|
[items]
|
|
9728
9728
|
);
|
|
9729
9729
|
return /* @__PURE__ */ jsx(
|
|
9730
|
-
|
|
9730
|
+
ComboboxInput,
|
|
9731
9731
|
{
|
|
9732
9732
|
...props,
|
|
9733
9733
|
value,
|
|
9734
9734
|
onChange,
|
|
9735
9735
|
items: localizedItems,
|
|
9736
9736
|
placeholder,
|
|
9737
|
+
searchPlaceholder: "Search time zones...",
|
|
9738
|
+
emptyMessage: "No time zone found",
|
|
9737
9739
|
showIcon: false,
|
|
9738
9740
|
disabled
|
|
9739
9741
|
}
|
|
@@ -11045,6 +11047,45 @@ var createTableStore = () => {
|
|
|
11045
11047
|
return createSelectors(store);
|
|
11046
11048
|
};
|
|
11047
11049
|
|
|
11050
|
+
// src/components/table/responsiveColumns.ts
|
|
11051
|
+
var HIDDEN_BELOW_CLASSES = {
|
|
11052
|
+
sm: "hidden sm:table-cell",
|
|
11053
|
+
md: "hidden md:table-cell",
|
|
11054
|
+
lg: "hidden lg:table-cell",
|
|
11055
|
+
xl: "hidden xl:table-cell",
|
|
11056
|
+
"2xl": "hidden 2xl:table-cell"
|
|
11057
|
+
};
|
|
11058
|
+
function resolveHiddenBelowClass(hiddenBelow) {
|
|
11059
|
+
if (!hiddenBelow) return void 0;
|
|
11060
|
+
return HIDDEN_BELOW_CLASSES[hiddenBelow];
|
|
11061
|
+
}
|
|
11062
|
+
var hiddenBelowClasses = HIDDEN_BELOW_CLASSES;
|
|
11063
|
+
function readMeta(column) {
|
|
11064
|
+
return column.meta ?? void 0;
|
|
11065
|
+
}
|
|
11066
|
+
function isGroupedColumn(column) {
|
|
11067
|
+
return Array.isArray(column.columns);
|
|
11068
|
+
}
|
|
11069
|
+
function filterResponsiveColumns(columns) {
|
|
11070
|
+
const result = [];
|
|
11071
|
+
for (const column of columns) {
|
|
11072
|
+
if (isGroupedColumn(column)) {
|
|
11073
|
+
const childDefs = column.columns ?? [];
|
|
11074
|
+
const filteredChildren = filterResponsiveColumns(childDefs);
|
|
11075
|
+
const groupMeta = readMeta(column);
|
|
11076
|
+
if (groupMeta?.visible === false) continue;
|
|
11077
|
+
if (filteredChildren.length === 0) continue;
|
|
11078
|
+
const { columns: _ignored, ...rest } = column;
|
|
11079
|
+
result.push({ ...rest, columns: filteredChildren });
|
|
11080
|
+
continue;
|
|
11081
|
+
}
|
|
11082
|
+
const meta = readMeta(column);
|
|
11083
|
+
if (meta?.visible === false) continue;
|
|
11084
|
+
result.push(column);
|
|
11085
|
+
}
|
|
11086
|
+
return result;
|
|
11087
|
+
}
|
|
11088
|
+
|
|
11048
11089
|
// src/components/table/hooks.ts
|
|
11049
11090
|
var ROW_HEIGHT = 56;
|
|
11050
11091
|
var DEFAULT_TABLE_HEADER_HEIGHT = 48;
|
|
@@ -11205,7 +11246,9 @@ function useTable() {
|
|
|
11205
11246
|
const userGetRowCanExpand = useTableStore.use.getRowCanExpand();
|
|
11206
11247
|
const renderSubRow = useTableStore.use.renderSubRow();
|
|
11207
11248
|
const finalColumns = useMemo(() => {
|
|
11208
|
-
const
|
|
11249
|
+
const responsiveColumns = filterResponsiveColumns(columns);
|
|
11250
|
+
const callerProvidedColumns = columns.length > 0;
|
|
11251
|
+
const effectiveColumns = responsiveColumns.length === 0 && !callerProvidedColumns && CardComponent ? [{ id: "id", accessorKey: "id", header: "ID" }] : responsiveColumns;
|
|
11209
11252
|
if (hasActions) {
|
|
11210
11253
|
const isMenuActions = Boolean(menuButton && openRowMenu);
|
|
11211
11254
|
return [
|
|
@@ -11551,18 +11594,22 @@ function NTableContent({ effectiveMode }) {
|
|
|
11551
11594
|
style: headerCellStyle
|
|
11552
11595
|
}
|
|
11553
11596
|
),
|
|
11554
|
-
hg.headers.map((header) =>
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
|
|
11560
|
-
|
|
11561
|
-
|
|
11562
|
-
|
|
11563
|
-
|
|
11564
|
-
|
|
11565
|
-
|
|
11597
|
+
hg.headers.map((header) => {
|
|
11598
|
+
const headerMeta = header.column.columnDef.meta || {};
|
|
11599
|
+
const responsiveClass = resolveHiddenBelowClass(headerMeta.hiddenBelow);
|
|
11600
|
+
return /* @__PURE__ */ jsx(
|
|
11601
|
+
TableHead,
|
|
11602
|
+
{
|
|
11603
|
+
className: cn("text-foreground h-12", responsiveClass),
|
|
11604
|
+
style: headerCellStyle,
|
|
11605
|
+
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: [
|
|
11606
|
+
flexRender(header.column.columnDef.header, header.getContext()),
|
|
11607
|
+
header.column.getCanSort() && showSorting && /* @__PURE__ */ jsx("span", { children: getSortIcon(header.column) })
|
|
11608
|
+
] })
|
|
11609
|
+
},
|
|
11610
|
+
header.id
|
|
11611
|
+
);
|
|
11612
|
+
})
|
|
11566
11613
|
] }, hg.id)) }),
|
|
11567
11614
|
/* @__PURE__ */ jsx(TableBody, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => {
|
|
11568
11615
|
const isSelectedByRowId = Boolean(selectedRowId && row.original?.id === selectedRowId);
|
|
@@ -11616,14 +11663,15 @@ function NTableContent({ effectiveMode }) {
|
|
|
11616
11663
|
const columnDef = cell.column.columnDef;
|
|
11617
11664
|
const meta = columnDef.meta || {};
|
|
11618
11665
|
const isEditable = Boolean(onCellEdit) && Boolean(meta.editable);
|
|
11619
|
-
|
|
11666
|
+
const responsiveClass = resolveHiddenBelowClass(meta.hiddenBelow);
|
|
11667
|
+
return /* @__PURE__ */ jsx(TableCell, { className: cn("h-14", responsiveClass), children: isEditable ? /* @__PURE__ */ jsx(EditableCell, { cell, onCellEdit }) : flexRender(columnDef.cell, cell.getContext()) }, cell.id);
|
|
11620
11668
|
})
|
|
11621
11669
|
]
|
|
11622
11670
|
}
|
|
11623
11671
|
),
|
|
11624
11672
|
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) }) })
|
|
11625
11673
|
] }, row.id);
|
|
11626
|
-
}) : /* @__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 }) }) })
|
|
11674
|
+
}) : /* @__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 }) }) })
|
|
11627
11675
|
] })
|
|
11628
11676
|
}
|
|
11629
11677
|
);
|
|
@@ -12359,7 +12407,9 @@ function NTableHeaderSkeleton() {
|
|
|
12359
12407
|
);
|
|
12360
12408
|
}
|
|
12361
12409
|
function NTableLoadingSkeleton({ rows = DEFAULT_ROWS2 }) {
|
|
12362
|
-
const
|
|
12410
|
+
const rawColumns = useTableStore.use.columns();
|
|
12411
|
+
const responsiveColumns = React__default.useMemo(() => filterResponsiveColumns(rawColumns), [rawColumns]);
|
|
12412
|
+
const columns = responsiveColumns;
|
|
12363
12413
|
const showCheckbox = useTableStore.use.showCheckbox();
|
|
12364
12414
|
const headerClassName = useTableStore.use.headerClassName();
|
|
12365
12415
|
const classNames = useTableStore.use.classNames();
|
|
@@ -12387,7 +12437,7 @@ function NTableLoadingSkeleton({ rows = DEFAULT_ROWS2 }) {
|
|
|
12387
12437
|
columns.map((col, i) => /* @__PURE__ */ jsx(
|
|
12388
12438
|
TableHead,
|
|
12389
12439
|
{
|
|
12390
|
-
className: "text-foreground h-12",
|
|
12440
|
+
className: cn("text-foreground h-12", resolveHiddenBelowClass(col?.meta?.hiddenBelow)),
|
|
12391
12441
|
style: col?.size ? { width: col.size } : void 0,
|
|
12392
12442
|
children: renderHeaderLabel(col?.header)
|
|
12393
12443
|
},
|
|
@@ -12400,7 +12450,7 @@ function NTableLoadingSkeleton({ rows = DEFAULT_ROWS2 }) {
|
|
|
12400
12450
|
columns.map((col, c) => /* @__PURE__ */ jsx(
|
|
12401
12451
|
TableCell,
|
|
12402
12452
|
{
|
|
12403
|
-
className: "h-14",
|
|
12453
|
+
className: cn("h-14", resolveHiddenBelowClass(col?.meta?.hiddenBelow)),
|
|
12404
12454
|
style: col?.size ? { width: col.size } : void 0,
|
|
12405
12455
|
children: /* @__PURE__ */ jsx(NSkeleton, { className: "h-4 w-full" })
|
|
12406
12456
|
},
|
|
@@ -14089,4 +14139,4 @@ function NGridItem({
|
|
|
14089
14139
|
return /* @__PURE__ */ jsx("div", { className: itemClassName, ...props, children });
|
|
14090
14140
|
}
|
|
14091
14141
|
|
|
14092
|
-
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 };
|
|
14142
|
+
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");
|