najm-kit 2.6.1 → 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/CHANGELOG.md +6 -0
- package/dist/index.d.ts +151 -22
- package/dist/index.mjs +191 -83
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.6.2
|
|
4
|
+
|
|
5
|
+
- Added `NSidebarProvider` and `useNSidebar`, so sidebar state can be read from a distance. `NSidebar` renders beside the page content rather than around it, which left applications hand-rolling a context to hand `setMobileOpen` down to a page header — a wrapper component plus an aliased import at every call site. Wrap the shell in `NSidebarProvider` and `NPageHeader` now resolves both `onSidebarOpen` and `mobileBreakpoint` from it, so a header nested anywhere below renders a working mobile trigger with no props threaded to it. Also exports the `NSidebarContextValue` type.
|
|
6
|
+
- `NSidebar` resolves its open and collapsed state as explicit prop → surrounding provider → internal state. Passing `collapsed`, `mobileOpen`, `onCollapsedChange`, or `onMobileOpenChange` keeps behaving exactly as before, and a sidebar with no provider around it still owns its own state, so this is additive for every existing consumer.
|
|
7
|
+
- `logo` accepts a render prop, `({ collapsed, isMobile }) => ReactNode`, alongside the existing node. It receives the state the sidebar actually resolved — including whatever `autoCollapseAt` decided — which consumers previously had to approximate with their own responsive classes, guessing at a breakpoint the sidebar had already computed. The mobile drawer always reports `collapsed: false`, matching how it renders. Exported as `SidebarLogoRender`.
|
|
8
|
+
|
|
3
9
|
## 2.6.1
|
|
4
10
|
|
|
5
11
|
- Fixed the non-card `NPageHeader` bleed never taking effect. 2.6.0 cancelled the page padding with the Tailwind utilities `-mt-[var(--najm-section-gap,0px)]` and `-mx-[var(--najm-page-gutter,0px)]`, which only work if the consuming app's Tailwind build happens to emit those arbitrary classes — they exist nowhere but inside this package's bundle, so a consumer could load a stylesheet without them and the header stayed exactly where it was. The offsets are inline styles now and no longer depend on the consumer's CSS pipeline.
|
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';
|
|
@@ -700,7 +700,7 @@ declare function NPageHeaderTop({ children, className }: PageHeaderSlotProps): r
|
|
|
700
700
|
declare namespace NPageHeaderTop {
|
|
701
701
|
var displayName: string;
|
|
702
702
|
}
|
|
703
|
-
declare function NPageHeader({ icon: Icon, title, subtitle, actions, compactActions, filters, top, mobileBreakpoint, onSidebarOpen, sidebarTriggerLabel, sidebarTriggerClassName, search, children, className, headerClassName, card, bordered, }: NPageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
703
|
+
declare function NPageHeader({ icon: Icon, title, subtitle, actions, compactActions, filters, top, mobileBreakpoint: mobileBreakpointProp, onSidebarOpen, sidebarTriggerLabel, sidebarTriggerClassName, search, children, className, headerClassName, card, bordered, }: NPageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
704
704
|
|
|
705
705
|
type DialogActionMode = "auto" | "dialog" | "content";
|
|
706
706
|
type DialogVariant = "default" | "window";
|
|
@@ -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";
|
|
@@ -2853,8 +2890,16 @@ declare function useFormSubmission({ steps, schema, defaultValues, onSubmit, cur
|
|
|
2853
2890
|
*
|
|
2854
2891
|
* `numbered` needs a trustworthy page count. Under `manualPagination` that
|
|
2855
2892
|
* means the application must pass a `pageCount` derived from a real result
|
|
2856
|
-
* total
|
|
2893
|
+
* total, or — when its endpoint reports no total — pass `hasNextPage` and no
|
|
2894
|
+
* `pageCount` at all, which renders the unbounded bar described on the NTable
|
|
2895
|
+
* prop. With neither, the bar falls back to `compact` on its own rather than
|
|
2857
2896
|
* inviting clicks on pages that may not exist.
|
|
2897
|
+
*
|
|
2898
|
+
* What it must never be handed is a `pageCount` that is really a lower bound,
|
|
2899
|
+
* such as `pageIndex + 2`. That reads as a two-page result on page one and a
|
|
2900
|
+
* three-page result on page two, so the bar grows a number per click with
|
|
2901
|
+
* nothing to say why. NTable warns in development when it catches a count
|
|
2902
|
+
* moving in lockstep with the page index.
|
|
2858
2903
|
*/
|
|
2859
2904
|
type NTablePaginationVariant = "numbered" | "compact";
|
|
2860
2905
|
/**
|
|
@@ -2878,6 +2923,12 @@ interface NTablePaginationLabels {
|
|
|
2878
2923
|
lastPage?: string;
|
|
2879
2924
|
/** The `compact` variant's position text, given 1-based values. */
|
|
2880
2925
|
pageOf?: (page: number, pageCount: number) => string;
|
|
2926
|
+
/**
|
|
2927
|
+
* The position text when the result has no known total, given the 1-based
|
|
2928
|
+
* page. Defaults to `"Page X"` — there is no `of Y` to state, and repeating
|
|
2929
|
+
* the moving lower bound there would be the same lie the numbered bar avoids.
|
|
2930
|
+
*/
|
|
2931
|
+
pageOfUnknown?: (page: number) => string;
|
|
2881
2932
|
/** The selection summary, given selected and total row counts. */
|
|
2882
2933
|
rowsSelected?: (selected: number, total: number) => string;
|
|
2883
2934
|
}
|
|
@@ -3048,6 +3099,8 @@ interface TableState {
|
|
|
3048
3099
|
manualPagination: boolean;
|
|
3049
3100
|
pageCount: number | undefined;
|
|
3050
3101
|
rowCount: number | undefined;
|
|
3102
|
+
/** Another server page exists, for a result whose total is unknown. */
|
|
3103
|
+
hasNextPage: boolean | undefined;
|
|
3051
3104
|
pagination: {
|
|
3052
3105
|
pageIndex: number;
|
|
3053
3106
|
pageSize: number;
|
|
@@ -3188,6 +3241,7 @@ declare const createTableStore: (seed?: Partial<TableState>) => {
|
|
|
3188
3241
|
manualPagination: () => boolean;
|
|
3189
3242
|
pageCount: () => number;
|
|
3190
3243
|
rowCount: () => number;
|
|
3244
|
+
hasNextPage: () => boolean;
|
|
3191
3245
|
pagination: () => {
|
|
3192
3246
|
pageIndex: number;
|
|
3193
3247
|
pageSize: number;
|
|
@@ -3362,6 +3416,15 @@ interface NTableProps<T = any, M extends ViewMode = ViewMode> {
|
|
|
3362
3416
|
manualPagination?: boolean;
|
|
3363
3417
|
pageCount?: number;
|
|
3364
3418
|
rowCount?: number;
|
|
3419
|
+
/**
|
|
3420
|
+
* Whether another server page exists, for a list whose endpoint reports no
|
|
3421
|
+
* result total. Supply it *instead of* `pageCount`, never a `pageCount`
|
|
3422
|
+
* synthesized from it: the numbered bar then covers the pages known to exist
|
|
3423
|
+
* and carries a trailing `…` for the rest, and the last-page jump is dropped
|
|
3424
|
+
* because there is no known last page. Ignored when `pageCount` is given —
|
|
3425
|
+
* a real total already says everything this does.
|
|
3426
|
+
*/
|
|
3427
|
+
hasNextPage?: boolean;
|
|
3365
3428
|
pagination?: {
|
|
3366
3429
|
pageIndex: number;
|
|
3367
3430
|
pageSize: number;
|
|
@@ -3463,8 +3526,16 @@ type NTablePageItem = {
|
|
|
3463
3526
|
* pages instead of being dropped — so the slot count stays constant at
|
|
3464
3527
|
* `2 * siblingCount + 5` for any result longer than that. A bar that changes
|
|
3465
3528
|
* width on every click is worse than the text it replaced.
|
|
3529
|
+
*
|
|
3530
|
+
* `unbounded` says the result continues past `pageCount`, which is then every
|
|
3531
|
+
* page *known* to exist rather than the whole result — all an endpoint that
|
|
3532
|
+
* reports no total can prove. The window is built over the known pages and a
|
|
3533
|
+
* trailing gap is appended, so the bar reads "and more after this" from the
|
|
3534
|
+
* first page rather than silently growing a number each time one is
|
|
3535
|
+
* discovered. It goes back to false at the end of the result, where the pages
|
|
3536
|
+
* read are the result and the count is exact.
|
|
3466
3537
|
*/
|
|
3467
|
-
declare function buildPageItems(pageIndex: number, pageCount: number, siblingCount?: number): NTablePageItem[];
|
|
3538
|
+
declare function buildPageItems(pageIndex: number, pageCount: number, siblingCount?: number, unbounded?: boolean): NTablePageItem[];
|
|
3468
3539
|
|
|
3469
3540
|
/**
|
|
3470
3541
|
* Defaults every `NTable` beneath the provider inherits.
|
|
@@ -3690,6 +3761,7 @@ declare const TableStoreContext: React$1.Context<{
|
|
|
3690
3761
|
manualPagination: () => boolean;
|
|
3691
3762
|
pageCount: () => number;
|
|
3692
3763
|
rowCount: () => number;
|
|
3764
|
+
hasNextPage: () => boolean;
|
|
3693
3765
|
pagination: () => {
|
|
3694
3766
|
pageIndex: number;
|
|
3695
3767
|
pageSize: number;
|
|
@@ -3825,6 +3897,7 @@ declare function useStoreSync(props: any): {
|
|
|
3825
3897
|
manualPagination: () => boolean;
|
|
3826
3898
|
pageCount: () => number;
|
|
3827
3899
|
rowCount: () => number;
|
|
3900
|
+
hasNextPage: () => boolean;
|
|
3828
3901
|
pagination: () => {
|
|
3829
3902
|
pageIndex: number;
|
|
3830
3903
|
pageSize: number;
|
|
@@ -3958,6 +4031,7 @@ interface NAppShellClassNames {
|
|
|
3958
4031
|
sidebar?: string;
|
|
3959
4032
|
sidebarItem?: string;
|
|
3960
4033
|
sidebarHeader?: string;
|
|
4034
|
+
sidebarLogo?: string;
|
|
3961
4035
|
sidebarFooter?: string;
|
|
3962
4036
|
navbar?: string;
|
|
3963
4037
|
content?: string;
|
|
@@ -3969,8 +4043,41 @@ interface SidebarWidths {
|
|
|
3969
4043
|
collapsed?: SidebarWidth;
|
|
3970
4044
|
mobile?: SidebarWidth;
|
|
3971
4045
|
}
|
|
4046
|
+
/**
|
|
4047
|
+
* Render-prop form of `logo`. Receives the state the sidebar actually resolved,
|
|
4048
|
+
* including `autoCollapseAt`, so consumers stop approximating it with their own
|
|
4049
|
+
* responsive classes.
|
|
4050
|
+
*/
|
|
4051
|
+
type SidebarLogoRender = (state: {
|
|
4052
|
+
collapsed: boolean;
|
|
4053
|
+
isMobile: boolean;
|
|
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
|
+
}
|
|
3972
4079
|
interface SidebarProps {
|
|
3973
|
-
logo?: ReactNode;
|
|
4080
|
+
logo?: ReactNode | SidebarLogoRender | SidebarLogo;
|
|
3974
4081
|
navItems?: NavItem[];
|
|
3975
4082
|
activePath?: string;
|
|
3976
4083
|
isActive?: (item: NavItem, activePath: string) => boolean;
|
|
@@ -4017,12 +4124,6 @@ interface SidebarProps {
|
|
|
4017
4124
|
* `mobileOpen` from an NPageHeader via its `onSidebarOpen` prop.
|
|
4018
4125
|
*/
|
|
4019
4126
|
showHamburgerButton?: boolean;
|
|
4020
|
-
logoIcon?: ComponentType<{
|
|
4021
|
-
className?: string;
|
|
4022
|
-
}> | ReactNode;
|
|
4023
|
-
logoTitle?: string;
|
|
4024
|
-
logoSubtitle?: string;
|
|
4025
|
-
onLogoClick?: () => void;
|
|
4026
4127
|
onSettings?: () => void;
|
|
4027
4128
|
settingsLabel?: string;
|
|
4028
4129
|
onLogout?: () => void;
|
|
@@ -4044,14 +4145,11 @@ interface NSidebarHeaderProps {
|
|
|
4044
4145
|
className?: string;
|
|
4045
4146
|
classNames?: NAppShellClassNames;
|
|
4046
4147
|
}
|
|
4047
|
-
interface
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
subtitle?: string;
|
|
4053
|
-
onClick?: () => void;
|
|
4054
|
-
collapsed?: boolean;
|
|
4148
|
+
interface NSidebarBrandProps {
|
|
4149
|
+
logo: SidebarLogo;
|
|
4150
|
+
collapsed: boolean;
|
|
4151
|
+
linkComponent?: LinkComponentType;
|
|
4152
|
+
className?: string;
|
|
4055
4153
|
}
|
|
4056
4154
|
interface NSidebarContentProps {
|
|
4057
4155
|
groups: NavItemGroup[];
|
|
@@ -4110,7 +4208,7 @@ interface NSidebarMobileProps {
|
|
|
4110
4208
|
|
|
4111
4209
|
declare function NSidebarHeader({ children, collapsed, className, classNames }: NSidebarHeaderProps): react_jsx_runtime.JSX.Element;
|
|
4112
4210
|
|
|
4113
|
-
declare function
|
|
4211
|
+
declare function NSidebarBrand({ logo, collapsed, linkComponent: Link, className }: NSidebarBrandProps): react_jsx_runtime.JSX.Element;
|
|
4114
4212
|
|
|
4115
4213
|
declare function NSidebarContent({ groups, activePath, isActive, onNavigate, linkComponent, collapsed, showSectionLabels, showSectionIcons, showSectionSeparators, contentStyle, classNames, }: NSidebarContentProps): react_jsx_runtime.JSX.Element;
|
|
4116
4214
|
|
|
@@ -4120,7 +4218,38 @@ declare function NSidebarFooter({ children, onSettings, settingsLabel, onLogout,
|
|
|
4120
4218
|
|
|
4121
4219
|
declare function NSidebarMobile({ open, onOpen, onClose, mobileBreakpoint, width, hamburgerLabel, closeLabel, hamburgerClassName, showHamburgerButton, children, bordered, }: NSidebarMobileProps): react_jsx_runtime.JSX.Element;
|
|
4122
4220
|
|
|
4123
|
-
|
|
4221
|
+
interface NSidebarContextValue {
|
|
4222
|
+
collapsed: boolean;
|
|
4223
|
+
mobileOpen: boolean;
|
|
4224
|
+
openMobile: () => void;
|
|
4225
|
+
closeMobile: () => void;
|
|
4226
|
+
setMobileOpen: (open: boolean) => void;
|
|
4227
|
+
setCollapsed: (collapsed: boolean) => void;
|
|
4228
|
+
toggleCollapsed: () => void;
|
|
4229
|
+
mobileBreakpoint: "sm" | "md" | "lg";
|
|
4230
|
+
}
|
|
4231
|
+
/**
|
|
4232
|
+
* Returns `null` outside a provider, which is what lets `NSidebar` keep its own
|
|
4233
|
+
* state when it is used standalone. Consumers that need the sidebar from a
|
|
4234
|
+
* distance — `NPageHeader`'s mobile trigger, most of all — read it from here.
|
|
4235
|
+
*/
|
|
4236
|
+
declare function useNSidebar(): NSidebarContextValue | null;
|
|
4237
|
+
/**
|
|
4238
|
+
* Owns the sidebar's open/collapsed state so that content rendered *beside* the
|
|
4239
|
+
* sidebar can reach it. `NSidebar` is a sibling of the page content, so this has
|
|
4240
|
+
* to wrap both — it cannot live inside `NSidebar` itself.
|
|
4241
|
+
*
|
|
4242
|
+
* The provider owns the state rather than forwarding a caller-built value: a
|
|
4243
|
+
* pass-through provider has to memoize on the value's fields, which silently
|
|
4244
|
+
* drops changed callback identities and serves stale closures.
|
|
4245
|
+
*/
|
|
4246
|
+
declare function NSidebarProvider({ children, defaultCollapsed, mobileBreakpoint, }: Readonly<{
|
|
4247
|
+
children: ReactNode;
|
|
4248
|
+
defaultCollapsed?: boolean;
|
|
4249
|
+
mobileBreakpoint?: "sm" | "md" | "lg";
|
|
4250
|
+
}>): react_jsx_runtime.JSX.Element;
|
|
4251
|
+
|
|
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;
|
|
4124
4253
|
|
|
4125
4254
|
declare function NSidebarItem({ item, activePath, isActive, onNavigate, linkComponent: LinkComponent, collapsed, depth, classNames, }: SidebarItemProps): react_jsx_runtime.JSX.Element;
|
|
4126
4255
|
|
|
@@ -4262,4 +4391,4 @@ interface NGridItemProps extends Omit<React$1.AllHTMLAttributes<HTMLDivElement>,
|
|
|
4262
4391
|
declare function NGrid({ as: Comp, children, cols, smCols, mdCols, lgCols, xlCols, gap, className, style, ...props }: NGridProps): react_jsx_runtime.JSX.Element;
|
|
4263
4392
|
declare function NGridItem({ children, span, smSpan, mdSpan, lgSpan, xlSpan, className, ...props }: NGridItemProps): react_jsx_runtime.JSX.Element;
|
|
4264
4393
|
|
|
4265
|
-
export { Alert, type AlertLook, type AlertOrientation, type AlertProps, type AlertSize, type AlertTone, type AlertVariant, NCard as AsyncCard, Avatar, AvatarFallback, AvatarFormInput, type AvatarFormInputProps, AvatarGroup, type AvatarGroupProps, AvatarImage, AvatarInput, type AvatarInputProps, type AvatarInputRadius, type AvatarProps$1 as AvatarProps, type AvatarShape$1 as AvatarShape, type AvatarSize, AvatarStatus, type AvatarStatusType, Badge, type BadgeColor, type BadgeIcon, type BadgeLook, type BadgeProps, type BadgeShape, type BadgeSize, type BadgeVariant, BaseInput, type BuildDefaultFileColumnsOptions, Button, type ButtonConfig, type ButtonIcon, type ButtonLoaderPosition, type ButtonProps, type ButtonRounded, type ButtonSize, type ButtonVariant, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroupInput, type CheckboxGroupInputProps, CheckboxInput, type CheckboxInputProps, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorArrayInput, type ColorArrayInputProps, type ColorFormat, ColorPickerInput, type ColorPickerInputProps, Combobox, ComboboxInput, type ComboboxInputProps, type ComboboxOption, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type ContextMenuItem, DEFAULT_THEME_FILE_NAME, DateInput, type DateInputProps, type DeleteDialogOptions, Dialog, type DialogActionMode, type DialogApi, DialogClose, type DialogConfig, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, type DialogHeight, DialogOverlay, type DialogPadding, DialogPortal, type DialogRenderContext, type DialogRenderer, type DialogSize, type DialogStore, DialogTitle, DialogTrigger, type DialogVariant, type DialogWidth, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicArray, type DynamicArrayProps, EmojiInput, type EmojiInputProps, type FileBrowserMode, FileImportButton, FileInput, type FileInputProps, type FileNode, Form, FormControl, FormDescription, FormField, FormInput, type FormInputBackground, type FormInputProps, FormItem, FormLabel, FormMessage, type FormProps, type FormSlotClassNames, type FormVariant, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, ImageInput, type ImageInputPreviewError, type ImageInputPreviewSource, type ImageInputProps, Indicator, type IndicatorHorizontal, type IndicatorOverlay, type IndicatorPosition, type IndicatorProps, type IndicatorResponsivePosition, type IndicatorSize, type IndicatorVertical, Input, type InputIcon, Label, LangInput, type LangInputProps, type LinkComponentType, MultiSelectInput, type MultiSelectInputProps, NAJM_COMPONENT_NAMES, NAJM_SAVED_THEME_VALUE, NAlert, type NAppCommandItem, NAppShell, type NAppShellAction, type NAppShellClassNames, type NAppShellProps, type NAppShellUser, NCard as NAsyncCard, type CardClassNames as NAsyncCardClassNames, type CardProps as NAsyncCardProps, NAvatar, type NAvatarClassNames, type NAvatarProps, type AvatarShape as NAvatarShape, NBadge, type NBadgeLook, type NBadgeProps, NBarChart, type NBarChartProps, type NBulkAction, type NBulkActionButton, type NBulkActionSelect, NBulkActionsBar, type NBulkActionsBarProps, NButton, type NButtonProps, NCard, NCardAction, type CardClassNames as NCardClassNames, type NCardDensity, NCardFooter, NCardInfo, type NCardInfoProps, NCardMedia, type NCardMediaAspect, type NCardMediaPlacement, type NCardMediaProps, type NCardMediaSize, type NCardMediaVariant, type CardProps as NCardProps, NCardSection, type NCardSectionProps, type NCardSectionSurface, type NCartesianChartProps, type NChartCardProps, type NChartDatum, type NChartItem, type NChartSeries, type NChartSize, NChartSkeleton, type NChartSkeletonProps, type NChartSkeletonVariant, NCommandPalette, type NCommandPaletteProps, NConfirmDialog, type NConfirmDialogProps, NContextMenu, type NContextMenuItem, type NContextMenuProps, NDataCardShell, type NDataCardShellActions, type NDataCardShellProps, NDeleteDialog, NDeleteDialogContent, type NDeleteDialogContentProps, type NDeleteDialogProps, NDetailCard, type NDetailCardClassNames, type NDetailCardProps, NDetailItem, type NDetailItemProps, NDetailList, type NDetailListItem, type NDetailListProps, NDialog, type NDialogActionProps, NDialogDescription, type NDialogDescriptionProps, type NDialogDirectProps, NDialogHeader, type NDialogHeaderProps, NDialogPrimaryButton, type NDialogProps, NDialogSecondaryButton, NDonutCard, type NDonutCardClassNames, type NDonutCardItem, type NDonutCardLayout, type NDonutCardLegendMarker, type NDonutCardProps, type NDonutCardVariant, type NEditorTab, NEditorTabs, type NEditorTabsProps, NEmptyState, type NEmptyStateProps, NErrorBoundary, NErrorState, type NErrorStateProps, NFileBrowser, type NFileBrowserCardProps, type NFileBrowserProps, type NFileBrowserRenderThumbProps, NFileTypeIcon, type NFileTypeIconProps, NFilterBar, NFolderIcon, type NFolderIconProps, NForm, NFormSectionHeader, type NFormSectionHeaderProps, NGrid, type NGridCols, NGridItem, type NGridItemProps, type NGridProps, type NGridSpan, NIcon, type NIconProps, type NIconSource, NIndicator, NInspectorSheet, NLineChart, type NLineChartProps, NLoadingState, type NLoadingStateProps, NMultiDialog, type NMultiDialogProps, NNavbar, NPageHeader, NPageHeaderActions, type NPageHeaderBreakpoint, NPageHeaderCompactActions, NPageHeaderFilters, type NPageHeaderProps, NPageHeaderTop, NPageLayout, type NPageLayoutProps, NPieChart, type NPieChartProps, NPortalScopeProvider, NProgress, type NProgressProps, NRowActions, NSection, NSectionHeader, type NSectionHeaderActionsProps, type NSectionHeaderContentProps, type NSectionHeaderProps, type NSectionHeaderSubtitleProps, type NSectionHeaderTitleProps, NSectionInfo, type NSectionInfoProps, type NSectionProps, NSectionWithInfo, type NSectionWithInfoItem, type NSectionWithInfoProps, NSheet, type NSheetClassNames, type NSheetProps, NSidebar, NSidebarContent, type NSidebarContentProps, NSidebarFooter, type NSidebarFooterProps, NSidebarHeader, type NSidebarHeaderProps, NSidebarItem, NSidebarLogo, type NSidebarLogoProps, NSidebarMobile, type NSidebarMobileProps, NSidebarSection, type NSidebarSectionProps, NSkeleton, NSkeletonCalendar, NSkeletonChart, NSkeletonDonut, NSkeletonEventList, NSkeletonWidget, NSkeletonWidgets, NSlider, type NSliderProps, NSmartPasteDialog, type NSmartPasteDialogProps, NSpinner, type NSpinnerProps, NStatCard, type NStatCardClassNames, type NStatCardProps, NStatCardSkeleton, type NStatCardVariant, NStatusBreakdown, type NStatusBreakdownProps, Swap as NSwap, type NSwapProps, NTable, type NTableCardPagination, NTableCardRoot, type NTableCardRootProps, NTableCards, type NTableClassNames, type NTableColumnBreakpoint, type NTableColumnDef, type NTableColumnMeta, NTableContent, type NTableDefaults, NTableDefaultsProvider, NTableHeader, type NTableInfinitePagination, type NTableLoadMorePagination, NTableLoadingSkeleton, type NTableMenu, type NTableMenuProp, type NTablePageItem, NTablePagination, type NTablePaginationLabels, type NTablePaginationVariant, type NTableProps, NTableRowSkeleton, NTableSkeleton, type NTableState, NTabs, type NTabsClassNames, type NTabsColor, type NTabsItem, type NTabsProps, type NTabsStyles, NThemeCustomizer, type NThemeCustomizerFontOption, type NThemeCustomizerLabels, type NThemeCustomizerProps, type NThemeCustomizerTab, type NThemePreset, NThemePresets, type NThemePresetsLabels, type NThemePresetsProps, type NThemePresetsStatus, NUploader, type NUploaderItem, type NUploaderItemStatus, type NUploaderProps, NViewBody, NViewToggle, type NajmAccent, type NajmAppearance, type NajmBorderSide, type NajmComponentName, type NajmComponentRadius, type NajmComponentStyleConfig, type NajmComponentThemeConfig, type NajmDensity, type NajmDesignConfig, NajmDesignProvider, type NajmDesignProviderProps, type NajmLayoutConfig, type NajmMode, type NajmPreset, type NajmResponsiveBreakpoint, type NajmResponsiveValue, NajmScroll, type NajmScrollProps, type NajmSlotStyle, type NajmThemeConfig, NajmThemeProvider, type NajmThemeProviderProps, type NajmThemeTokens, type NajmTypographyConfig, type NajmVariantStyle, NativeSelect, type NativeSelectOption, type NativeSelectProps, type NavItem, type NavItemGroup, NumberInput, type NumberInputProps, OtpInput, type OtpInputProps, PasswordInput, type PasswordInputProps, PhoneInput, type PhoneInputProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PrefixProvider, Progress, type ProgressColor, type ProgressLabelPosition, type ProgressProps, type ProgressSize, type PushDialogOptions, RADIUS_VALUE_MAP, RadioGroup, RadioGroupInput, type RadioGroupInputProps, RadioGroupItem, type RenderSlot, RepeatingFields, type RepeatingFieldsProps, ScrollArea, type ScrollAreaProps, SearchField, SearchField as SearchInput, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectInput, type SelectInputProps, SelectItem, type SelectItemType$1 as SelectItemDataType, type SelectItemType, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, type SidebarItemProps, type SidebarProps, type SidebarWidth, type SidebarWidths, SimpleTooltip, type SimpleTooltipProps, NSkeleton as Skeleton, Slider, SliderInput, type SliderInputProps, type SliderOrientation, type SliderProps, type SliderSize, type SliderVariant, type SmartPastePreview, type SpinnerVariant, StarRatingInput, type StarRatingInputProps, StatusPill, type StatusPillProps, type StatusPillTone, type StepConfig, StepIndicator, type StepMeta, StepsHeader, StepsProgress, type StorageMenuAction, type StorageSortOption, type StorageTarget, Swap, type SwapEffect, SwapIndeterminate, SwapOff, SwapOn, type SwapProps, type SwapSize, type SwapState, Switch, type SwitchColor, SwitchInput, type SwitchInputProps, type SwitchSize, TAB_COLORS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderColor, TableRow, type TableState, type TableStore, TableStoreContext, Tabs, TabsContent, TabsList, type TabsListProps, type TabsOrientation, type TabsProps, TabsTrigger, type TabsTriggerProps, type TabsVariant, TextAreaInput, type TextAreaInputProps, TextInput, type TextInputProps, Textarea, TimeInput, type TimeInputProps, TimeZoneInput, type TimeZoneInputProps, Toaster, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseContextMenuResult, type UseNFormOptions, type UseStorageContextMenuOptions, type UseStorageContextMenuResult, type UserMenuAction, VariantProvider, type WizardClassNames, WizardForm, type WizardFormProps, alertVariants, avatarVariants, badgeColorVariants, badgeVariants, buildDefaultFileColumns, buildPageItems, buttonVariants, cn, composePreset, createDialogStore, createTableStore, defineNajmDesignConfig, defineNajmThemeConfig, detectFormat, dialogVariants, filterResponsiveColumns, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNChartColor, getNextEditorTabValue, hiddenBelowClasses, indicatorVariants, inputBorderClasses, normalizeThemeFileName, parseColor, parseNajmDesignConfig, parseNajmThemeConfig, parseThemeFile, resolveHiddenBelowClass, resolvePreset, resolveRadiusValue, resolveSlot, resolveVariantAlias, sidebarBorderClasses, sliderVariants, stringifyNajmDesignConfig, stringifyNajmThemeConfig, stringifyThemeFile, surfaceBorderClasses, swapVariants, toPickerHex, toggleVariants, tooltipContentVariants, truncateByCharacters, useClickOutside, useContextMenu, useDebouncedValue, useDelayedLoading, useDialog, useDialogStore, useDynamicPageSize, useFormField, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useNForm, useNPortalScope, useNTableDefaults, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmThemeMode, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useTableStore, useVariant, useVariantPreset };
|
|
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';
|
|
@@ -2354,6 +2354,35 @@ var IconButton = React.forwardRef(
|
|
|
2354
2354
|
}
|
|
2355
2355
|
);
|
|
2356
2356
|
IconButton.displayName = "IconButton";
|
|
2357
|
+
var NSidebarContext = createContext(null);
|
|
2358
|
+
function useNSidebar() {
|
|
2359
|
+
return useContext(NSidebarContext);
|
|
2360
|
+
}
|
|
2361
|
+
function NSidebarProvider({
|
|
2362
|
+
children,
|
|
2363
|
+
defaultCollapsed = false,
|
|
2364
|
+
mobileBreakpoint = "md"
|
|
2365
|
+
}) {
|
|
2366
|
+
const [collapsed, setCollapsed] = useState(defaultCollapsed);
|
|
2367
|
+
const [mobileOpen, setMobileOpen] = useState(false);
|
|
2368
|
+
const openMobile = useCallback(() => setMobileOpen(true), []);
|
|
2369
|
+
const closeMobile = useCallback(() => setMobileOpen(false), []);
|
|
2370
|
+
const toggleCollapsed = useCallback(() => setCollapsed((prev) => !prev), []);
|
|
2371
|
+
const value = useMemo(
|
|
2372
|
+
() => ({
|
|
2373
|
+
collapsed,
|
|
2374
|
+
mobileOpen,
|
|
2375
|
+
openMobile,
|
|
2376
|
+
closeMobile,
|
|
2377
|
+
setMobileOpen,
|
|
2378
|
+
setCollapsed,
|
|
2379
|
+
toggleCollapsed,
|
|
2380
|
+
mobileBreakpoint
|
|
2381
|
+
}),
|
|
2382
|
+
[collapsed, mobileOpen, openMobile, closeMobile, toggleCollapsed, mobileBreakpoint]
|
|
2383
|
+
);
|
|
2384
|
+
return /* @__PURE__ */ jsx(NSidebarContext.Provider, { value, children });
|
|
2385
|
+
}
|
|
2357
2386
|
function NPageHeaderActions({ children, className }) {
|
|
2358
2387
|
return /* @__PURE__ */ jsx("div", { className: cn("flex shrink-0 items-center gap-0 lg:gap-1 xl:gap-2 2xl:gap-2", className), children });
|
|
2359
2388
|
}
|
|
@@ -2420,7 +2449,7 @@ function NPageHeader({
|
|
|
2420
2449
|
compactActions,
|
|
2421
2450
|
filters,
|
|
2422
2451
|
top,
|
|
2423
|
-
mobileBreakpoint
|
|
2452
|
+
mobileBreakpoint: mobileBreakpointProp,
|
|
2424
2453
|
onSidebarOpen,
|
|
2425
2454
|
sidebarTriggerLabel = "Open sidebar",
|
|
2426
2455
|
sidebarTriggerClassName,
|
|
@@ -2433,6 +2462,9 @@ function NPageHeader({
|
|
|
2433
2462
|
}) {
|
|
2434
2463
|
const [internalSearch, setInternalSearch] = useState("");
|
|
2435
2464
|
const recipe = useNajmComponentStyle("pageHeader");
|
|
2465
|
+
const sidebar = useNSidebar();
|
|
2466
|
+
const resolvedOnSidebarOpen = onSidebarOpen ?? sidebar?.openMobile;
|
|
2467
|
+
const mobileBreakpoint = mobileBreakpointProp ?? sidebar?.mobileBreakpoint ?? "md";
|
|
2436
2468
|
const searchValue = search?.value ?? internalSearch;
|
|
2437
2469
|
const handleSearchChange = useCallback((e) => {
|
|
2438
2470
|
setInternalSearch(e.currentTarget.value);
|
|
@@ -2487,13 +2519,13 @@ function NPageHeader({
|
|
|
2487
2519
|
headerClassName
|
|
2488
2520
|
),
|
|
2489
2521
|
children: [
|
|
2490
|
-
|
|
2522
|
+
resolvedOnSidebarOpen && /* @__PURE__ */ jsx(
|
|
2491
2523
|
Button,
|
|
2492
2524
|
{
|
|
2493
2525
|
type: "button",
|
|
2494
2526
|
variant: "ghost",
|
|
2495
2527
|
size: "icon",
|
|
2496
|
-
onClick:
|
|
2528
|
+
onClick: resolvedOnSidebarOpen,
|
|
2497
2529
|
"aria-label": sidebarTriggerLabel,
|
|
2498
2530
|
"data-slot": "page-header-sidebar-trigger",
|
|
2499
2531
|
className: cn(
|
|
@@ -4493,7 +4525,6 @@ function ThemeCustomizerComponentsLayoutTab({
|
|
|
4493
4525
|
["mobileWidth", labels.sidebarMobileWidth, 240]
|
|
4494
4526
|
].map(([key, label, placeholder]) => {
|
|
4495
4527
|
const current = components.sidebar?.[key];
|
|
4496
|
-
const factory = factoryComponents.sidebar?.[key];
|
|
4497
4528
|
const inputId = `najm-sidebar-${key}`;
|
|
4498
4529
|
const changeWidth = (delta) => {
|
|
4499
4530
|
if (disabled) return;
|
|
@@ -4514,9 +4545,6 @@ function ThemeCustomizerComponentsLayoutTab({
|
|
|
4514
4545
|
label,
|
|
4515
4546
|
htmlFor: inputId,
|
|
4516
4547
|
className: key === "mobileWidth" ? "col-span-2" : void 0,
|
|
4517
|
-
onReset: current !== factory ? () => handleResetComponentField("sidebar", key) : void 0,
|
|
4518
|
-
resetLabel: labels.resetField,
|
|
4519
|
-
resetAriaLabel: `${labels.resetField} ${labelText(label)}`.trim(),
|
|
4520
4548
|
disabled,
|
|
4521
4549
|
children: /* @__PURE__ */ jsxs("div", { className: "relative h-9 overflow-hidden rounded-md border border-input bg-card shadow-xs transition-[color,box-shadow] focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50", children: [
|
|
4522
4550
|
/* @__PURE__ */ jsx(
|
|
@@ -4575,24 +4603,6 @@ function ThemeCustomizerComponentsLayoutTab({
|
|
|
4575
4603
|
CustomizerField,
|
|
4576
4604
|
{
|
|
4577
4605
|
label: labels.sidebarSections,
|
|
4578
|
-
onReset: components.sidebar?.showSectionLabels !== factoryComponents.sidebar?.showSectionLabels || components.sidebar?.showSectionSeparators !== factoryComponents.sidebar?.showSectionSeparators ? () => {
|
|
4579
|
-
const withLabels = setComponentField(
|
|
4580
|
-
value,
|
|
4581
|
-
"sidebar",
|
|
4582
|
-
"showSectionLabels",
|
|
4583
|
-
factoryComponents.sidebar?.showSectionLabels
|
|
4584
|
-
);
|
|
4585
|
-
onChange(
|
|
4586
|
-
setComponentField(
|
|
4587
|
-
withLabels,
|
|
4588
|
-
"sidebar",
|
|
4589
|
-
"showSectionSeparators",
|
|
4590
|
-
factoryComponents.sidebar?.showSectionSeparators
|
|
4591
|
-
)
|
|
4592
|
-
);
|
|
4593
|
-
} : void 0,
|
|
4594
|
-
resetLabel: labels.resetField,
|
|
4595
|
-
resetAriaLabel: `${labels.resetField} ${labelText(labels.sidebarSections)}`.trim(),
|
|
4596
4606
|
disabled,
|
|
4597
4607
|
children: /* @__PURE__ */ jsx(
|
|
4598
4608
|
MultiSelectInput,
|
|
@@ -8694,6 +8704,29 @@ function ScrollArea({ className, children, ...props }) {
|
|
|
8694
8704
|
}
|
|
8695
8705
|
) });
|
|
8696
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
|
+
}
|
|
8697
8730
|
var avatarVariants = cva(
|
|
8698
8731
|
"relative flex shrink-0 overflow-hidden",
|
|
8699
8732
|
{
|
|
@@ -12535,6 +12568,7 @@ var createTableStore = (seed) => {
|
|
|
12535
12568
|
manualPagination: false,
|
|
12536
12569
|
pageCount: void 0,
|
|
12537
12570
|
rowCount: void 0,
|
|
12571
|
+
hasNextPage: void 0,
|
|
12538
12572
|
pagination: { pageIndex: 0, pageSize: 10 },
|
|
12539
12573
|
isPaginationControlled: false,
|
|
12540
12574
|
onPaginationChange: null,
|
|
@@ -14008,7 +14042,12 @@ function NTableCards({ effectiveMode }) {
|
|
|
14008
14042
|
}
|
|
14009
14043
|
|
|
14010
14044
|
// src/components/table/paginationPages.ts
|
|
14011
|
-
function buildPageItems(pageIndex, pageCount, siblingCount = 1) {
|
|
14045
|
+
function buildPageItems(pageIndex, pageCount, siblingCount = 1, unbounded = false) {
|
|
14046
|
+
const items = buildKnownPageItems(pageIndex, pageCount, siblingCount);
|
|
14047
|
+
if (!unbounded || items.length === 0) return items;
|
|
14048
|
+
return [...items, { type: "gap", key: "end" }];
|
|
14049
|
+
}
|
|
14050
|
+
function buildKnownPageItems(pageIndex, pageCount, siblingCount) {
|
|
14012
14051
|
const pages = Math.max(0, Math.floor(pageCount));
|
|
14013
14052
|
if (pages <= 0) return [];
|
|
14014
14053
|
const current = Math.min(Math.max(0, Math.floor(pageIndex)), pages - 1);
|
|
@@ -14164,14 +14203,38 @@ function CardLoadMorePagination({
|
|
|
14164
14203
|
}
|
|
14165
14204
|
var navButtonClass = "h-8 w-8 p-0 text-foreground disabled:text-muted-foreground disabled:opacity-70";
|
|
14166
14205
|
var chevronClass = "h-4 w-4 rtl:-scale-x-100";
|
|
14206
|
+
function useLowerBoundPageCountWarning(manualPagination, pageCount, pagination) {
|
|
14207
|
+
const previous = React__default.useRef(null);
|
|
14208
|
+
const warned = React__default.useRef(false);
|
|
14209
|
+
React__default.useEffect(() => {
|
|
14210
|
+
if (typeof console === "undefined") return;
|
|
14211
|
+
if (typeof process !== "undefined" && process.env?.NODE_ENV === "production") return;
|
|
14212
|
+
if (!manualPagination || pageCount === void 0 || !pagination) {
|
|
14213
|
+
previous.current = null;
|
|
14214
|
+
return;
|
|
14215
|
+
}
|
|
14216
|
+
const last = previous.current;
|
|
14217
|
+
previous.current = { ...pagination, pageCount };
|
|
14218
|
+
if (!last || warned.current) return;
|
|
14219
|
+
if (last.pageSize !== pagination.pageSize) return;
|
|
14220
|
+
const advanced = pagination.pageIndex - last.pageIndex;
|
|
14221
|
+
if (advanced <= 0 || pageCount - last.pageCount !== advanced) return;
|
|
14222
|
+
if (pageCount - pagination.pageIndex > 2) return;
|
|
14223
|
+
warned.current = true;
|
|
14224
|
+
console.warn(
|
|
14225
|
+
"NTable received a pageCount that grew with the page index, so it is a lower bound rather than a result total and the numbered bar would gain a page button per click. For a list whose endpoint reports no total, drop pageCount and pass hasNextPage instead."
|
|
14226
|
+
);
|
|
14227
|
+
}, [manualPagination, pageCount, pagination]);
|
|
14228
|
+
}
|
|
14167
14229
|
function PageNumbers({
|
|
14168
14230
|
pageIndex,
|
|
14169
14231
|
pageCount,
|
|
14232
|
+
unbounded,
|
|
14170
14233
|
bordered,
|
|
14171
14234
|
labels,
|
|
14172
14235
|
onSelect
|
|
14173
14236
|
}) {
|
|
14174
|
-
return /* @__PURE__ */ jsx(Fragment, { children: buildPageItems(pageIndex, pageCount).map((item) => {
|
|
14237
|
+
return /* @__PURE__ */ jsx(Fragment, { children: buildPageItems(pageIndex, pageCount, 1, unbounded).map((item) => {
|
|
14175
14238
|
if (item.type === "gap") {
|
|
14176
14239
|
return /* @__PURE__ */ jsx(
|
|
14177
14240
|
"span",
|
|
@@ -14213,12 +14276,14 @@ function NTablePagination() {
|
|
|
14213
14276
|
const manualPagination = useTableStore.use.manualPagination();
|
|
14214
14277
|
const pageCount = useTableStore.use.pageCount();
|
|
14215
14278
|
const rowCount = useTableStore.use.rowCount();
|
|
14279
|
+
const suppliedHasNextPage = useTableStore.use.hasNextPage();
|
|
14216
14280
|
const setPagination = useTableStore.use.setPagination();
|
|
14217
14281
|
const isPaginationControlled = useTableStore.use.isPaginationControlled();
|
|
14218
14282
|
const bordered = useTableStore.use.bordered();
|
|
14219
14283
|
const paginationVariant = useTableStore.use.paginationVariant();
|
|
14220
14284
|
const ownLabels = useTableStore.use.paginationLabels();
|
|
14221
14285
|
const labels = useResolvedPaginationLabels(ownLabels);
|
|
14286
|
+
useLowerBoundPageCountWarning(manualPagination, pageCount, pagination);
|
|
14222
14287
|
if (!showPagination || effectiveViewMode === "json" || effectiveViewMode === "files") return null;
|
|
14223
14288
|
if (cardPagination.mode === "all") return null;
|
|
14224
14289
|
if (effectiveViewMode === "cards" && cardPagination.mode === "infinite") return null;
|
|
@@ -14236,7 +14301,8 @@ function NTablePagination() {
|
|
|
14236
14301
|
const filteredRows = table ? table.getFilteredRowModel().rows : [];
|
|
14237
14302
|
const selectedRows = table ? table.getFilteredSelectedRowModel().rows : [];
|
|
14238
14303
|
const { pageIndex, pageSize } = table ? table.getState().pagination : pagination;
|
|
14239
|
-
const
|
|
14304
|
+
const unbounded = manualPagination && pageCount === void 0 && suppliedHasNextPage !== void 0;
|
|
14305
|
+
const effectivePageCount = manualPagination && pageCount !== void 0 ? pageCount : unbounded ? pageIndex + (suppliedHasNextPage ? 2 : 1) : table ? table.getPageCount() : 1;
|
|
14240
14306
|
const currentPagination = pagination ?? { pageIndex, pageSize };
|
|
14241
14307
|
const currentPageSizeOptions = pageSizeOptions.includes(pageSize) ? pageSizeOptions : [...pageSizeOptions, pageSize].sort((a, b) => a - b);
|
|
14242
14308
|
const navigate = (direction) => {
|
|
@@ -14261,10 +14327,11 @@ function NTablePagination() {
|
|
|
14261
14327
|
const newSize = Number(value);
|
|
14262
14328
|
setPagination({ pageIndex: 0, pageSize: newSize });
|
|
14263
14329
|
};
|
|
14264
|
-
const hasTrustworthyPageCount = manualPagination ? pageCount !== void 0 && pageCount > 0 : effectivePageCount > 0;
|
|
14330
|
+
const hasTrustworthyPageCount = manualPagination ? pageCount !== void 0 && pageCount > 0 || unbounded : effectivePageCount > 0;
|
|
14265
14331
|
const showNumbers = paginationVariant === "numbered" && hasTrustworthyPageCount;
|
|
14266
14332
|
const canPrevious = (table?.getCanPreviousPage?.() ?? pageIndex > 0) && pageIndex > 0;
|
|
14267
|
-
const canNext = (table?.getCanNextPage?.() ?? true) && pageIndex < effectivePageCount - 1;
|
|
14333
|
+
const canNext = unbounded ? Boolean(suppliedHasNextPage) : (table?.getCanNextPage?.() ?? true) && pageIndex < effectivePageCount - 1;
|
|
14334
|
+
const canLast = canNext && !unbounded;
|
|
14268
14335
|
const selectedTotal = manualPagination && rowCount !== void 0 ? rowCount : filteredRows.length;
|
|
14269
14336
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex w-full min-w-0 flex-wrap items-center justify-between gap-x-4 gap-y-2 py-1 text-foreground", classNames?.pagination), children: [
|
|
14270
14337
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-4 lg:gap-6", children: [
|
|
@@ -14282,7 +14349,7 @@ function NTablePagination() {
|
|
|
14282
14349
|
/* @__PURE__ */ jsx(SelectContent, { side: "top", children: currentPageSizeOptions.map((size) => /* @__PURE__ */ jsx(SelectItem, { value: `${size}`, children: size }, size)) })
|
|
14283
14350
|
] })
|
|
14284
14351
|
] }),
|
|
14285
|
-
/* @__PURE__ */ jsx("div", { className: cn("text-sm font-medium text-foreground", showNumbers && "sm:hidden"), children: labels.pageOf?.(pageIndex + 1, effectivePageCount) ?? `Page ${pageIndex + 1} of ${effectivePageCount}` }),
|
|
14352
|
+
/* @__PURE__ */ jsx("div", { className: cn("text-sm font-medium text-foreground", showNumbers && "sm:hidden"), children: unbounded ? labels.pageOfUnknown?.(pageIndex + 1) ?? `Page ${pageIndex + 1}` : labels.pageOf?.(pageIndex + 1, effectivePageCount) ?? `Page ${pageIndex + 1} of ${effectivePageCount}` }),
|
|
14286
14353
|
/* @__PURE__ */ jsxs(
|
|
14287
14354
|
"nav",
|
|
14288
14355
|
{
|
|
@@ -14296,13 +14363,14 @@ function NTablePagination() {
|
|
|
14296
14363
|
{
|
|
14297
14364
|
pageIndex,
|
|
14298
14365
|
pageCount: effectivePageCount,
|
|
14366
|
+
unbounded: unbounded && Boolean(suppliedHasNextPage),
|
|
14299
14367
|
bordered,
|
|
14300
14368
|
labels,
|
|
14301
14369
|
onSelect: (next) => setPagination({ ...currentPagination, pageIndex: next })
|
|
14302
14370
|
}
|
|
14303
14371
|
) }),
|
|
14304
14372
|
/* @__PURE__ */ jsx(Button, { bordered, variant: "outline", className: navButtonClass, "aria-label": labels.nextPage ?? "Next", onClick: () => navigate("next"), disabled: !canNext, children: /* @__PURE__ */ jsx(ChevronRight, { className: chevronClass }) }),
|
|
14305
|
-
!showNumbers && /* @__PURE__ */ jsx(Button, { bordered, variant: "outline", className: cn(navButtonClass, "hidden lg:flex"), "aria-label": labels.lastPage ?? "Last page", onClick: () => navigate("last"), disabled: !
|
|
14373
|
+
!showNumbers && /* @__PURE__ */ jsx(Button, { bordered, variant: "outline", className: cn(navButtonClass, "hidden lg:flex"), "aria-label": labels.lastPage ?? "Last page", onClick: () => navigate("last"), disabled: !canLast, children: /* @__PURE__ */ jsx(ChevronsRight, { className: chevronClass }) })
|
|
14306
14374
|
]
|
|
14307
14375
|
}
|
|
14308
14376
|
)
|
|
@@ -14891,6 +14959,7 @@ function NTable(props) {
|
|
|
14891
14959
|
manualPagination: props.manualPagination ?? false,
|
|
14892
14960
|
pageCount: props.pageCount,
|
|
14893
14961
|
rowCount: props.rowCount,
|
|
14962
|
+
hasNextPage: props.hasNextPage,
|
|
14894
14963
|
pagination: props.pagination,
|
|
14895
14964
|
defaultPagination: props.defaultPagination,
|
|
14896
14965
|
onPaginationChange: props.onPaginationChange ?? null,
|
|
@@ -15294,42 +15363,45 @@ function NSidebarHeader({ children, collapsed, className, classNames }) {
|
|
|
15294
15363
|
className
|
|
15295
15364
|
), children });
|
|
15296
15365
|
}
|
|
15297
|
-
|
|
15298
|
-
|
|
15299
|
-
|
|
15300
|
-
|
|
15301
|
-
|
|
15302
|
-
|
|
15303
|
-
|
|
15304
|
-
|
|
15305
|
-
const
|
|
15306
|
-
|
|
15307
|
-
|
|
15308
|
-
|
|
15309
|
-
|
|
15310
|
-
|
|
15311
|
-
|
|
15312
|
-
|
|
15313
|
-
|
|
15314
|
-
|
|
15315
|
-
|
|
15316
|
-
|
|
15317
|
-
|
|
15318
|
-
{
|
|
15319
|
-
className: cn(
|
|
15320
|
-
"size-10 rounded-lg bg-sidebar-primary/10 flex items-center justify-center shrink-0",
|
|
15321
|
-
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))]"
|
|
15322
|
-
),
|
|
15323
|
-
children: IconNode
|
|
15324
|
-
}
|
|
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
|
|
15325
15387
|
),
|
|
15326
|
-
|
|
15327
|
-
|
|
15328
|
-
|
|
15329
|
-
|
|
15330
|
-
|
|
15331
|
-
|
|
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"
|
|
15332
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 });
|
|
15333
15405
|
}
|
|
15334
15406
|
function defaultIsActive(item, activePath) {
|
|
15335
15407
|
if (item.href) return activePath === item.href;
|
|
@@ -15628,6 +15700,10 @@ function NSidebarMobile({
|
|
|
15628
15700
|
)
|
|
15629
15701
|
] });
|
|
15630
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
|
+
}
|
|
15631
15707
|
function buildGroups(items) {
|
|
15632
15708
|
const groups = [];
|
|
15633
15709
|
for (const item of items) {
|
|
@@ -15718,7 +15794,7 @@ function NSidebar({
|
|
|
15718
15794
|
footer,
|
|
15719
15795
|
className,
|
|
15720
15796
|
classNames,
|
|
15721
|
-
mobileBreakpoint
|
|
15797
|
+
mobileBreakpoint: mobileBreakpointProp,
|
|
15722
15798
|
autoCollapseAt,
|
|
15723
15799
|
mobileOpen: mobileOpenProp,
|
|
15724
15800
|
defaultMobileOpen = false,
|
|
@@ -15730,10 +15806,6 @@ function NSidebar({
|
|
|
15730
15806
|
expandLabel = "Expand",
|
|
15731
15807
|
hamburgerClassName,
|
|
15732
15808
|
showHamburgerButton = false,
|
|
15733
|
-
logoIcon,
|
|
15734
|
-
logoTitle,
|
|
15735
|
-
logoSubtitle,
|
|
15736
|
-
onLogoClick,
|
|
15737
15809
|
onSettings,
|
|
15738
15810
|
settingsLabel,
|
|
15739
15811
|
onLogout,
|
|
@@ -15743,22 +15815,32 @@ function NSidebar({
|
|
|
15743
15815
|
const recipe = useNajmComponentStyle("sidebar");
|
|
15744
15816
|
const [_mobileOpen, _setMobileOpen] = useState(defaultMobileOpen);
|
|
15745
15817
|
const [_collapsed, _setCollapsed] = useState(defaultCollapsed);
|
|
15746
|
-
const
|
|
15747
|
-
const
|
|
15748
|
-
const
|
|
15818
|
+
const sidebar = useNSidebar();
|
|
15819
|
+
const branding = useNBranding();
|
|
15820
|
+
const isMobileControlled = mobileOpenProp !== void 0;
|
|
15821
|
+
const isCollapsedControlled = collapsedProp !== void 0;
|
|
15822
|
+
const mobileOpen = isMobileControlled ? mobileOpenProp : sidebar?.mobileOpen ?? _mobileOpen;
|
|
15823
|
+
const collapsed = isCollapsedControlled ? collapsedProp : sidebar?.collapsed ?? _collapsed;
|
|
15824
|
+
const mobileBreakpoint = mobileBreakpointProp ?? sidebar?.mobileBreakpoint ?? "md";
|
|
15749
15825
|
const autoCollapsed = useAutoCollapsed(autoCollapseAt);
|
|
15750
15826
|
const desktopCollapsed = collapsed || autoCollapsed;
|
|
15751
15827
|
const setMobileOpen = (open) => {
|
|
15752
|
-
if (!
|
|
15828
|
+
if (!isMobileControlled) {
|
|
15829
|
+
if (sidebar) sidebar.setMobileOpen(open);
|
|
15830
|
+
else _setMobileOpen(open);
|
|
15831
|
+
}
|
|
15753
15832
|
onMobileOpenChange?.(open);
|
|
15754
15833
|
};
|
|
15755
15834
|
const [railDragging, setRailDragging] = useState(false);
|
|
15756
15835
|
const suppressRailClickRef = useRef(false);
|
|
15757
15836
|
const setCollapsedState = useCallback((next) => {
|
|
15758
15837
|
if (next === collapsed) return;
|
|
15759
|
-
if (
|
|
15838
|
+
if (!isCollapsedControlled) {
|
|
15839
|
+
if (sidebar) sidebar.setCollapsed(next);
|
|
15840
|
+
else _setCollapsed(next);
|
|
15841
|
+
}
|
|
15760
15842
|
onCollapsedChange?.(next);
|
|
15761
|
-
}, [collapsed,
|
|
15843
|
+
}, [collapsed, isCollapsedControlled, sidebar, onCollapsedChange]);
|
|
15762
15844
|
const handleToggleCollapsed = useCallback(() => {
|
|
15763
15845
|
setCollapsedState(!collapsed);
|
|
15764
15846
|
}, [collapsed, setCollapsedState]);
|
|
@@ -15827,10 +15909,36 @@ function NSidebar({
|
|
|
15827
15909
|
const effectiveShowSectionSeparators = showSectionSeparators ?? recipe?.showSectionSeparators ?? false;
|
|
15828
15910
|
const contentSlot = recipe?.slots?.content;
|
|
15829
15911
|
const contentStyle = contentSlot?.paddingTop ? { paddingTop: contentSlot.paddingTop } : void 0;
|
|
15830
|
-
const
|
|
15831
|
-
|
|
15832
|
-
|
|
15833
|
-
|
|
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);
|
|
15834
15942
|
const contentProps = {
|
|
15835
15943
|
groups,
|
|
15836
15944
|
activePath,
|
|
@@ -16273,4 +16381,4 @@ function NGridItem({
|
|
|
16273
16381
|
return /* @__PURE__ */ jsx("div", { className: itemClassName, ...props, children });
|
|
16274
16382
|
}
|
|
16275
16383
|
|
|
16276
|
-
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 };
|