najm-kit 2.6.0 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/index.d.ts +82 -6
- package/dist/index.mjs +104 -51
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.6.2
|
|
4
|
+
|
|
5
|
+
- Added `NSidebarProvider` and `useNSidebar`, so sidebar state can be read from a distance. `NSidebar` renders beside the page content rather than around it, which left applications hand-rolling a context to hand `setMobileOpen` down to a page header — a wrapper component plus an aliased import at every call site. Wrap the shell in `NSidebarProvider` and `NPageHeader` now resolves both `onSidebarOpen` and `mobileBreakpoint` from it, so a header nested anywhere below renders a working mobile trigger with no props threaded to it. Also exports the `NSidebarContextValue` type.
|
|
6
|
+
- `NSidebar` resolves its open and collapsed state as explicit prop → surrounding provider → internal state. Passing `collapsed`, `mobileOpen`, `onCollapsedChange`, or `onMobileOpenChange` keeps behaving exactly as before, and a sidebar with no provider around it still owns its own state, so this is additive for every existing consumer.
|
|
7
|
+
- `logo` accepts a render prop, `({ collapsed, isMobile }) => ReactNode`, alongside the existing node. It receives the state the sidebar actually resolved — including whatever `autoCollapseAt` decided — which consumers previously had to approximate with their own responsive classes, guessing at a breakpoint the sidebar had already computed. The mobile drawer always reports `collapsed: false`, matching how it renders. Exported as `SidebarLogoRender`.
|
|
8
|
+
|
|
9
|
+
## 2.6.1
|
|
10
|
+
|
|
11
|
+
- Fixed the non-card `NPageHeader` bleed never taking effect. 2.6.0 cancelled the page padding with the Tailwind utilities `-mt-[var(--najm-section-gap,0px)]` and `-mx-[var(--najm-page-gutter,0px)]`, which only work if the consuming app's Tailwind build happens to emit those arbitrary classes — they exist nowhere but inside this package's bundle, so a consumer could load a stylesheet without them and the header stayed exactly where it was. The offsets are inline styles now and no longer depend on the consumer's CSS pipeline.
|
|
12
|
+
|
|
3
13
|
## 2.6.0
|
|
4
14
|
|
|
5
15
|
- Added `NThemePresets`, and wired it into `NThemeCustomizer` through `presets`, `selectedPresetId`, `presetsStatus`, `savedDesign`, `onPresetSelect`, `onPresetSave`, `onPresetDelete`, and `presetLabels`. The picker renders only when a host supplies both `presets` and `onPresetSelect`. It is presentational: the host owns where presets live and what saving one means, and selecting a row hands the design back so it can be previewed before anything is stored. Each row draws a swatch strip from the design's own `sidebar`, `primary`, `secondary`, `accent`, and `background` tokens; the selected row's check sits left in the success colour and per-row delete sits right. Omit `onPresetSave` or `onPresetDelete` to hide those controls. Deleting is pointer-only — Radix owns roving focus inside the listbox.
|
package/dist/index.d.ts
CHANGED
|
@@ -700,7 +700,7 @@ declare function NPageHeaderTop({ children, className }: PageHeaderSlotProps): r
|
|
|
700
700
|
declare namespace NPageHeaderTop {
|
|
701
701
|
var displayName: string;
|
|
702
702
|
}
|
|
703
|
-
declare function NPageHeader({ icon: Icon, title, subtitle, actions, compactActions, filters, top, mobileBreakpoint, onSidebarOpen, sidebarTriggerLabel, sidebarTriggerClassName, search, children, className, headerClassName, card, bordered, }: NPageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
703
|
+
declare function NPageHeader({ icon: Icon, title, subtitle, actions, compactActions, filters, top, mobileBreakpoint: mobileBreakpointProp, onSidebarOpen, sidebarTriggerLabel, sidebarTriggerClassName, search, children, className, headerClassName, card, bordered, }: NPageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
704
704
|
|
|
705
705
|
type DialogActionMode = "auto" | "dialog" | "content";
|
|
706
706
|
type DialogVariant = "default" | "window";
|
|
@@ -2853,8 +2853,16 @@ declare function useFormSubmission({ steps, schema, defaultValues, onSubmit, cur
|
|
|
2853
2853
|
*
|
|
2854
2854
|
* `numbered` needs a trustworthy page count. Under `manualPagination` that
|
|
2855
2855
|
* means the application must pass a `pageCount` derived from a real result
|
|
2856
|
-
* total
|
|
2856
|
+
* total, or — when its endpoint reports no total — pass `hasNextPage` and no
|
|
2857
|
+
* `pageCount` at all, which renders the unbounded bar described on the NTable
|
|
2858
|
+
* prop. With neither, the bar falls back to `compact` on its own rather than
|
|
2857
2859
|
* inviting clicks on pages that may not exist.
|
|
2860
|
+
*
|
|
2861
|
+
* What it must never be handed is a `pageCount` that is really a lower bound,
|
|
2862
|
+
* such as `pageIndex + 2`. That reads as a two-page result on page one and a
|
|
2863
|
+
* three-page result on page two, so the bar grows a number per click with
|
|
2864
|
+
* nothing to say why. NTable warns in development when it catches a count
|
|
2865
|
+
* moving in lockstep with the page index.
|
|
2858
2866
|
*/
|
|
2859
2867
|
type NTablePaginationVariant = "numbered" | "compact";
|
|
2860
2868
|
/**
|
|
@@ -2878,6 +2886,12 @@ interface NTablePaginationLabels {
|
|
|
2878
2886
|
lastPage?: string;
|
|
2879
2887
|
/** The `compact` variant's position text, given 1-based values. */
|
|
2880
2888
|
pageOf?: (page: number, pageCount: number) => string;
|
|
2889
|
+
/**
|
|
2890
|
+
* The position text when the result has no known total, given the 1-based
|
|
2891
|
+
* page. Defaults to `"Page X"` — there is no `of Y` to state, and repeating
|
|
2892
|
+
* the moving lower bound there would be the same lie the numbered bar avoids.
|
|
2893
|
+
*/
|
|
2894
|
+
pageOfUnknown?: (page: number) => string;
|
|
2881
2895
|
/** The selection summary, given selected and total row counts. */
|
|
2882
2896
|
rowsSelected?: (selected: number, total: number) => string;
|
|
2883
2897
|
}
|
|
@@ -3048,6 +3062,8 @@ interface TableState {
|
|
|
3048
3062
|
manualPagination: boolean;
|
|
3049
3063
|
pageCount: number | undefined;
|
|
3050
3064
|
rowCount: number | undefined;
|
|
3065
|
+
/** Another server page exists, for a result whose total is unknown. */
|
|
3066
|
+
hasNextPage: boolean | undefined;
|
|
3051
3067
|
pagination: {
|
|
3052
3068
|
pageIndex: number;
|
|
3053
3069
|
pageSize: number;
|
|
@@ -3188,6 +3204,7 @@ declare const createTableStore: (seed?: Partial<TableState>) => {
|
|
|
3188
3204
|
manualPagination: () => boolean;
|
|
3189
3205
|
pageCount: () => number;
|
|
3190
3206
|
rowCount: () => number;
|
|
3207
|
+
hasNextPage: () => boolean;
|
|
3191
3208
|
pagination: () => {
|
|
3192
3209
|
pageIndex: number;
|
|
3193
3210
|
pageSize: number;
|
|
@@ -3362,6 +3379,15 @@ interface NTableProps<T = any, M extends ViewMode = ViewMode> {
|
|
|
3362
3379
|
manualPagination?: boolean;
|
|
3363
3380
|
pageCount?: number;
|
|
3364
3381
|
rowCount?: number;
|
|
3382
|
+
/**
|
|
3383
|
+
* Whether another server page exists, for a list whose endpoint reports no
|
|
3384
|
+
* result total. Supply it *instead of* `pageCount`, never a `pageCount`
|
|
3385
|
+
* synthesized from it: the numbered bar then covers the pages known to exist
|
|
3386
|
+
* and carries a trailing `…` for the rest, and the last-page jump is dropped
|
|
3387
|
+
* because there is no known last page. Ignored when `pageCount` is given —
|
|
3388
|
+
* a real total already says everything this does.
|
|
3389
|
+
*/
|
|
3390
|
+
hasNextPage?: boolean;
|
|
3365
3391
|
pagination?: {
|
|
3366
3392
|
pageIndex: number;
|
|
3367
3393
|
pageSize: number;
|
|
@@ -3463,8 +3489,16 @@ type NTablePageItem = {
|
|
|
3463
3489
|
* pages instead of being dropped — so the slot count stays constant at
|
|
3464
3490
|
* `2 * siblingCount + 5` for any result longer than that. A bar that changes
|
|
3465
3491
|
* width on every click is worse than the text it replaced.
|
|
3492
|
+
*
|
|
3493
|
+
* `unbounded` says the result continues past `pageCount`, which is then every
|
|
3494
|
+
* page *known* to exist rather than the whole result — all an endpoint that
|
|
3495
|
+
* reports no total can prove. The window is built over the known pages and a
|
|
3496
|
+
* trailing gap is appended, so the bar reads "and more after this" from the
|
|
3497
|
+
* first page rather than silently growing a number each time one is
|
|
3498
|
+
* discovered. It goes back to false at the end of the result, where the pages
|
|
3499
|
+
* read are the result and the count is exact.
|
|
3466
3500
|
*/
|
|
3467
|
-
declare function buildPageItems(pageIndex: number, pageCount: number, siblingCount?: number): NTablePageItem[];
|
|
3501
|
+
declare function buildPageItems(pageIndex: number, pageCount: number, siblingCount?: number, unbounded?: boolean): NTablePageItem[];
|
|
3468
3502
|
|
|
3469
3503
|
/**
|
|
3470
3504
|
* Defaults every `NTable` beneath the provider inherits.
|
|
@@ -3690,6 +3724,7 @@ declare const TableStoreContext: React$1.Context<{
|
|
|
3690
3724
|
manualPagination: () => boolean;
|
|
3691
3725
|
pageCount: () => number;
|
|
3692
3726
|
rowCount: () => number;
|
|
3727
|
+
hasNextPage: () => boolean;
|
|
3693
3728
|
pagination: () => {
|
|
3694
3729
|
pageIndex: number;
|
|
3695
3730
|
pageSize: number;
|
|
@@ -3825,6 +3860,7 @@ declare function useStoreSync(props: any): {
|
|
|
3825
3860
|
manualPagination: () => boolean;
|
|
3826
3861
|
pageCount: () => number;
|
|
3827
3862
|
rowCount: () => number;
|
|
3863
|
+
hasNextPage: () => boolean;
|
|
3828
3864
|
pagination: () => {
|
|
3829
3865
|
pageIndex: number;
|
|
3830
3866
|
pageSize: number;
|
|
@@ -3969,8 +4005,17 @@ interface SidebarWidths {
|
|
|
3969
4005
|
collapsed?: SidebarWidth;
|
|
3970
4006
|
mobile?: SidebarWidth;
|
|
3971
4007
|
}
|
|
4008
|
+
/**
|
|
4009
|
+
* Render-prop form of `logo`. Receives the state the sidebar actually resolved,
|
|
4010
|
+
* including `autoCollapseAt`, so consumers stop approximating it with their own
|
|
4011
|
+
* responsive classes.
|
|
4012
|
+
*/
|
|
4013
|
+
type SidebarLogoRender = (state: {
|
|
4014
|
+
collapsed: boolean;
|
|
4015
|
+
isMobile: boolean;
|
|
4016
|
+
}) => ReactNode;
|
|
3972
4017
|
interface SidebarProps {
|
|
3973
|
-
logo?: ReactNode;
|
|
4018
|
+
logo?: ReactNode | SidebarLogoRender;
|
|
3974
4019
|
navItems?: NavItem[];
|
|
3975
4020
|
activePath?: string;
|
|
3976
4021
|
isActive?: (item: NavItem, activePath: string) => boolean;
|
|
@@ -4120,7 +4165,38 @@ declare function NSidebarFooter({ children, onSettings, settingsLabel, onLogout,
|
|
|
4120
4165
|
|
|
4121
4166
|
declare function NSidebarMobile({ open, onOpen, onClose, mobileBreakpoint, width, hamburgerLabel, closeLabel, hamburgerClassName, showHamburgerButton, children, bordered, }: NSidebarMobileProps): react_jsx_runtime.JSX.Element;
|
|
4122
4167
|
|
|
4123
|
-
|
|
4168
|
+
interface NSidebarContextValue {
|
|
4169
|
+
collapsed: boolean;
|
|
4170
|
+
mobileOpen: boolean;
|
|
4171
|
+
openMobile: () => void;
|
|
4172
|
+
closeMobile: () => void;
|
|
4173
|
+
setMobileOpen: (open: boolean) => void;
|
|
4174
|
+
setCollapsed: (collapsed: boolean) => void;
|
|
4175
|
+
toggleCollapsed: () => void;
|
|
4176
|
+
mobileBreakpoint: "sm" | "md" | "lg";
|
|
4177
|
+
}
|
|
4178
|
+
/**
|
|
4179
|
+
* Returns `null` outside a provider, which is what lets `NSidebar` keep its own
|
|
4180
|
+
* state when it is used standalone. Consumers that need the sidebar from a
|
|
4181
|
+
* distance — `NPageHeader`'s mobile trigger, most of all — read it from here.
|
|
4182
|
+
*/
|
|
4183
|
+
declare function useNSidebar(): NSidebarContextValue | null;
|
|
4184
|
+
/**
|
|
4185
|
+
* Owns the sidebar's open/collapsed state so that content rendered *beside* the
|
|
4186
|
+
* sidebar can reach it. `NSidebar` is a sibling of the page content, so this has
|
|
4187
|
+
* to wrap both — it cannot live inside `NSidebar` itself.
|
|
4188
|
+
*
|
|
4189
|
+
* The provider owns the state rather than forwarding a caller-built value: a
|
|
4190
|
+
* pass-through provider has to memoize on the value's fields, which silently
|
|
4191
|
+
* drops changed callback identities and serves stale closures.
|
|
4192
|
+
*/
|
|
4193
|
+
declare function NSidebarProvider({ children, defaultCollapsed, mobileBreakpoint, }: Readonly<{
|
|
4194
|
+
children: ReactNode;
|
|
4195
|
+
defaultCollapsed?: boolean;
|
|
4196
|
+
mobileBreakpoint?: "sm" | "md" | "lg";
|
|
4197
|
+
}>): react_jsx_runtime.JSX.Element;
|
|
4198
|
+
|
|
4199
|
+
declare function NSidebar({ logo, navItems, activePath, isActive, onNavigate, linkComponent, collapsed: collapsedProp, defaultCollapsed, onCollapsedChange, showCollapseButton, collapseButtonPosition, showSectionLabels, showSectionIcons, showSectionSeparators, bordered, footer, className, classNames, mobileBreakpoint: mobileBreakpointProp, autoCollapseAt, mobileOpen: mobileOpenProp, defaultMobileOpen, onMobileOpenChange, closeOnNavigate, hamburgerLabel, closeLabel, collapseLabel, expandLabel, hamburgerClassName, showHamburgerButton, logoIcon, logoTitle, logoSubtitle, onLogoClick, onSettings, settingsLabel, onLogout, logoutLabel, widths, }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
4124
4200
|
|
|
4125
4201
|
declare function NSidebarItem({ item, activePath, isActive, onNavigate, linkComponent: LinkComponent, collapsed, depth, classNames, }: SidebarItemProps): react_jsx_runtime.JSX.Element;
|
|
4126
4202
|
|
|
@@ -4262,4 +4338,4 @@ interface NGridItemProps extends Omit<React$1.AllHTMLAttributes<HTMLDivElement>,
|
|
|
4262
4338
|
declare function NGrid({ as: Comp, children, cols, smCols, mdCols, lgCols, xlCols, gap, className, style, ...props }: NGridProps): react_jsx_runtime.JSX.Element;
|
|
4263
4339
|
declare function NGridItem({ children, span, smSpan, mdSpan, lgSpan, xlSpan, className, ...props }: NGridItemProps): react_jsx_runtime.JSX.Element;
|
|
4264
4340
|
|
|
4265
|
-
export { Alert, type AlertLook, type AlertOrientation, type AlertProps, type AlertSize, type AlertTone, type AlertVariant, NCard as AsyncCard, Avatar, AvatarFallback, AvatarFormInput, type AvatarFormInputProps, AvatarGroup, type AvatarGroupProps, AvatarImage, AvatarInput, type AvatarInputProps, type AvatarInputRadius, 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, DEFAULT_THEME_FILE_NAME, 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 ImageInputPreviewError, type ImageInputPreviewSource, 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, NAJM_SAVED_THEME_VALUE, 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, NBarChart, type NBarChartProps, 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, type NCartesianChartProps, type NChartCardProps, type NChartDatum, type NChartItem, type NChartSeries, type NChartSize, NChartSkeleton, type NChartSkeletonProps, type NChartSkeletonVariant, 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, NLineChart, type NLineChartProps, NLoadingState, type NLoadingStateProps, NMultiDialog, type NMultiDialogProps, NNavbar, NPageHeader, NPageHeaderActions, type NPageHeaderBreakpoint, NPageHeaderCompactActions, NPageHeaderFilters, type NPageHeaderProps, NPageHeaderTop, NPageLayout, type NPageLayoutProps, NPieChart, type NPieChartProps, 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 NSheetClassNames, 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, NStatusBreakdown, type NStatusBreakdownProps, Swap as NSwap, type NSwapProps, NTable, type NTableCardPagination, NTableCardRoot, type NTableCardRootProps, NTableCards, type NTableClassNames, type NTableColumnBreakpoint, type NTableColumnDef, type NTableColumnMeta, NTableContent, type NTableDefaults, NTableDefaultsProvider, NTableHeader, type NTableInfinitePagination, type NTableLoadMorePagination, NTableLoadingSkeleton, type NTableMenu, type NTableMenuProp, type NTablePageItem, NTablePagination, type NTablePaginationLabels, type NTablePaginationVariant, 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, type NThemePreset, NThemePresets, type NThemePresetsLabels, type NThemePresetsProps, type NThemePresetsStatus, 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, OtpInput, type OtpInputProps, 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, buildPageItems, buttonVariants, cn, composePreset, createDialogStore, createTableStore, defineNajmDesignConfig, defineNajmThemeConfig, detectFormat, dialogVariants, filterResponsiveColumns, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNChartColor, getNextEditorTabValue, hiddenBelowClasses, indicatorVariants, inputBorderClasses, normalizeThemeFileName, parseColor, parseNajmDesignConfig, parseNajmThemeConfig, parseThemeFile, resolveHiddenBelowClass, resolvePreset, resolveRadiusValue, resolveSlot, resolveVariantAlias, sidebarBorderClasses, sliderVariants, stringifyNajmDesignConfig, stringifyNajmThemeConfig, stringifyThemeFile, surfaceBorderClasses, swapVariants, toPickerHex, toggleVariants, tooltipContentVariants, truncateByCharacters, useClickOutside, useContextMenu, useDebouncedValue, useDelayedLoading, useDialog, useDialogStore, useDynamicPageSize, useFormField, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useNForm, useNPortalScope, useNTableDefaults, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmThemeMode, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useTableStore, useVariant, useVariantPreset };
|
|
4341
|
+
export { Alert, type AlertLook, type AlertOrientation, type AlertProps, type AlertSize, type AlertTone, type AlertVariant, NCard as AsyncCard, Avatar, AvatarFallback, AvatarFormInput, type AvatarFormInputProps, AvatarGroup, type AvatarGroupProps, AvatarImage, AvatarInput, type AvatarInputProps, type AvatarInputRadius, 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, DEFAULT_THEME_FILE_NAME, 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 ImageInputPreviewError, type ImageInputPreviewSource, 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, NAJM_SAVED_THEME_VALUE, 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, NBarChart, type NBarChartProps, 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, type NCartesianChartProps, type NChartCardProps, type NChartDatum, type NChartItem, type NChartSeries, type NChartSize, NChartSkeleton, type NChartSkeletonProps, type NChartSkeletonVariant, 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, NLineChart, type NLineChartProps, NLoadingState, type NLoadingStateProps, NMultiDialog, type NMultiDialogProps, NNavbar, NPageHeader, NPageHeaderActions, type NPageHeaderBreakpoint, NPageHeaderCompactActions, NPageHeaderFilters, type NPageHeaderProps, NPageHeaderTop, NPageLayout, type NPageLayoutProps, NPieChart, type NPieChartProps, 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 NSheetClassNames, type NSheetProps, NSidebar, NSidebarContent, type NSidebarContentProps, type NSidebarContextValue, NSidebarFooter, type NSidebarFooterProps, NSidebarHeader, type NSidebarHeaderProps, NSidebarItem, NSidebarLogo, type NSidebarLogoProps, NSidebarMobile, type NSidebarMobileProps, NSidebarProvider, 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, NStatusBreakdown, type NStatusBreakdownProps, Swap as NSwap, type NSwapProps, NTable, type NTableCardPagination, NTableCardRoot, type NTableCardRootProps, NTableCards, type NTableClassNames, type NTableColumnBreakpoint, type NTableColumnDef, type NTableColumnMeta, NTableContent, type NTableDefaults, NTableDefaultsProvider, NTableHeader, type NTableInfinitePagination, type NTableLoadMorePagination, NTableLoadingSkeleton, type NTableMenu, type NTableMenuProp, type NTablePageItem, NTablePagination, type NTablePaginationLabels, type NTablePaginationVariant, 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, type NThemePreset, NThemePresets, type NThemePresetsLabels, type NThemePresetsProps, type NThemePresetsStatus, 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, OtpInput, type OtpInputProps, 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 SidebarLogoRender, 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, buildPageItems, buttonVariants, cn, composePreset, createDialogStore, createTableStore, defineNajmDesignConfig, defineNajmThemeConfig, detectFormat, dialogVariants, filterResponsiveColumns, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNChartColor, getNextEditorTabValue, hiddenBelowClasses, indicatorVariants, inputBorderClasses, normalizeThemeFileName, parseColor, parseNajmDesignConfig, parseNajmThemeConfig, parseThemeFile, resolveHiddenBelowClass, resolvePreset, resolveRadiusValue, resolveSlot, resolveVariantAlias, sidebarBorderClasses, sliderVariants, stringifyNajmDesignConfig, stringifyNajmThemeConfig, stringifyThemeFile, surfaceBorderClasses, swapVariants, toPickerHex, toggleVariants, tooltipContentVariants, truncateByCharacters, useClickOutside, useContextMenu, useDebouncedValue, useDelayedLoading, useDialog, useDialogStore, useDynamicPageSize, useFormField, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useNForm, useNPortalScope, useNSidebar, useNTableDefaults, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmThemeMode, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useTableStore, useVariant, useVariantPreset };
|
package/dist/index.mjs
CHANGED
|
@@ -2354,6 +2354,35 @@ var IconButton = React.forwardRef(
|
|
|
2354
2354
|
}
|
|
2355
2355
|
);
|
|
2356
2356
|
IconButton.displayName = "IconButton";
|
|
2357
|
+
var NSidebarContext = createContext(null);
|
|
2358
|
+
function useNSidebar() {
|
|
2359
|
+
return useContext(NSidebarContext);
|
|
2360
|
+
}
|
|
2361
|
+
function NSidebarProvider({
|
|
2362
|
+
children,
|
|
2363
|
+
defaultCollapsed = false,
|
|
2364
|
+
mobileBreakpoint = "md"
|
|
2365
|
+
}) {
|
|
2366
|
+
const [collapsed, setCollapsed] = useState(defaultCollapsed);
|
|
2367
|
+
const [mobileOpen, setMobileOpen] = useState(false);
|
|
2368
|
+
const openMobile = useCallback(() => setMobileOpen(true), []);
|
|
2369
|
+
const closeMobile = useCallback(() => setMobileOpen(false), []);
|
|
2370
|
+
const toggleCollapsed = useCallback(() => setCollapsed((prev) => !prev), []);
|
|
2371
|
+
const value = useMemo(
|
|
2372
|
+
() => ({
|
|
2373
|
+
collapsed,
|
|
2374
|
+
mobileOpen,
|
|
2375
|
+
openMobile,
|
|
2376
|
+
closeMobile,
|
|
2377
|
+
setMobileOpen,
|
|
2378
|
+
setCollapsed,
|
|
2379
|
+
toggleCollapsed,
|
|
2380
|
+
mobileBreakpoint
|
|
2381
|
+
}),
|
|
2382
|
+
[collapsed, mobileOpen, openMobile, closeMobile, toggleCollapsed, mobileBreakpoint]
|
|
2383
|
+
);
|
|
2384
|
+
return /* @__PURE__ */ jsx(NSidebarContext.Provider, { value, children });
|
|
2385
|
+
}
|
|
2357
2386
|
function NPageHeaderActions({ children, className }) {
|
|
2358
2387
|
return /* @__PURE__ */ jsx("div", { className: cn("flex shrink-0 items-center gap-0 lg:gap-1 xl:gap-2 2xl:gap-2", className), children });
|
|
2359
2388
|
}
|
|
@@ -2420,7 +2449,7 @@ function NPageHeader({
|
|
|
2420
2449
|
compactActions,
|
|
2421
2450
|
filters,
|
|
2422
2451
|
top,
|
|
2423
|
-
mobileBreakpoint
|
|
2452
|
+
mobileBreakpoint: mobileBreakpointProp,
|
|
2424
2453
|
onSidebarOpen,
|
|
2425
2454
|
sidebarTriggerLabel = "Open sidebar",
|
|
2426
2455
|
sidebarTriggerClassName,
|
|
@@ -2433,6 +2462,9 @@ function NPageHeader({
|
|
|
2433
2462
|
}) {
|
|
2434
2463
|
const [internalSearch, setInternalSearch] = useState("");
|
|
2435
2464
|
const recipe = useNajmComponentStyle("pageHeader");
|
|
2465
|
+
const sidebar = useNSidebar();
|
|
2466
|
+
const resolvedOnSidebarOpen = onSidebarOpen ?? sidebar?.openMobile;
|
|
2467
|
+
const mobileBreakpoint = mobileBreakpointProp ?? sidebar?.mobileBreakpoint ?? "md";
|
|
2436
2468
|
const searchValue = search?.value ?? internalSearch;
|
|
2437
2469
|
const handleSearchChange = useCallback((e) => {
|
|
2438
2470
|
setInternalSearch(e.currentTarget.value);
|
|
@@ -2450,7 +2482,12 @@ function NPageHeader({
|
|
|
2450
2482
|
const breakpointClasses = responsiveClasses[mobileBreakpoint];
|
|
2451
2483
|
const isCard = card ?? recipe?.card ?? bordered === true;
|
|
2452
2484
|
const recipeRadius = resolveRadiusValue(recipe?.radius);
|
|
2453
|
-
const
|
|
2485
|
+
const bleedStyle = isCard ? void 0 : {
|
|
2486
|
+
marginTop: "calc(var(--najm-section-gap, 0px) * -1)",
|
|
2487
|
+
marginInline: "calc(var(--najm-page-gutter, 0px) * -1)"
|
|
2488
|
+
};
|
|
2489
|
+
const recipeStyle = recipeRadius || recipe?.borderWidth || bleedStyle ? {
|
|
2490
|
+
...bleedStyle,
|
|
2454
2491
|
...recipeRadius ? { borderRadius: recipeRadius } : {},
|
|
2455
2492
|
...recipe?.borderWidth ? { borderWidth: recipe.borderWidth } : {}
|
|
2456
2493
|
} : void 0;
|
|
@@ -2464,14 +2501,6 @@ function NPageHeader({
|
|
|
2464
2501
|
className: cn(
|
|
2465
2502
|
isCard ? cn("rounded-xl bg-card text-card-foreground shadow-none", surfaceBorderClasses(true)) : cn(
|
|
2466
2503
|
"border-b bg-background text-foreground",
|
|
2467
|
-
/**
|
|
2468
|
-
* A non-card header is a full-bleed top bar, so it cancels the
|
|
2469
|
-
* page padding NPageLayout published. Without this it floats
|
|
2470
|
-
* below and inside that padding, and its bottom rule never meets
|
|
2471
|
-
* the sidebar header's. The 0px fallbacks keep the header inert
|
|
2472
|
-
* when it is used outside NPageLayout.
|
|
2473
|
-
*/
|
|
2474
|
-
"-mt-[var(--najm-section-gap,0px)] -mx-[var(--najm-page-gutter,0px)]",
|
|
2475
2504
|
surfaceBorderClasses(true, "bottom").replace("najm-border-b", "najm-border-b")
|
|
2476
2505
|
),
|
|
2477
2506
|
className
|
|
@@ -2490,13 +2519,13 @@ function NPageHeader({
|
|
|
2490
2519
|
headerClassName
|
|
2491
2520
|
),
|
|
2492
2521
|
children: [
|
|
2493
|
-
|
|
2522
|
+
resolvedOnSidebarOpen && /* @__PURE__ */ jsx(
|
|
2494
2523
|
Button,
|
|
2495
2524
|
{
|
|
2496
2525
|
type: "button",
|
|
2497
2526
|
variant: "ghost",
|
|
2498
2527
|
size: "icon",
|
|
2499
|
-
onClick:
|
|
2528
|
+
onClick: resolvedOnSidebarOpen,
|
|
2500
2529
|
"aria-label": sidebarTriggerLabel,
|
|
2501
2530
|
"data-slot": "page-header-sidebar-trigger",
|
|
2502
2531
|
className: cn(
|
|
@@ -4496,7 +4525,6 @@ function ThemeCustomizerComponentsLayoutTab({
|
|
|
4496
4525
|
["mobileWidth", labels.sidebarMobileWidth, 240]
|
|
4497
4526
|
].map(([key, label, placeholder]) => {
|
|
4498
4527
|
const current = components.sidebar?.[key];
|
|
4499
|
-
const factory = factoryComponents.sidebar?.[key];
|
|
4500
4528
|
const inputId = `najm-sidebar-${key}`;
|
|
4501
4529
|
const changeWidth = (delta) => {
|
|
4502
4530
|
if (disabled) return;
|
|
@@ -4517,9 +4545,6 @@ function ThemeCustomizerComponentsLayoutTab({
|
|
|
4517
4545
|
label,
|
|
4518
4546
|
htmlFor: inputId,
|
|
4519
4547
|
className: key === "mobileWidth" ? "col-span-2" : void 0,
|
|
4520
|
-
onReset: current !== factory ? () => handleResetComponentField("sidebar", key) : void 0,
|
|
4521
|
-
resetLabel: labels.resetField,
|
|
4522
|
-
resetAriaLabel: `${labels.resetField} ${labelText(label)}`.trim(),
|
|
4523
4548
|
disabled,
|
|
4524
4549
|
children: /* @__PURE__ */ jsxs("div", { className: "relative h-9 overflow-hidden rounded-md border border-input bg-card shadow-xs transition-[color,box-shadow] focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50", children: [
|
|
4525
4550
|
/* @__PURE__ */ jsx(
|
|
@@ -4578,24 +4603,6 @@ function ThemeCustomizerComponentsLayoutTab({
|
|
|
4578
4603
|
CustomizerField,
|
|
4579
4604
|
{
|
|
4580
4605
|
label: labels.sidebarSections,
|
|
4581
|
-
onReset: components.sidebar?.showSectionLabels !== factoryComponents.sidebar?.showSectionLabels || components.sidebar?.showSectionSeparators !== factoryComponents.sidebar?.showSectionSeparators ? () => {
|
|
4582
|
-
const withLabels = setComponentField(
|
|
4583
|
-
value,
|
|
4584
|
-
"sidebar",
|
|
4585
|
-
"showSectionLabels",
|
|
4586
|
-
factoryComponents.sidebar?.showSectionLabels
|
|
4587
|
-
);
|
|
4588
|
-
onChange(
|
|
4589
|
-
setComponentField(
|
|
4590
|
-
withLabels,
|
|
4591
|
-
"sidebar",
|
|
4592
|
-
"showSectionSeparators",
|
|
4593
|
-
factoryComponents.sidebar?.showSectionSeparators
|
|
4594
|
-
)
|
|
4595
|
-
);
|
|
4596
|
-
} : void 0,
|
|
4597
|
-
resetLabel: labels.resetField,
|
|
4598
|
-
resetAriaLabel: `${labels.resetField} ${labelText(labels.sidebarSections)}`.trim(),
|
|
4599
4606
|
disabled,
|
|
4600
4607
|
children: /* @__PURE__ */ jsx(
|
|
4601
4608
|
MultiSelectInput,
|
|
@@ -12538,6 +12545,7 @@ var createTableStore = (seed) => {
|
|
|
12538
12545
|
manualPagination: false,
|
|
12539
12546
|
pageCount: void 0,
|
|
12540
12547
|
rowCount: void 0,
|
|
12548
|
+
hasNextPage: void 0,
|
|
12541
12549
|
pagination: { pageIndex: 0, pageSize: 10 },
|
|
12542
12550
|
isPaginationControlled: false,
|
|
12543
12551
|
onPaginationChange: null,
|
|
@@ -14011,7 +14019,12 @@ function NTableCards({ effectiveMode }) {
|
|
|
14011
14019
|
}
|
|
14012
14020
|
|
|
14013
14021
|
// src/components/table/paginationPages.ts
|
|
14014
|
-
function buildPageItems(pageIndex, pageCount, siblingCount = 1) {
|
|
14022
|
+
function buildPageItems(pageIndex, pageCount, siblingCount = 1, unbounded = false) {
|
|
14023
|
+
const items = buildKnownPageItems(pageIndex, pageCount, siblingCount);
|
|
14024
|
+
if (!unbounded || items.length === 0) return items;
|
|
14025
|
+
return [...items, { type: "gap", key: "end" }];
|
|
14026
|
+
}
|
|
14027
|
+
function buildKnownPageItems(pageIndex, pageCount, siblingCount) {
|
|
14015
14028
|
const pages = Math.max(0, Math.floor(pageCount));
|
|
14016
14029
|
if (pages <= 0) return [];
|
|
14017
14030
|
const current = Math.min(Math.max(0, Math.floor(pageIndex)), pages - 1);
|
|
@@ -14167,14 +14180,38 @@ function CardLoadMorePagination({
|
|
|
14167
14180
|
}
|
|
14168
14181
|
var navButtonClass = "h-8 w-8 p-0 text-foreground disabled:text-muted-foreground disabled:opacity-70";
|
|
14169
14182
|
var chevronClass = "h-4 w-4 rtl:-scale-x-100";
|
|
14183
|
+
function useLowerBoundPageCountWarning(manualPagination, pageCount, pagination) {
|
|
14184
|
+
const previous = React__default.useRef(null);
|
|
14185
|
+
const warned = React__default.useRef(false);
|
|
14186
|
+
React__default.useEffect(() => {
|
|
14187
|
+
if (typeof console === "undefined") return;
|
|
14188
|
+
if (typeof process !== "undefined" && process.env?.NODE_ENV === "production") return;
|
|
14189
|
+
if (!manualPagination || pageCount === void 0 || !pagination) {
|
|
14190
|
+
previous.current = null;
|
|
14191
|
+
return;
|
|
14192
|
+
}
|
|
14193
|
+
const last = previous.current;
|
|
14194
|
+
previous.current = { ...pagination, pageCount };
|
|
14195
|
+
if (!last || warned.current) return;
|
|
14196
|
+
if (last.pageSize !== pagination.pageSize) return;
|
|
14197
|
+
const advanced = pagination.pageIndex - last.pageIndex;
|
|
14198
|
+
if (advanced <= 0 || pageCount - last.pageCount !== advanced) return;
|
|
14199
|
+
if (pageCount - pagination.pageIndex > 2) return;
|
|
14200
|
+
warned.current = true;
|
|
14201
|
+
console.warn(
|
|
14202
|
+
"NTable received a pageCount that grew with the page index, so it is a lower bound rather than a result total and the numbered bar would gain a page button per click. For a list whose endpoint reports no total, drop pageCount and pass hasNextPage instead."
|
|
14203
|
+
);
|
|
14204
|
+
}, [manualPagination, pageCount, pagination]);
|
|
14205
|
+
}
|
|
14170
14206
|
function PageNumbers({
|
|
14171
14207
|
pageIndex,
|
|
14172
14208
|
pageCount,
|
|
14209
|
+
unbounded,
|
|
14173
14210
|
bordered,
|
|
14174
14211
|
labels,
|
|
14175
14212
|
onSelect
|
|
14176
14213
|
}) {
|
|
14177
|
-
return /* @__PURE__ */ jsx(Fragment, { children: buildPageItems(pageIndex, pageCount).map((item) => {
|
|
14214
|
+
return /* @__PURE__ */ jsx(Fragment, { children: buildPageItems(pageIndex, pageCount, 1, unbounded).map((item) => {
|
|
14178
14215
|
if (item.type === "gap") {
|
|
14179
14216
|
return /* @__PURE__ */ jsx(
|
|
14180
14217
|
"span",
|
|
@@ -14216,12 +14253,14 @@ function NTablePagination() {
|
|
|
14216
14253
|
const manualPagination = useTableStore.use.manualPagination();
|
|
14217
14254
|
const pageCount = useTableStore.use.pageCount();
|
|
14218
14255
|
const rowCount = useTableStore.use.rowCount();
|
|
14256
|
+
const suppliedHasNextPage = useTableStore.use.hasNextPage();
|
|
14219
14257
|
const setPagination = useTableStore.use.setPagination();
|
|
14220
14258
|
const isPaginationControlled = useTableStore.use.isPaginationControlled();
|
|
14221
14259
|
const bordered = useTableStore.use.bordered();
|
|
14222
14260
|
const paginationVariant = useTableStore.use.paginationVariant();
|
|
14223
14261
|
const ownLabels = useTableStore.use.paginationLabels();
|
|
14224
14262
|
const labels = useResolvedPaginationLabels(ownLabels);
|
|
14263
|
+
useLowerBoundPageCountWarning(manualPagination, pageCount, pagination);
|
|
14225
14264
|
if (!showPagination || effectiveViewMode === "json" || effectiveViewMode === "files") return null;
|
|
14226
14265
|
if (cardPagination.mode === "all") return null;
|
|
14227
14266
|
if (effectiveViewMode === "cards" && cardPagination.mode === "infinite") return null;
|
|
@@ -14239,7 +14278,8 @@ function NTablePagination() {
|
|
|
14239
14278
|
const filteredRows = table ? table.getFilteredRowModel().rows : [];
|
|
14240
14279
|
const selectedRows = table ? table.getFilteredSelectedRowModel().rows : [];
|
|
14241
14280
|
const { pageIndex, pageSize } = table ? table.getState().pagination : pagination;
|
|
14242
|
-
const
|
|
14281
|
+
const unbounded = manualPagination && pageCount === void 0 && suppliedHasNextPage !== void 0;
|
|
14282
|
+
const effectivePageCount = manualPagination && pageCount !== void 0 ? pageCount : unbounded ? pageIndex + (suppliedHasNextPage ? 2 : 1) : table ? table.getPageCount() : 1;
|
|
14243
14283
|
const currentPagination = pagination ?? { pageIndex, pageSize };
|
|
14244
14284
|
const currentPageSizeOptions = pageSizeOptions.includes(pageSize) ? pageSizeOptions : [...pageSizeOptions, pageSize].sort((a, b) => a - b);
|
|
14245
14285
|
const navigate = (direction) => {
|
|
@@ -14264,10 +14304,11 @@ function NTablePagination() {
|
|
|
14264
14304
|
const newSize = Number(value);
|
|
14265
14305
|
setPagination({ pageIndex: 0, pageSize: newSize });
|
|
14266
14306
|
};
|
|
14267
|
-
const hasTrustworthyPageCount = manualPagination ? pageCount !== void 0 && pageCount > 0 : effectivePageCount > 0;
|
|
14307
|
+
const hasTrustworthyPageCount = manualPagination ? pageCount !== void 0 && pageCount > 0 || unbounded : effectivePageCount > 0;
|
|
14268
14308
|
const showNumbers = paginationVariant === "numbered" && hasTrustworthyPageCount;
|
|
14269
14309
|
const canPrevious = (table?.getCanPreviousPage?.() ?? pageIndex > 0) && pageIndex > 0;
|
|
14270
|
-
const canNext = (table?.getCanNextPage?.() ?? true) && pageIndex < effectivePageCount - 1;
|
|
14310
|
+
const canNext = unbounded ? Boolean(suppliedHasNextPage) : (table?.getCanNextPage?.() ?? true) && pageIndex < effectivePageCount - 1;
|
|
14311
|
+
const canLast = canNext && !unbounded;
|
|
14271
14312
|
const selectedTotal = manualPagination && rowCount !== void 0 ? rowCount : filteredRows.length;
|
|
14272
14313
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex w-full min-w-0 flex-wrap items-center justify-between gap-x-4 gap-y-2 py-1 text-foreground", classNames?.pagination), children: [
|
|
14273
14314
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-4 lg:gap-6", children: [
|
|
@@ -14285,7 +14326,7 @@ function NTablePagination() {
|
|
|
14285
14326
|
/* @__PURE__ */ jsx(SelectContent, { side: "top", children: currentPageSizeOptions.map((size) => /* @__PURE__ */ jsx(SelectItem, { value: `${size}`, children: size }, size)) })
|
|
14286
14327
|
] })
|
|
14287
14328
|
] }),
|
|
14288
|
-
/* @__PURE__ */ jsx("div", { className: cn("text-sm font-medium text-foreground", showNumbers && "sm:hidden"), children: labels.pageOf?.(pageIndex + 1, effectivePageCount) ?? `Page ${pageIndex + 1} of ${effectivePageCount}` }),
|
|
14329
|
+
/* @__PURE__ */ jsx("div", { className: cn("text-sm font-medium text-foreground", showNumbers && "sm:hidden"), children: unbounded ? labels.pageOfUnknown?.(pageIndex + 1) ?? `Page ${pageIndex + 1}` : labels.pageOf?.(pageIndex + 1, effectivePageCount) ?? `Page ${pageIndex + 1} of ${effectivePageCount}` }),
|
|
14289
14330
|
/* @__PURE__ */ jsxs(
|
|
14290
14331
|
"nav",
|
|
14291
14332
|
{
|
|
@@ -14299,13 +14340,14 @@ function NTablePagination() {
|
|
|
14299
14340
|
{
|
|
14300
14341
|
pageIndex,
|
|
14301
14342
|
pageCount: effectivePageCount,
|
|
14343
|
+
unbounded: unbounded && Boolean(suppliedHasNextPage),
|
|
14302
14344
|
bordered,
|
|
14303
14345
|
labels,
|
|
14304
14346
|
onSelect: (next) => setPagination({ ...currentPagination, pageIndex: next })
|
|
14305
14347
|
}
|
|
14306
14348
|
) }),
|
|
14307
14349
|
/* @__PURE__ */ jsx(Button, { bordered, variant: "outline", className: navButtonClass, "aria-label": labels.nextPage ?? "Next", onClick: () => navigate("next"), disabled: !canNext, children: /* @__PURE__ */ jsx(ChevronRight, { className: chevronClass }) }),
|
|
14308
|
-
!showNumbers && /* @__PURE__ */ jsx(Button, { bordered, variant: "outline", className: cn(navButtonClass, "hidden lg:flex"), "aria-label": labels.lastPage ?? "Last page", onClick: () => navigate("last"), disabled: !
|
|
14350
|
+
!showNumbers && /* @__PURE__ */ jsx(Button, { bordered, variant: "outline", className: cn(navButtonClass, "hidden lg:flex"), "aria-label": labels.lastPage ?? "Last page", onClick: () => navigate("last"), disabled: !canLast, children: /* @__PURE__ */ jsx(ChevronsRight, { className: chevronClass }) })
|
|
14309
14351
|
]
|
|
14310
14352
|
}
|
|
14311
14353
|
)
|
|
@@ -14894,6 +14936,7 @@ function NTable(props) {
|
|
|
14894
14936
|
manualPagination: props.manualPagination ?? false,
|
|
14895
14937
|
pageCount: props.pageCount,
|
|
14896
14938
|
rowCount: props.rowCount,
|
|
14939
|
+
hasNextPage: props.hasNextPage,
|
|
14897
14940
|
pagination: props.pagination,
|
|
14898
14941
|
defaultPagination: props.defaultPagination,
|
|
14899
14942
|
onPaginationChange: props.onPaginationChange ?? null,
|
|
@@ -15721,7 +15764,7 @@ function NSidebar({
|
|
|
15721
15764
|
footer,
|
|
15722
15765
|
className,
|
|
15723
15766
|
classNames,
|
|
15724
|
-
mobileBreakpoint
|
|
15767
|
+
mobileBreakpoint: mobileBreakpointProp,
|
|
15725
15768
|
autoCollapseAt,
|
|
15726
15769
|
mobileOpen: mobileOpenProp,
|
|
15727
15770
|
defaultMobileOpen = false,
|
|
@@ -15746,22 +15789,31 @@ function NSidebar({
|
|
|
15746
15789
|
const recipe = useNajmComponentStyle("sidebar");
|
|
15747
15790
|
const [_mobileOpen, _setMobileOpen] = useState(defaultMobileOpen);
|
|
15748
15791
|
const [_collapsed, _setCollapsed] = useState(defaultCollapsed);
|
|
15749
|
-
const
|
|
15750
|
-
const
|
|
15751
|
-
const
|
|
15792
|
+
const sidebar = useNSidebar();
|
|
15793
|
+
const isMobileControlled = mobileOpenProp !== void 0;
|
|
15794
|
+
const isCollapsedControlled = collapsedProp !== void 0;
|
|
15795
|
+
const mobileOpen = isMobileControlled ? mobileOpenProp : sidebar?.mobileOpen ?? _mobileOpen;
|
|
15796
|
+
const collapsed = isCollapsedControlled ? collapsedProp : sidebar?.collapsed ?? _collapsed;
|
|
15797
|
+
const mobileBreakpoint = mobileBreakpointProp ?? sidebar?.mobileBreakpoint ?? "md";
|
|
15752
15798
|
const autoCollapsed = useAutoCollapsed(autoCollapseAt);
|
|
15753
15799
|
const desktopCollapsed = collapsed || autoCollapsed;
|
|
15754
15800
|
const setMobileOpen = (open) => {
|
|
15755
|
-
if (!
|
|
15801
|
+
if (!isMobileControlled) {
|
|
15802
|
+
if (sidebar) sidebar.setMobileOpen(open);
|
|
15803
|
+
else _setMobileOpen(open);
|
|
15804
|
+
}
|
|
15756
15805
|
onMobileOpenChange?.(open);
|
|
15757
15806
|
};
|
|
15758
15807
|
const [railDragging, setRailDragging] = useState(false);
|
|
15759
15808
|
const suppressRailClickRef = useRef(false);
|
|
15760
15809
|
const setCollapsedState = useCallback((next) => {
|
|
15761
15810
|
if (next === collapsed) return;
|
|
15762
|
-
if (
|
|
15811
|
+
if (!isCollapsedControlled) {
|
|
15812
|
+
if (sidebar) sidebar.setCollapsed(next);
|
|
15813
|
+
else _setCollapsed(next);
|
|
15814
|
+
}
|
|
15763
15815
|
onCollapsedChange?.(next);
|
|
15764
|
-
}, [collapsed,
|
|
15816
|
+
}, [collapsed, isCollapsedControlled, sidebar, onCollapsedChange]);
|
|
15765
15817
|
const handleToggleCollapsed = useCallback(() => {
|
|
15766
15818
|
setCollapsedState(!collapsed);
|
|
15767
15819
|
}, [collapsed, setCollapsedState]);
|
|
@@ -15832,8 +15884,9 @@ function NSidebar({
|
|
|
15832
15884
|
const contentStyle = contentSlot?.paddingTop ? { paddingTop: contentSlot.paddingTop } : void 0;
|
|
15833
15885
|
const desktopDefaultLogoContent = logoIcon || logoTitle || logoSubtitle ? /* @__PURE__ */ jsx(NSidebarLogo, { icon: logoIcon, title: logoTitle, subtitle: logoSubtitle, onClick: onLogoClick, collapsed: desktopCollapsed }) : null;
|
|
15834
15886
|
const mobileDefaultLogoContent = logoIcon || logoTitle || logoSubtitle ? /* @__PURE__ */ jsx(NSidebarLogo, { icon: logoIcon, title: logoTitle, subtitle: logoSubtitle, onClick: onLogoClick, collapsed: false }) : null;
|
|
15835
|
-
const
|
|
15836
|
-
const
|
|
15887
|
+
const renderLogo = (isMobile) => typeof logo === "function" ? logo({ collapsed: isMobile ? false : desktopCollapsed, isMobile }) : logo;
|
|
15888
|
+
const desktopHeaderContent = renderLogo(false) ?? desktopDefaultLogoContent;
|
|
15889
|
+
const mobileHeaderContent = renderLogo(true) ?? mobileDefaultLogoContent;
|
|
15837
15890
|
const contentProps = {
|
|
15838
15891
|
groups,
|
|
15839
15892
|
activePath,
|
|
@@ -16276,4 +16329,4 @@ function NGridItem({
|
|
|
16276
16329
|
return /* @__PURE__ */ jsx("div", { className: itemClassName, ...props, children });
|
|
16277
16330
|
}
|
|
16278
16331
|
|
|
16279
|
-
export { Alert, NCard as AsyncCard, Avatar, AvatarFallback, AvatarFormInput, AvatarGroup, AvatarImage, AvatarInput, 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, DEFAULT_THEME_FILE_NAME, 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, Indicator4 as Indicator, Input, Label2 as Label, LangInput, MultiSelectInput, NAJM_COMPONENT_NAMES, NAJM_SAVED_THEME_VALUE, NAlert, NAppShell, NCard as NAsyncCard, NAvatar, NBadge, NBarChart, NBulkActionsBar, NButton, NCard, NCardAction, NCardFooter, NCardInfo, NCardMedia, NCardSection, NChartSkeleton, 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, NLineChart, NLoadingState, NMultiDialog, NNavbar, NPageHeader, NPageHeaderActions, NPageHeaderCompactActions, NPageHeaderFilters, NPageHeaderTop, NPageLayout, NPieChart, 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, NStatusBreakdown, Swap as NSwap, NTable, NTableCardRoot, NTableCards, NTableContent, NTableDefaultsProvider, NTableHeader, NTableJson, NTableLoadingSkeleton, NTablePagination, NTableRowSkeleton, NTableSkeleton, NTabs, NThemeCustomizer, NThemePresets, NUploader, NViewBody, NViewToggle, NajmDesignProvider, NajmScroll, NajmThemeProvider, NativeSelect, NumberInput, OtpInput, PasswordInput, PhoneInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PrefixProvider, Progress, RADIUS_VALUE_MAP, 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, buildPageItems, buttonVariants, cn, composePreset, createDialogStore, createTableStore, defineNajmDesignConfig, defineNajmThemeConfig, detectFormat, dialogVariants, filterResponsiveColumns, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNChartColor, getNextEditorTabValue, hiddenBelowClasses, indicatorVariants, inputBorderClasses, normalizeThemeFileName, parseColor, parseNajmDesignConfig, parseNajmThemeConfig, parseThemeFile, resolveHiddenBelowClass, resolvePreset, resolveRadiusValue, resolveSlot, resolveVariantAlias, sidebarBorderClasses, sliderVariants, stringifyNajmDesignConfig, stringifyNajmThemeConfig, stringifyThemeFile, surfaceBorderClasses, swapVariants, toPickerHex, toggleVariants, tooltipContentVariants, truncateByCharacters, useClickOutside, useContextMenu, useDebouncedValue, useDelayedLoading, useDialog, useDialogStore, useDynamicPageSize, useFormField, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useNForm, useNPortalScope, useNTableDefaults, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmThemeMode, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useTableStore, useVariant, useVariantPreset };
|
|
16332
|
+
export { Alert, NCard as AsyncCard, Avatar, AvatarFallback, AvatarFormInput, AvatarGroup, AvatarImage, AvatarInput, 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, DEFAULT_THEME_FILE_NAME, 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, Indicator4 as Indicator, Input, Label2 as Label, LangInput, MultiSelectInput, NAJM_COMPONENT_NAMES, NAJM_SAVED_THEME_VALUE, NAlert, NAppShell, NCard as NAsyncCard, NAvatar, NBadge, NBarChart, NBulkActionsBar, NButton, NCard, NCardAction, NCardFooter, NCardInfo, NCardMedia, NCardSection, NChartSkeleton, 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, NLineChart, NLoadingState, NMultiDialog, NNavbar, NPageHeader, NPageHeaderActions, NPageHeaderCompactActions, NPageHeaderFilters, NPageHeaderTop, NPageLayout, NPieChart, NPortalScopeProvider, NProgress, NRowActions, NSection, NSectionHeader, NSectionInfo, NSectionWithInfo, NSheet, NSidebar, NSidebarContent, NSidebarFooter, NSidebarHeader, NSidebarItem, NSidebarLogo, NSidebarMobile, NSidebarProvider, NSidebarSection, NSkeleton, NSkeletonCalendar, NSkeletonChart, NSkeletonDonut, NSkeletonEventList, NSkeletonWidget, NSkeletonWidgets, NSlider, NSmartPasteDialog, NSpinner, NStatCard, NStatCardSkeleton, NStatusBreakdown, Swap as NSwap, NTable, NTableCardRoot, NTableCards, NTableContent, NTableDefaultsProvider, NTableHeader, NTableJson, NTableLoadingSkeleton, NTablePagination, NTableRowSkeleton, NTableSkeleton, NTabs, NThemeCustomizer, NThemePresets, NUploader, NViewBody, NViewToggle, NajmDesignProvider, NajmScroll, NajmThemeProvider, NativeSelect, NumberInput, OtpInput, PasswordInput, PhoneInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PrefixProvider, Progress, RADIUS_VALUE_MAP, 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, buildPageItems, buttonVariants, cn, composePreset, createDialogStore, createTableStore, defineNajmDesignConfig, defineNajmThemeConfig, detectFormat, dialogVariants, filterResponsiveColumns, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNChartColor, getNextEditorTabValue, hiddenBelowClasses, indicatorVariants, inputBorderClasses, normalizeThemeFileName, parseColor, parseNajmDesignConfig, parseNajmThemeConfig, parseThemeFile, resolveHiddenBelowClass, resolvePreset, resolveRadiusValue, resolveSlot, resolveVariantAlias, sidebarBorderClasses, sliderVariants, stringifyNajmDesignConfig, stringifyNajmThemeConfig, stringifyThemeFile, surfaceBorderClasses, swapVariants, toPickerHex, toggleVariants, tooltipContentVariants, truncateByCharacters, useClickOutside, useContextMenu, useDebouncedValue, useDelayedLoading, useDialog, useDialogStore, useDynamicPageSize, useFormField, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useNForm, useNPortalScope, useNSidebar, useNTableDefaults, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmThemeMode, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useTableStore, useVariant, useVariantPreset };
|