najm-kit 2.6.2 → 2.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +72 -19
- package/dist/index.mjs +97 -45
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { RefObject, ReactNode, ComponentType, InputHTMLAttributes, Ref, CSSProperties, MouseEvent, MouseEventHandler } from 'react';
|
|
3
|
+
import React__default, { RefObject, ReactNode, ComponentType, InputHTMLAttributes, Ref, ImgHTMLAttributes, CSSProperties, MouseEvent, MouseEventHandler } from 'react';
|
|
4
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
5
|
import { VariantProps } from 'class-variance-authority';
|
|
6
6
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
@@ -1227,6 +1227,43 @@ interface NajmScrollProps extends Omit<OverlayScrollbarsComponentProps, "options
|
|
|
1227
1227
|
*/
|
|
1228
1228
|
declare function NajmScroll({ className, axis, autoHide, viewportRef, events, options, element, children, style, ...props }: NajmScrollProps): react_jsx_runtime.JSX.Element;
|
|
1229
1229
|
|
|
1230
|
+
interface NImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "onError"> {
|
|
1231
|
+
src: string;
|
|
1232
|
+
/** Swapped in when `src` fails to load. */
|
|
1233
|
+
fallback?: string;
|
|
1234
|
+
}
|
|
1235
|
+
/**
|
|
1236
|
+
* Display-only image with error recovery. Deliberately a plain `<img>`: the
|
|
1237
|
+
* caller's CSS box owns the size, so there is nothing for a framework image
|
|
1238
|
+
* component to reserve or downscale.
|
|
1239
|
+
*/
|
|
1240
|
+
declare function NImage({ src, fallback, alt, ...rest }: NImageProps): react_jsx_runtime.JSX.Element;
|
|
1241
|
+
|
|
1242
|
+
interface NBrandingValue {
|
|
1243
|
+
/** Used as the logo's `alt` when the logo does not set one. */
|
|
1244
|
+
appName?: string;
|
|
1245
|
+
logoExpanded?: ReactNode | string;
|
|
1246
|
+
/** Falls back to `logoExpanded`. */
|
|
1247
|
+
logoCollapsed?: ReactNode | string;
|
|
1248
|
+
/** Swapped in when a `string` logo fails to load. */
|
|
1249
|
+
logoFallback?: string;
|
|
1250
|
+
logoHref?: string;
|
|
1251
|
+
}
|
|
1252
|
+
/** Returns `null` outside a provider, so every consumer stays optional. */
|
|
1253
|
+
declare function useNBranding(): NBrandingValue | null;
|
|
1254
|
+
/**
|
|
1255
|
+
* Publishes the app's marks once, so shells stop threading a `logo` through
|
|
1256
|
+
* every surface that shows one. `NSidebar` reads this when no `logo` prop is
|
|
1257
|
+
* given; an explicit `logo` always wins.
|
|
1258
|
+
*
|
|
1259
|
+
* Unlike `NSidebarProvider` this owns no state — the values are resolved by the
|
|
1260
|
+
* app (usually server-side) and only forwarded, so memoizing on the fields is
|
|
1261
|
+
* correct here.
|
|
1262
|
+
*/
|
|
1263
|
+
declare function NBrandingProvider({ children, appName, logoExpanded, logoCollapsed, logoFallback, logoHref, }: Readonly<NBrandingValue & {
|
|
1264
|
+
children: ReactNode;
|
|
1265
|
+
}>): react_jsx_runtime.JSX.Element;
|
|
1266
|
+
|
|
1230
1267
|
type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
1231
1268
|
type AvatarShape$1 = "circle" | "rounded" | "square";
|
|
1232
1269
|
type AvatarStatusType = "online" | "offline" | "busy" | "away";
|
|
@@ -3994,6 +4031,7 @@ interface NAppShellClassNames {
|
|
|
3994
4031
|
sidebar?: string;
|
|
3995
4032
|
sidebarItem?: string;
|
|
3996
4033
|
sidebarHeader?: string;
|
|
4034
|
+
sidebarLogo?: string;
|
|
3997
4035
|
sidebarFooter?: string;
|
|
3998
4036
|
navbar?: string;
|
|
3999
4037
|
content?: string;
|
|
@@ -4014,8 +4052,32 @@ type SidebarLogoRender = (state: {
|
|
|
4014
4052
|
collapsed: boolean;
|
|
4015
4053
|
isMobile: boolean;
|
|
4016
4054
|
}) => ReactNode;
|
|
4055
|
+
/**
|
|
4056
|
+
* Declarative form of `logo`. The sidebar owns the box, the fit and the
|
|
4057
|
+
* collapsed/expanded switch so every app renders the mark identically; the
|
|
4058
|
+
* consumer only says which asset. A `string` slot renders through `NImage`,
|
|
4059
|
+
* a `ReactNode` slot is placed in the same box untouched.
|
|
4060
|
+
*/
|
|
4061
|
+
interface SidebarLogo {
|
|
4062
|
+
/**
|
|
4063
|
+
* `mark` (default) frames logo artwork in a fixed box. `chip` is the icon
|
|
4064
|
+
* treatment: a square, tinted pill sized for a lucide-style glyph.
|
|
4065
|
+
*/
|
|
4066
|
+
variant?: "mark" | "chip";
|
|
4067
|
+
expanded?: ReactNode | string;
|
|
4068
|
+
/** Falls back to `expanded`, rendered in the collapsed box. */
|
|
4069
|
+
collapsed?: ReactNode | string;
|
|
4070
|
+
/** Swapped in when a `string` slot fails to load. */
|
|
4071
|
+
fallback?: string;
|
|
4072
|
+
/** Defaults to the app name from `NBrandingProvider`. */
|
|
4073
|
+
alt?: string;
|
|
4074
|
+
href?: string;
|
|
4075
|
+
onClick?: () => void;
|
|
4076
|
+
title?: string;
|
|
4077
|
+
subtitle?: string;
|
|
4078
|
+
}
|
|
4017
4079
|
interface SidebarProps {
|
|
4018
|
-
logo?: ReactNode | SidebarLogoRender;
|
|
4080
|
+
logo?: ReactNode | SidebarLogoRender | SidebarLogo;
|
|
4019
4081
|
navItems?: NavItem[];
|
|
4020
4082
|
activePath?: string;
|
|
4021
4083
|
isActive?: (item: NavItem, activePath: string) => boolean;
|
|
@@ -4062,12 +4124,6 @@ interface SidebarProps {
|
|
|
4062
4124
|
* `mobileOpen` from an NPageHeader via its `onSidebarOpen` prop.
|
|
4063
4125
|
*/
|
|
4064
4126
|
showHamburgerButton?: boolean;
|
|
4065
|
-
logoIcon?: ComponentType<{
|
|
4066
|
-
className?: string;
|
|
4067
|
-
}> | ReactNode;
|
|
4068
|
-
logoTitle?: string;
|
|
4069
|
-
logoSubtitle?: string;
|
|
4070
|
-
onLogoClick?: () => void;
|
|
4071
4127
|
onSettings?: () => void;
|
|
4072
4128
|
settingsLabel?: string;
|
|
4073
4129
|
onLogout?: () => void;
|
|
@@ -4089,14 +4145,11 @@ interface NSidebarHeaderProps {
|
|
|
4089
4145
|
className?: string;
|
|
4090
4146
|
classNames?: NAppShellClassNames;
|
|
4091
4147
|
}
|
|
4092
|
-
interface
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
subtitle?: string;
|
|
4098
|
-
onClick?: () => void;
|
|
4099
|
-
collapsed?: boolean;
|
|
4148
|
+
interface NSidebarBrandProps {
|
|
4149
|
+
logo: SidebarLogo;
|
|
4150
|
+
collapsed: boolean;
|
|
4151
|
+
linkComponent?: LinkComponentType;
|
|
4152
|
+
className?: string;
|
|
4100
4153
|
}
|
|
4101
4154
|
interface NSidebarContentProps {
|
|
4102
4155
|
groups: NavItemGroup[];
|
|
@@ -4155,7 +4208,7 @@ interface NSidebarMobileProps {
|
|
|
4155
4208
|
|
|
4156
4209
|
declare function NSidebarHeader({ children, collapsed, className, classNames }: NSidebarHeaderProps): react_jsx_runtime.JSX.Element;
|
|
4157
4210
|
|
|
4158
|
-
declare function
|
|
4211
|
+
declare function NSidebarBrand({ logo, collapsed, linkComponent: Link, className }: NSidebarBrandProps): react_jsx_runtime.JSX.Element;
|
|
4159
4212
|
|
|
4160
4213
|
declare function NSidebarContent({ groups, activePath, isActive, onNavigate, linkComponent, collapsed, showSectionLabels, showSectionIcons, showSectionSeparators, contentStyle, classNames, }: NSidebarContentProps): react_jsx_runtime.JSX.Element;
|
|
4161
4214
|
|
|
@@ -4196,7 +4249,7 @@ declare function NSidebarProvider({ children, defaultCollapsed, mobileBreakpoint
|
|
|
4196
4249
|
mobileBreakpoint?: "sm" | "md" | "lg";
|
|
4197
4250
|
}>): react_jsx_runtime.JSX.Element;
|
|
4198
4251
|
|
|
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,
|
|
4252
|
+
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, onSettings, settingsLabel, onLogout, logoutLabel, widths, }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
4200
4253
|
|
|
4201
4254
|
declare function NSidebarItem({ item, activePath, isActive, onNavigate, linkComponent: LinkComponent, collapsed, depth, classNames, }: SidebarItemProps): react_jsx_runtime.JSX.Element;
|
|
4202
4255
|
|
|
@@ -4338,4 +4391,4 @@ interface NGridItemProps extends Omit<React$1.AllHTMLAttributes<HTMLDivElement>,
|
|
|
4338
4391
|
declare function NGrid({ as: Comp, children, cols, smCols, mdCols, lgCols, xlCols, gap, className, style, ...props }: NGridProps): react_jsx_runtime.JSX.Element;
|
|
4339
4392
|
declare function NGridItem({ children, span, smSpan, mdSpan, lgSpan, xlSpan, className, ...props }: NGridItemProps): react_jsx_runtime.JSX.Element;
|
|
4340
4393
|
|
|
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 };
|
|
4394
|
+
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, NBrandingProvider, type NBrandingValue, 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, NImage, type NImageProps, 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, NSidebarBrand, type NSidebarBrandProps, NSidebarContent, type NSidebarContentProps, type NSidebarContextValue, NSidebarFooter, type NSidebarFooterProps, NSidebarHeader, type NSidebarHeaderProps, NSidebarItem, 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 SidebarLogo, 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, useNBranding, useNForm, useNPortalScope, useNSidebar, useNTableDefaults, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmThemeMode, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useTableStore, useVariant, useVariantPreset };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { createContext, useRef, useMemo, useContext, useState, useEffect, useCallback, useLayoutEffect } from 'react';
|
|
2
|
+
import React__default, { createContext, useRef, useMemo, useContext, useState, useEffect, useCallback, useLayoutEffect, isValidElement } from 'react';
|
|
3
3
|
import { Slot } from '@radix-ui/react-slot';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
@@ -8704,6 +8704,29 @@ function ScrollArea({ className, children, ...props }) {
|
|
|
8704
8704
|
}
|
|
8705
8705
|
) });
|
|
8706
8706
|
}
|
|
8707
|
+
function NImage({ src, fallback, alt = "", ...rest }) {
|
|
8708
|
+
const [failed, setFailed] = useState(null);
|
|
8709
|
+
const resolved = failed === src && fallback ? fallback : src;
|
|
8710
|
+
return /* @__PURE__ */ jsx("img", { ...rest, alt, src: resolved, onError: () => setFailed(src) });
|
|
8711
|
+
}
|
|
8712
|
+
var NBrandingContext = createContext(null);
|
|
8713
|
+
function useNBranding() {
|
|
8714
|
+
return useContext(NBrandingContext);
|
|
8715
|
+
}
|
|
8716
|
+
function NBrandingProvider({
|
|
8717
|
+
children,
|
|
8718
|
+
appName,
|
|
8719
|
+
logoExpanded,
|
|
8720
|
+
logoCollapsed,
|
|
8721
|
+
logoFallback,
|
|
8722
|
+
logoHref
|
|
8723
|
+
}) {
|
|
8724
|
+
const value = useMemo(
|
|
8725
|
+
() => ({ appName, logoExpanded, logoCollapsed, logoFallback, logoHref }),
|
|
8726
|
+
[appName, logoExpanded, logoCollapsed, logoFallback, logoHref]
|
|
8727
|
+
);
|
|
8728
|
+
return /* @__PURE__ */ jsx(NBrandingContext.Provider, { value, children });
|
|
8729
|
+
}
|
|
8707
8730
|
var avatarVariants = cva(
|
|
8708
8731
|
"relative flex shrink-0 overflow-hidden",
|
|
8709
8732
|
{
|
|
@@ -15340,42 +15363,45 @@ function NSidebarHeader({ children, collapsed, className, classNames }) {
|
|
|
15340
15363
|
className
|
|
15341
15364
|
), children });
|
|
15342
15365
|
}
|
|
15343
|
-
|
|
15344
|
-
|
|
15345
|
-
|
|
15346
|
-
|
|
15347
|
-
|
|
15348
|
-
|
|
15349
|
-
|
|
15350
|
-
|
|
15351
|
-
const
|
|
15352
|
-
|
|
15353
|
-
|
|
15354
|
-
|
|
15355
|
-
|
|
15356
|
-
|
|
15357
|
-
|
|
15358
|
-
|
|
15359
|
-
|
|
15360
|
-
|
|
15361
|
-
|
|
15362
|
-
|
|
15363
|
-
|
|
15364
|
-
{
|
|
15365
|
-
className: cn(
|
|
15366
|
-
"size-10 rounded-lg bg-sidebar-primary/10 flex items-center justify-center shrink-0",
|
|
15367
|
-
collapsed && "ml-[calc((var(--rail,4rem)-var(--sidebar-edge-width,0px))/2-var(--spacing,0.25rem)-var(--spacing,0.25rem)-var(--spacing,0.25rem)-var(--spacing,0.25rem)-var(--spacing,0.25rem)-var(--spacing,0.25rem)-var(--spacing,0.25rem)-var(--spacing,0.25rem)-var(--spacing,0.25rem))]"
|
|
15368
|
-
),
|
|
15369
|
-
children: IconNode
|
|
15370
|
-
}
|
|
15366
|
+
var COLLAPSED_BOX = "size-8 shrink-0 overflow-hidden rounded-lg";
|
|
15367
|
+
var EXPANDED_MARK_BOX = "h-10 w-32";
|
|
15368
|
+
var EXPANDED_CHIP_BOX = "size-10 shrink-0 rounded-lg";
|
|
15369
|
+
var CHIP_SKIN = "bg-sidebar-primary/10";
|
|
15370
|
+
var FIT = "[&_img]:size-full [&_img]:object-contain";
|
|
15371
|
+
function NSidebarBrand({ logo, collapsed, linkComponent: Link, className }) {
|
|
15372
|
+
const source = collapsed ? logo.collapsed ?? logo.expanded : logo.expanded;
|
|
15373
|
+
const showText = !collapsed && (logo.title || logo.subtitle);
|
|
15374
|
+
const isChip = logo.variant === "chip";
|
|
15375
|
+
if (!source && !showText) return null;
|
|
15376
|
+
const image = typeof source === "string" ? /* @__PURE__ */ jsx(NImage, { src: source, fallback: logo.fallback, alt: logo.alt ?? "", "aria-hidden": logo.alt ? void 0 : true }) : source;
|
|
15377
|
+
const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15378
|
+
image ? /* @__PURE__ */ jsx(
|
|
15379
|
+
"span",
|
|
15380
|
+
{
|
|
15381
|
+
className: cn(
|
|
15382
|
+
"flex items-center justify-center",
|
|
15383
|
+
collapsed ? COLLAPSED_BOX : isChip ? EXPANDED_CHIP_BOX : EXPANDED_MARK_BOX,
|
|
15384
|
+
isChip && CHIP_SKIN,
|
|
15385
|
+
FIT,
|
|
15386
|
+
className
|
|
15371
15387
|
),
|
|
15372
|
-
|
|
15373
|
-
|
|
15374
|
-
|
|
15375
|
-
|
|
15376
|
-
|
|
15377
|
-
|
|
15388
|
+
children: image
|
|
15389
|
+
}
|
|
15390
|
+
) : null,
|
|
15391
|
+
showText ? /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col", children: [
|
|
15392
|
+
logo.title ? /* @__PURE__ */ jsx("span", { className: "truncate text-sm font-semibold leading-tight text-sidebar-foreground", children: logo.title }) : null,
|
|
15393
|
+
logo.subtitle ? /* @__PURE__ */ jsx("span", { className: "truncate text-xs leading-tight text-sidebar-foreground/60", children: logo.subtitle }) : null
|
|
15394
|
+
] }) : null
|
|
15395
|
+
] });
|
|
15396
|
+
const wrapper = cn(
|
|
15397
|
+
"flex min-w-0 items-center gap-2.5 text-left",
|
|
15398
|
+
!collapsed && !showText && !isChip && "mx-auto"
|
|
15378
15399
|
);
|
|
15400
|
+
const interactive = "cursor-pointer transition-opacity hover:opacity-80";
|
|
15401
|
+
if (logo.href && Link) return /* @__PURE__ */ jsx(Link, { href: logo.href, className: cn(wrapper, interactive), children: inner });
|
|
15402
|
+
if (logo.href) return /* @__PURE__ */ jsx("a", { href: logo.href, className: cn(wrapper, interactive), children: inner });
|
|
15403
|
+
if (logo.onClick) return /* @__PURE__ */ jsx("button", { type: "button", onClick: logo.onClick, className: cn(wrapper, interactive), children: inner });
|
|
15404
|
+
return /* @__PURE__ */ jsx("div", { className: wrapper, children: inner });
|
|
15379
15405
|
}
|
|
15380
15406
|
function defaultIsActive(item, activePath) {
|
|
15381
15407
|
if (item.href) return activePath === item.href;
|
|
@@ -15674,6 +15700,10 @@ function NSidebarMobile({
|
|
|
15674
15700
|
)
|
|
15675
15701
|
] });
|
|
15676
15702
|
}
|
|
15703
|
+
var LOGO_OBJECT_KEYS = ["expanded", "collapsed", "fallback", "alt", "href", "title", "subtitle"];
|
|
15704
|
+
function isSidebarLogoObject(value) {
|
|
15705
|
+
return typeof value === "object" && value !== null && !isValidElement(value) && !Array.isArray(value) && LOGO_OBJECT_KEYS.some((key) => key in value);
|
|
15706
|
+
}
|
|
15677
15707
|
function buildGroups(items) {
|
|
15678
15708
|
const groups = [];
|
|
15679
15709
|
for (const item of items) {
|
|
@@ -15776,10 +15806,6 @@ function NSidebar({
|
|
|
15776
15806
|
expandLabel = "Expand",
|
|
15777
15807
|
hamburgerClassName,
|
|
15778
15808
|
showHamburgerButton = false,
|
|
15779
|
-
logoIcon,
|
|
15780
|
-
logoTitle,
|
|
15781
|
-
logoSubtitle,
|
|
15782
|
-
onLogoClick,
|
|
15783
15809
|
onSettings,
|
|
15784
15810
|
settingsLabel,
|
|
15785
15811
|
onLogout,
|
|
@@ -15790,6 +15816,7 @@ function NSidebar({
|
|
|
15790
15816
|
const [_mobileOpen, _setMobileOpen] = useState(defaultMobileOpen);
|
|
15791
15817
|
const [_collapsed, _setCollapsed] = useState(defaultCollapsed);
|
|
15792
15818
|
const sidebar = useNSidebar();
|
|
15819
|
+
const branding = useNBranding();
|
|
15793
15820
|
const isMobileControlled = mobileOpenProp !== void 0;
|
|
15794
15821
|
const isCollapsedControlled = collapsedProp !== void 0;
|
|
15795
15822
|
const mobileOpen = isMobileControlled ? mobileOpenProp : sidebar?.mobileOpen ?? _mobileOpen;
|
|
@@ -15882,11 +15909,36 @@ function NSidebar({
|
|
|
15882
15909
|
const effectiveShowSectionSeparators = showSectionSeparators ?? recipe?.showSectionSeparators ?? false;
|
|
15883
15910
|
const contentSlot = recipe?.slots?.content;
|
|
15884
15911
|
const contentStyle = contentSlot?.paddingTop ? { paddingTop: contentSlot.paddingTop } : void 0;
|
|
15885
|
-
const
|
|
15886
|
-
|
|
15887
|
-
|
|
15888
|
-
|
|
15889
|
-
|
|
15912
|
+
const brandingLogo = useMemo(() => {
|
|
15913
|
+
if (!branding?.logoExpanded && !branding?.logoCollapsed) return null;
|
|
15914
|
+
return {
|
|
15915
|
+
expanded: branding.logoExpanded,
|
|
15916
|
+
collapsed: branding.logoCollapsed,
|
|
15917
|
+
fallback: branding.logoFallback,
|
|
15918
|
+
href: branding.logoHref,
|
|
15919
|
+
alt: branding.appName
|
|
15920
|
+
};
|
|
15921
|
+
}, [branding]);
|
|
15922
|
+
const brandNode = (value, isCollapsed) => /* @__PURE__ */ jsx(
|
|
15923
|
+
NSidebarBrand,
|
|
15924
|
+
{
|
|
15925
|
+
logo: value,
|
|
15926
|
+
collapsed: isCollapsed,
|
|
15927
|
+
linkComponent,
|
|
15928
|
+
className: classNames?.sidebarLogo
|
|
15929
|
+
}
|
|
15930
|
+
);
|
|
15931
|
+
const renderLogo = (isMobile) => {
|
|
15932
|
+
const isCollapsed = isMobile ? false : desktopCollapsed;
|
|
15933
|
+
if (typeof logo === "function") return logo({ collapsed: isCollapsed, isMobile });
|
|
15934
|
+
if (isSidebarLogoObject(logo)) {
|
|
15935
|
+
return brandNode({ ...logo, alt: logo.alt ?? branding?.appName }, isCollapsed);
|
|
15936
|
+
}
|
|
15937
|
+
if (logo === void 0) return brandingLogo ? brandNode(brandingLogo, isCollapsed) : void 0;
|
|
15938
|
+
return logo;
|
|
15939
|
+
};
|
|
15940
|
+
const desktopHeaderContent = renderLogo(false);
|
|
15941
|
+
const mobileHeaderContent = renderLogo(true);
|
|
15890
15942
|
const contentProps = {
|
|
15891
15943
|
groups,
|
|
15892
15944
|
activePath,
|
|
@@ -16329,4 +16381,4 @@ function NGridItem({
|
|
|
16329
16381
|
return /* @__PURE__ */ jsx("div", { className: itemClassName, ...props, children });
|
|
16330
16382
|
}
|
|
16331
16383
|
|
|
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,
|
|
16384
|
+
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, NBrandingProvider, 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, NImage, NIndicator, NInspectorSheet, NLineChart, NLoadingState, NMultiDialog, NNavbar, NPageHeader, NPageHeaderActions, NPageHeaderCompactActions, NPageHeaderFilters, NPageHeaderTop, NPageLayout, NPieChart, NPortalScopeProvider, NProgress, NRowActions, NSection, NSectionHeader, NSectionInfo, NSectionWithInfo, NSheet, NSidebar, NSidebarBrand, NSidebarContent, NSidebarFooter, NSidebarHeader, NSidebarItem, 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, useNBranding, useNForm, useNPortalScope, useNSidebar, useNTableDefaults, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmThemeMode, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useTableStore, useVariant, useVariantPreset };
|