najm-kit 2.11.16 → 2.11.18
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 +437 -421
- package/README.md +1195 -1195
- package/dist/adapters/app.d.ts +55 -3
- package/dist/adapters/app.mjs +28 -6
- package/dist/index.d.ts +11 -5
- package/dist/index.mjs +18 -6
- package/dist/theme.css +5 -5
- package/package.json +2 -2
package/dist/adapters/app.d.ts
CHANGED
|
@@ -18,20 +18,62 @@ interface NajmAppBranding {
|
|
|
18
18
|
logoExpanded?: string | null;
|
|
19
19
|
logoCollapsed?: string | null;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* The part of a `najm-i18n` definition this provider reads.
|
|
23
|
+
*
|
|
24
|
+
* Structural, so a whole definition satisfies it — its methods are simply
|
|
25
|
+
* extra — and named for data rather than behaviour because everything derived
|
|
26
|
+
* here (the writing direction, the formatting tags) is declared metadata.
|
|
27
|
+
*
|
|
28
|
+
* That also decides what a Server Component may pass. This provider is a
|
|
29
|
+
* Client Component, and React rejects a prop carrying functions outright, so a
|
|
30
|
+
* server layout passes `definition.snapshot` — the same fields without the
|
|
31
|
+
* methods — while a client parent passes the definition itself.
|
|
32
|
+
*/
|
|
33
|
+
interface NajmAppI18n {
|
|
34
|
+
translations: Translations;
|
|
35
|
+
defaultLanguage?: string;
|
|
36
|
+
supportedLanguages?: readonly string[];
|
|
37
|
+
fallbackToDefaultLanguage?: boolean;
|
|
38
|
+
languageMetadata?: {
|
|
39
|
+
readonly [language: string]: {
|
|
40
|
+
locale?: string;
|
|
41
|
+
direction?: 'ltr' | 'rtl';
|
|
42
|
+
} | undefined;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
21
45
|
interface NajmAppProviderProps extends Omit<NajmNextUIProviderProps, 't'> {
|
|
22
46
|
/**
|
|
23
47
|
* Enables schema-driven form filling for every `NForm` and `WizardForm`.
|
|
24
48
|
* `true` uses F8; an options object can choose another shortcut.
|
|
25
49
|
*/
|
|
26
50
|
formDevTools?: boolean | FormDevToolsOptions;
|
|
51
|
+
/**
|
|
52
|
+
* A `najm-i18n` definition, standing in for five props: `translations`,
|
|
53
|
+
* `defaultLanguage`, `fallbackToDefaultLanguage`, `locales` and
|
|
54
|
+
* `getLanguageDirection`. All five are already declared in the definition, so
|
|
55
|
+
* an application that has one should not have to take it apart and hand the
|
|
56
|
+
* pieces back. Any of them passed explicitly still wins, which is how an
|
|
57
|
+
* application overrides one facet without abandoning the definition.
|
|
58
|
+
*
|
|
59
|
+
* From a Server Component, pass `definition.snapshot` instead — see
|
|
60
|
+
* `NajmAppI18n`.
|
|
61
|
+
*
|
|
62
|
+
* `initialLanguage` is deliberately not part of it: the active language is a
|
|
63
|
+
* per-request value no definition can know.
|
|
64
|
+
*/
|
|
65
|
+
i18n?: NajmAppI18n;
|
|
27
66
|
/**
|
|
28
67
|
* Catalog for `najm-i18n`. Supplying it mounts an `I18nProvider` and derives
|
|
29
68
|
* the pagination labels from it, so `t` is not a prop here — the provider
|
|
30
69
|
* already has the translator and passing one in would be a second source of
|
|
31
70
|
* truth.
|
|
71
|
+
*
|
|
72
|
+
* Defaults to `i18n.translations`.
|
|
32
73
|
*/
|
|
33
74
|
translations?: Translations;
|
|
34
75
|
initialLanguage?: string;
|
|
76
|
+
/** Defaults to `i18n.defaultLanguage`. */
|
|
35
77
|
defaultLanguage?: string;
|
|
36
78
|
/**
|
|
37
79
|
* Resolves a key missing from the active language against `defaultLanguage`
|
|
@@ -41,9 +83,17 @@ interface NajmAppProviderProps extends Omit<NajmNextUIProviderProps, 't'> {
|
|
|
41
83
|
* Off by default, matching the package. An application shipping an
|
|
42
84
|
* incomplete locale beside a complete one turns it on here rather than
|
|
43
85
|
* pre-merging its catalogs.
|
|
86
|
+
*
|
|
87
|
+
* Defaults to `i18n.fallbackToDefaultLanguage`.
|
|
44
88
|
*/
|
|
45
89
|
fallbackToDefaultLanguage?: boolean;
|
|
46
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* Maps a language to the writing direction applied to `<html>`.
|
|
92
|
+
*
|
|
93
|
+
* Defaults to `i18n.languageMetadata`, resolving an unsupported language
|
|
94
|
+
* against `defaultLanguage` the way the definition's own `direction` does,
|
|
95
|
+
* rather than falling through to `najm-i18n`'s built-in Arabic guess.
|
|
96
|
+
*/
|
|
47
97
|
getLanguageDirection?: (language: string) => 'ltr' | 'rtl';
|
|
48
98
|
/**
|
|
49
99
|
* Where the chosen language is POSTed, as `{ language }`. Defaults to
|
|
@@ -77,6 +127,8 @@ interface NajmAppProviderProps extends Omit<NajmNextUIProviderProps, 't'> {
|
|
|
77
127
|
* The distinction matters because language and region are separate choices:
|
|
78
128
|
* `fr` alone formats dates and separators the French way, which is not how
|
|
79
129
|
* they are written in Morocco. Unmapped languages are used as-is.
|
|
130
|
+
*
|
|
131
|
+
* Defaults to the `locale` of each `i18n.languageMetadata` entry.
|
|
80
132
|
*/
|
|
81
133
|
locales?: Record<string, string>;
|
|
82
134
|
/**
|
|
@@ -122,6 +174,6 @@ interface NajmAppProviderProps extends Omit<NajmNextUIProviderProps, 't'> {
|
|
|
122
174
|
* state machine of its own above this provider. The controlled `design` and
|
|
123
175
|
* `branding` props still work for applications that already do.
|
|
124
176
|
*/
|
|
125
|
-
declare function NajmAppProvider({ translations, initialLanguage, defaultLanguage, fallbackToDefaultLanguage, getLanguageDirection, languageEndpoint, appName, initialBranding, formDevTools, ...props }: NajmAppProviderProps): React.JSX.Element;
|
|
177
|
+
declare function NajmAppProvider({ i18n, translations, initialLanguage, defaultLanguage, fallbackToDefaultLanguage, getLanguageDirection: languageDirection, locales: localeTags, languageEndpoint, appName, initialBranding, formDevTools, ...props }: NajmAppProviderProps): React.JSX.Element;
|
|
126
178
|
|
|
127
|
-
export { type NajmAppBranding, NajmAppProvider, type NajmAppProviderProps };
|
|
179
|
+
export { type NajmAppBranding, type NajmAppI18n, NajmAppProvider, type NajmAppProviderProps };
|
package/dist/adapters/app.mjs
CHANGED
|
@@ -69,17 +69,39 @@ function NajmAppNoI18n({
|
|
|
69
69
|
) });
|
|
70
70
|
}
|
|
71
71
|
function NajmAppProvider({
|
|
72
|
-
|
|
72
|
+
i18n,
|
|
73
|
+
translations = i18n?.translations,
|
|
73
74
|
initialLanguage,
|
|
74
|
-
defaultLanguage,
|
|
75
|
-
fallbackToDefaultLanguage,
|
|
76
|
-
getLanguageDirection,
|
|
75
|
+
defaultLanguage = i18n?.defaultLanguage,
|
|
76
|
+
fallbackToDefaultLanguage = i18n?.fallbackToDefaultLanguage,
|
|
77
|
+
getLanguageDirection: languageDirection,
|
|
78
|
+
locales: localeTags,
|
|
77
79
|
languageEndpoint = DEFAULT_LANGUAGE_ENDPOINT,
|
|
78
80
|
appName,
|
|
79
81
|
initialBranding,
|
|
80
82
|
formDevTools,
|
|
81
83
|
...props
|
|
82
84
|
}) {
|
|
85
|
+
const getLanguageDirection = React.useMemo(() => {
|
|
86
|
+
if (languageDirection) return languageDirection;
|
|
87
|
+
if (!i18n) return void 0;
|
|
88
|
+
const metadata = i18n.languageMetadata;
|
|
89
|
+
const languages = i18n.supportedLanguages ?? Object.keys(i18n.translations);
|
|
90
|
+
const fallback = i18n.defaultLanguage;
|
|
91
|
+
return (language) => {
|
|
92
|
+
const known = languages.includes(language) ? language : fallback ?? language;
|
|
93
|
+
return metadata?.[known]?.direction ?? "ltr";
|
|
94
|
+
};
|
|
95
|
+
}, [i18n, languageDirection]);
|
|
96
|
+
const locales = React.useMemo(() => {
|
|
97
|
+
if (localeTags) return localeTags;
|
|
98
|
+
if (!i18n?.languageMetadata) return void 0;
|
|
99
|
+
const metadata = i18n.languageMetadata;
|
|
100
|
+
const languages = i18n.supportedLanguages ?? Object.keys(i18n.translations);
|
|
101
|
+
return Object.fromEntries(
|
|
102
|
+
languages.map((language) => [language, metadata[language]?.locale ?? language])
|
|
103
|
+
);
|
|
104
|
+
}, [i18n, localeTags]);
|
|
83
105
|
const persistLanguage = React.useCallback(
|
|
84
106
|
async (language) => {
|
|
85
107
|
const response = await fetch(languageEndpoint, {
|
|
@@ -98,7 +120,7 @@ function NajmAppProvider({
|
|
|
98
120
|
);
|
|
99
121
|
const seeded = appName ? { appName, ...initialBranding } : initialBranding;
|
|
100
122
|
if (!translations) {
|
|
101
|
-
return /* @__PURE__ */ jsx(FormDevToolsProvider, { value: formDevTools, children: /* @__PURE__ */ jsx(NajmAppNoI18n, { ...props, initialBranding: seeded }) });
|
|
123
|
+
return /* @__PURE__ */ jsx(FormDevToolsProvider, { value: formDevTools, children: /* @__PURE__ */ jsx(NajmAppNoI18n, { ...props, locales, initialBranding: seeded }) });
|
|
102
124
|
}
|
|
103
125
|
return /* @__PURE__ */ jsx(FormDevToolsProvider, { value: formDevTools, children: /* @__PURE__ */ jsx(
|
|
104
126
|
I18nProvider,
|
|
@@ -109,7 +131,7 @@ function NajmAppProvider({
|
|
|
109
131
|
fallbackToDefaultLanguage,
|
|
110
132
|
getLanguageDirection,
|
|
111
133
|
onLanguageChange: persistLanguage,
|
|
112
|
-
children: /* @__PURE__ */ jsx(NajmAppUI, { ...props, initialBranding: seeded })
|
|
134
|
+
children: /* @__PURE__ */ jsx(NajmAppUI, { ...props, locales, initialBranding: seeded })
|
|
113
135
|
}
|
|
114
136
|
) });
|
|
115
137
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -3980,10 +3980,16 @@ interface SidebarWidths {
|
|
|
3980
3980
|
* including `autoCollapseAt`, so consumers stop approximating it with their own
|
|
3981
3981
|
* responsive classes.
|
|
3982
3982
|
*/
|
|
3983
|
-
|
|
3983
|
+
interface SidebarResolvedState {
|
|
3984
3984
|
collapsed: boolean;
|
|
3985
3985
|
isMobile: boolean;
|
|
3986
|
-
}
|
|
3986
|
+
}
|
|
3987
|
+
type SidebarLogoRender = (state: SidebarResolvedState) => ReactNode;
|
|
3988
|
+
/**
|
|
3989
|
+
* Render-prop form of `footer`. Receives the same resolved state as `logo`,
|
|
3990
|
+
* including automatic desktop collapse and the expanded mobile drawer.
|
|
3991
|
+
*/
|
|
3992
|
+
type SidebarFooterRender = (state: SidebarResolvedState) => ReactNode;
|
|
3987
3993
|
/**
|
|
3988
3994
|
* Declarative form of `logo`. The sidebar owns the box, the fit and the
|
|
3989
3995
|
* collapsed/expanded switch so every app renders the mark identically; the
|
|
@@ -4033,7 +4039,7 @@ interface SidebarProps {
|
|
|
4033
4039
|
showSectionSeparators?: boolean;
|
|
4034
4040
|
/** Use a border instead of the default flat sidebar edge. */
|
|
4035
4041
|
bordered?: boolean;
|
|
4036
|
-
footer?: ReactNode;
|
|
4042
|
+
footer?: ReactNode | SidebarFooterRender;
|
|
4037
4043
|
className?: string;
|
|
4038
4044
|
classNames?: NAppShellClassNames;
|
|
4039
4045
|
mobileBreakpoint?: 'sm' | 'md' | 'lg';
|
|
@@ -4228,7 +4234,7 @@ interface NAppShellProps extends Pick<SidebarProps, "widths"> {
|
|
|
4228
4234
|
onCollapsedChange?: (collapsed: boolean) => void;
|
|
4229
4235
|
/** Where the collapse toggle lives: a full-width button in the footer, or a small floating circle on the sidebar's edge. */
|
|
4230
4236
|
collapseButtonPosition?: 'footer' | 'edge';
|
|
4231
|
-
sidebarFooter?:
|
|
4237
|
+
sidebarFooter?: SidebarProps["footer"];
|
|
4232
4238
|
navbarLeft?: ReactNode;
|
|
4233
4239
|
navbarRight?: ReactNode;
|
|
4234
4240
|
classNames?: NAppShellClassNames;
|
|
@@ -4323,4 +4329,4 @@ interface NGridItemProps extends Omit<React$1.AllHTMLAttributes<HTMLDivElement>,
|
|
|
4323
4329
|
declare function NGrid({ as: Comp, children, cols, smCols, mdCols, lgCols, xlCols, gap, className, style, ...props }: NGridProps): React$1.JSX.Element;
|
|
4324
4330
|
declare function NGridItem({ children, span, smSpan, mdSpan, lgSpan, xlSpan, className, ...props }: NGridItemProps): React$1.JSX.Element;
|
|
4325
4331
|
|
|
4326
|
-
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, BadgeColor, BadgeShape, 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_CARD_BREAKPOINT, DEFAULT_THEME_FILE_NAME, DEFAULT_TOOLBAR_KEY_PREFIX, 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, EMPTY_DESIGN, EmojiInput, type EmojiInputProps, type FileBrowserMode, FileImportButton, FileInput, type FileInputProps, type FileNode, Form, FormControl, FormDescription, FormDevTools, FormDevToolsOptions, FormDevToolsProvider, 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_COLOR_TEXT_CLASSES, NAJM_SAVED_THEME_VALUE, NAJM_STATUS_COLORS, 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 NAvatarImageProps, type NAvatarProps, type AvatarShape as NAvatarShape, 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, type NCredentialField, NCredentialsCard, type NCredentialsCardClassNames, type NCredentialsCardProps, 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, NErrorBoundary, type NFeedbackIconSize, 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, NIconSource, NImage, type NImageProps, NIndicator, NInspectorSheet, NLineChart, type NLineChartProps, 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, NTableCardPagination, NTableCardRoot, type NTableCardRootProps, NTableCards, type NTableClassNames, type NTableColumnBreakpoint, type NTableColumnDef, type NTableColumnMeta, NTableContent, NTableHeader, NTableLoadingSkeleton, type NTableMenu, type NTableMenuProp, type NTablePageItem, NTablePagination, NTablePaginationLabels, NTablePaginationVariant, type NTableProps, NTableRowSkeleton, NTableSkeleton, type NTableState, NTableToolbarLabels, 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, NajmAccent, NajmAppearance, type NajmBorderSide, NajmComponentName, NajmComponentStyleConfig, NajmComponentThemeConfig, NajmDesignConfig, NajmDesignEditorProvider, type NajmDesignEditorProviderProps, type NajmDesignEditorValue, NajmDesignProvider, type NajmDesignProviderProps, NajmFormatConfig, type NajmFormatContextValue, NajmFormatProvider, type NajmFormatProviderProps, NajmLayoutConfig, NajmMode, NajmPreset, NajmResponsiveBreakpoint, NajmResponsiveValue, NajmScroll, type NajmScrollProps, NajmThemeConfig, NajmThemeProvider, NajmThemeProviderProps, NajmThemeTokens, NajmTranslate, NajmTypographyConfig, 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, 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, buildDefaultFileColumns, buildPageItems, buildToolbarLabels, buttonVariants, cn, colorTextClass, composePreset, createDialogStore, createTableStore, defineNajmThemeConfig, detectFormat, dialogVariants, filterResponsiveColumns, findStatusColor, focusRingClasses, focusRingWithinClasses, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNChartColor, getNextEditorTabValue, hiddenBelowClasses, indicatorVariants, inputBorderClasses, isPlaceholderAvatar, normalizeStatusToken, normalizeThemeFileName, parseColor, parseNajmThemeConfig, parseThemeFile, resolveAvatarSrc, resolveHiddenBelowClass, resolvePreset, resolveSlot, resolveStatusColor, sidebarBorderClasses, sliderVariants, statusTextClass, stringifyNajmThemeConfig, stringifyThemeFile, surfaceBorderClasses, swapVariants, toPickerHex, toggleVariants, tooltipContentVariants, truncateByCharacters, useCardViewport, useClickOutside, useContextMenu, useDebouncedValue, useDelayedLoading, useDesktopTableMode, useDialog, useDialogStore, useDynamicPageSize, useFormField, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useMediaQuery, useNForm, useNPortalScope, useNSidebar, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmDesignEditor, useNajmFormat, useNajmFormatContext, useNajmThemeMode, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useTableStore, useVariant, useVariantPreset };
|
|
4332
|
+
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, BadgeColor, BadgeShape, 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_CARD_BREAKPOINT, DEFAULT_THEME_FILE_NAME, DEFAULT_TOOLBAR_KEY_PREFIX, 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, EMPTY_DESIGN, EmojiInput, type EmojiInputProps, type FileBrowserMode, FileImportButton, FileInput, type FileInputProps, type FileNode, Form, FormControl, FormDescription, FormDevTools, FormDevToolsOptions, FormDevToolsProvider, 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_COLOR_TEXT_CLASSES, NAJM_SAVED_THEME_VALUE, NAJM_STATUS_COLORS, 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 NAvatarImageProps, type NAvatarProps, type AvatarShape as NAvatarShape, 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, type NCredentialField, NCredentialsCard, type NCredentialsCardClassNames, type NCredentialsCardProps, 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, NErrorBoundary, type NFeedbackIconSize, 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, NIconSource, NImage, type NImageProps, NIndicator, NInspectorSheet, NLineChart, type NLineChartProps, 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, NTableCardPagination, NTableCardRoot, type NTableCardRootProps, NTableCards, type NTableClassNames, type NTableColumnBreakpoint, type NTableColumnDef, type NTableColumnMeta, NTableContent, NTableHeader, NTableLoadingSkeleton, type NTableMenu, type NTableMenuProp, type NTablePageItem, NTablePagination, NTablePaginationLabels, NTablePaginationVariant, type NTableProps, NTableRowSkeleton, NTableSkeleton, type NTableState, NTableToolbarLabels, 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, NajmAccent, NajmAppearance, type NajmBorderSide, NajmComponentName, NajmComponentStyleConfig, NajmComponentThemeConfig, NajmDesignConfig, NajmDesignEditorProvider, type NajmDesignEditorProviderProps, type NajmDesignEditorValue, NajmDesignProvider, type NajmDesignProviderProps, NajmFormatConfig, type NajmFormatContextValue, NajmFormatProvider, type NajmFormatProviderProps, NajmLayoutConfig, NajmMode, NajmPreset, NajmResponsiveBreakpoint, NajmResponsiveValue, NajmScroll, type NajmScrollProps, NajmThemeConfig, NajmThemeProvider, NajmThemeProviderProps, NajmThemeTokens, NajmTranslate, NajmTypographyConfig, 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, 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 SidebarFooterRender, type SidebarItemProps, type SidebarLogo, type SidebarLogoRender, type SidebarProps, type SidebarResolvedState, 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, buildDefaultFileColumns, buildPageItems, buildToolbarLabels, buttonVariants, cn, colorTextClass, composePreset, createDialogStore, createTableStore, defineNajmThemeConfig, detectFormat, dialogVariants, filterResponsiveColumns, findStatusColor, focusRingClasses, focusRingWithinClasses, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNChartColor, getNextEditorTabValue, hiddenBelowClasses, indicatorVariants, inputBorderClasses, isPlaceholderAvatar, normalizeStatusToken, normalizeThemeFileName, parseColor, parseNajmThemeConfig, parseThemeFile, resolveAvatarSrc, resolveHiddenBelowClass, resolvePreset, resolveSlot, resolveStatusColor, sidebarBorderClasses, sliderVariants, statusTextClass, stringifyNajmThemeConfig, stringifyThemeFile, surfaceBorderClasses, swapVariants, toPickerHex, toggleVariants, tooltipContentVariants, truncateByCharacters, useCardViewport, useClickOutside, useContextMenu, useDebouncedValue, useDelayedLoading, useDesktopTableMode, useDialog, useDialogStore, useDynamicPageSize, useFormField, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useMediaQuery, useNForm, useNPortalScope, useNSidebar, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmDesignEditor, useNajmFormat, useNajmFormatContext, useNajmThemeMode, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useTableStore, useVariant, useVariantPreset };
|
package/dist/index.mjs
CHANGED
|
@@ -14597,6 +14597,9 @@ function NSidebarBrand({ logo, collapsed, linkComponent: Link, className }) {
|
|
|
14597
14597
|
if (logo.onClick) return /* @__PURE__ */ jsx("button", { type: "button", onClick: logo.onClick, className: cn(wrapper, interactive), children: inner });
|
|
14598
14598
|
return /* @__PURE__ */ jsx("div", { className: wrapper, children: inner });
|
|
14599
14599
|
}
|
|
14600
|
+
|
|
14601
|
+
// src/components/sidebar/layout.ts
|
|
14602
|
+
var SIDEBAR_COLLAPSED_ITEM_INSET_CLASS = "ps-[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))]";
|
|
14600
14603
|
function defaultIsActive(item, activePath) {
|
|
14601
14604
|
if (item.href) return activePath === item.href;
|
|
14602
14605
|
if (item.id) return activePath === item.id;
|
|
@@ -14626,7 +14629,7 @@ function NSidebarItem({
|
|
|
14626
14629
|
const baseClasses = cn(
|
|
14627
14630
|
"flex items-center gap-3 w-full rounded-md text-sm px-2 font-medium transition-colors h-8 text-start",
|
|
14628
14631
|
depth > 0 && "ps-7",
|
|
14629
|
-
collapsed &&
|
|
14632
|
+
collapsed && SIDEBAR_COLLAPSED_ITEM_INSET_CLASS,
|
|
14630
14633
|
item.disabled ? "opacity-50 cursor-not-allowed" : active ? "cursor-pointer bg-sidebar-primary text-sidebar-primary-foreground" : "cursor-pointer text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
14631
14634
|
classNames?.sidebarItem
|
|
14632
14635
|
);
|
|
@@ -14775,7 +14778,10 @@ function DefaultFooter({
|
|
|
14775
14778
|
collapsed = false
|
|
14776
14779
|
}) {
|
|
14777
14780
|
if (!onSettings && !onLogout) return null;
|
|
14778
|
-
const itemClass =
|
|
14781
|
+
const itemClass = cn(
|
|
14782
|
+
"flex h-8 w-full cursor-pointer items-center gap-3 rounded-md px-2 text-start text-sm font-medium text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground transition-colors",
|
|
14783
|
+
collapsed && SIDEBAR_COLLAPSED_ITEM_INSET_CLASS
|
|
14784
|
+
);
|
|
14779
14785
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
|
|
14780
14786
|
onSettings && /* @__PURE__ */ jsxs("button", { type: "button", onClick: onSettings, className: itemClass, "aria-label": settingsLabel, title: settingsLabel, children: [
|
|
14781
14787
|
/* @__PURE__ */ jsx(Settings, { className: "h-4 w-4 shrink-0" }),
|
|
@@ -14816,7 +14822,8 @@ function NSidebarFooter({
|
|
|
14816
14822
|
onClick: onToggleCollapsed,
|
|
14817
14823
|
className: cn(
|
|
14818
14824
|
"flex items-center w-full cursor-pointer rounded-md text-sm font-medium transition-colors h-8 text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
14819
|
-
"gap-3 px-2 text-start"
|
|
14825
|
+
"gap-3 px-2 text-start",
|
|
14826
|
+
collapsed && SIDEBAR_COLLAPSED_ITEM_INSET_CLASS
|
|
14820
14827
|
),
|
|
14821
14828
|
"aria-label": collapsed ? expandLabel : collapseLabel,
|
|
14822
14829
|
title: collapsed ? expandLabel : collapseLabel,
|
|
@@ -15134,6 +15141,12 @@ function NSidebar({
|
|
|
15134
15141
|
};
|
|
15135
15142
|
const desktopHeaderContent = renderLogo(false);
|
|
15136
15143
|
const mobileHeaderContent = renderLogo(true);
|
|
15144
|
+
const renderFooter = (isMobile) => {
|
|
15145
|
+
const isCollapsed = isMobile ? false : desktopCollapsed;
|
|
15146
|
+
return typeof footer === "function" ? footer({ collapsed: isCollapsed, isMobile }) : footer;
|
|
15147
|
+
};
|
|
15148
|
+
const desktopFooterContent = renderFooter(false);
|
|
15149
|
+
const mobileFooterContent = renderFooter(true);
|
|
15137
15150
|
const contentProps = {
|
|
15138
15151
|
groups,
|
|
15139
15152
|
activePath,
|
|
@@ -15148,7 +15161,6 @@ function NSidebar({
|
|
|
15148
15161
|
classNames
|
|
15149
15162
|
};
|
|
15150
15163
|
const footerProps = {
|
|
15151
|
-
children: footer,
|
|
15152
15164
|
onSettings,
|
|
15153
15165
|
settingsLabel,
|
|
15154
15166
|
onLogout,
|
|
@@ -15163,12 +15175,12 @@ function NSidebar({
|
|
|
15163
15175
|
const sidebarInner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15164
15176
|
desktopHeaderContent && /* @__PURE__ */ jsx(NSidebarHeader, { collapsed: desktopCollapsed, classNames, children: desktopHeaderContent }),
|
|
15165
15177
|
/* @__PURE__ */ jsx(NSidebarContent, { ...contentProps }),
|
|
15166
|
-
/* @__PURE__ */ jsx(NSidebarFooter, { ...footerProps })
|
|
15178
|
+
/* @__PURE__ */ jsx(NSidebarFooter, { ...footerProps, children: desktopFooterContent })
|
|
15167
15179
|
] });
|
|
15168
15180
|
const mobileInner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15169
15181
|
mobileHeaderContent && /* @__PURE__ */ jsx(NSidebarHeader, { collapsed: false, classNames, children: mobileHeaderContent }),
|
|
15170
15182
|
/* @__PURE__ */ jsx(NSidebarContent, { ...contentProps, collapsed: false }),
|
|
15171
|
-
/* @__PURE__ */ jsx(NSidebarFooter, { ...footerProps, collapsed: false, isMobile: true })
|
|
15183
|
+
/* @__PURE__ */ jsx(NSidebarFooter, { ...footerProps, collapsed: false, isMobile: true, children: mobileFooterContent })
|
|
15172
15184
|
] });
|
|
15173
15185
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15174
15186
|
/* @__PURE__ */ jsx(
|
package/dist/theme.css
CHANGED
|
@@ -317,10 +317,10 @@ input:autofill {
|
|
|
317
317
|
overflow-x: auto;
|
|
318
318
|
scrollbar-width: none;
|
|
319
319
|
}
|
|
320
|
-
.najm-overlay-scroll-x::-webkit-scrollbar {
|
|
321
|
-
display: none;
|
|
322
|
-
}
|
|
323
|
-
|
|
320
|
+
.najm-overlay-scroll-x::-webkit-scrollbar {
|
|
321
|
+
display: none;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
324
|
/* Responsive table actions stay discoverable on touch and tablet layouts.
|
|
325
325
|
Fine-pointer desktops may keep the quieter hover/focus reveal treatment. */
|
|
326
326
|
.ntable-card-action {
|
|
@@ -377,7 +377,7 @@ input:autofill {
|
|
|
377
377
|
.nimage-input-compact-overlay:focus-visible {
|
|
378
378
|
opacity: 1;
|
|
379
379
|
}
|
|
380
|
-
}
|
|
380
|
+
}
|
|
381
381
|
|
|
382
382
|
/* OverlayScrollbars theme used by the <NajmScroll> component — a thin,
|
|
383
383
|
translucent slate bar that floats over content with no reserved space.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "najm-kit",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.18",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Reusable React UI component package for Najm framework",
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
"@uiw/react-codemirror": "^4.25.0",
|
|
199
199
|
"@vitejs/plugin-react": "^5.2.0",
|
|
200
200
|
"happy-dom": "^20.11.1",
|
|
201
|
-
"najm-i18n": "^2.1.
|
|
201
|
+
"najm-i18n": "^2.1.2",
|
|
202
202
|
"postcss": "^8.5.22",
|
|
203
203
|
"react-hook-form": "^7",
|
|
204
204
|
"rimraf": "^6",
|