najm-kit 2.7.2 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as NajmDesignConfig, b as NajmThemeProviderProps, c as NajmAppearance, d as NajmMode, e as NajmThemeConfig, f as NajmAccent, g as NajmThemeTokens, h as NajmPreset, i as NajmComponentName, j as NajmComponentStyleConfig, k as NajmComponentThemeConfig, l as NajmTypographyConfig, m as NajmLayoutConfig, n as NajmVariantStyle, o as NajmResponsiveBreakpoint, p as NajmResponsiveValue } from './NajmUIProvider-ClpHD-55.js';
3
- export { D as DEFAULT_TIME_ZONE, q as NAJM_COMPONENT_NAMES, r as NTableDefaults, s as NTableDefaultsProvider, t as NajmComponentRadius, u as NajmDensity, v as NajmPreferencesContextValue, w as NajmPreferencesProvider, x as NajmPreferencesProviderProps, y as NajmSlotStyle, z as NajmUIProvider, N as NajmUIProviderProps, R as RADIUS_VALUE_MAP, A as resolveRadiusValue, B as useNTableDefaults, C as useNajmPreferencesContext, E as useNajmTheme, F as useNajmTimeZone } from './NajmUIProvider-ClpHD-55.js';
2
+ import { a as NajmDesignConfig, b as NajmThemeProviderProps, c as NajmAppearance, d as NajmMode, e as NajmThemeConfig, f as NajmAccent, g as NajmThemeTokens, h as NajmPreset, i as NajmComponentName, j as NajmComponentStyleConfig, k as NajmComponentThemeConfig, l as NajmTypographyConfig, m as NajmLayoutConfig, n as NajmVariantStyle, o as NajmResponsiveBreakpoint, p as NajmResponsiveValue } from './NajmUIProvider-BSbXaqak.js';
3
+ export { D as DEFAULT_TIME_ZONE, q as NAJM_COMPONENT_NAMES, r as NTableDefaults, s as NTableDefaultsProvider, t as NajmComponentRadius, u as NajmDensity, v as NajmPreferencesContextValue, w as NajmPreferencesProvider, x as NajmPreferencesProviderProps, y as NajmSlotStyle, z as NajmUIProvider, N as NajmUIProviderProps, R as RADIUS_VALUE_MAP, A as resolveRadiusValue, B as useNTableDefaults, C as useNajmPreferencesContext, E as useNajmTheme, F as useNajmTimeZone } from './NajmUIProvider-BSbXaqak.js';
4
4
  import * as React$1 from 'react';
5
5
  import React__default, { RefObject, ReactNode, ComponentType, InputHTMLAttributes, Ref, ImgHTMLAttributes, CSSProperties, MouseEvent, MouseEventHandler } from 'react';
6
- import { N as NTablePaginationVariant, a as NTablePaginationLabels, b as NTableCardPagination } from './paginationLabels-CY2PvbMj.js';
7
- export { D as DEFAULT_PAGINATION_KEY_PREFIX, c as NTableInfinitePagination, d as NTableLoadMorePagination, e as NajmTranslate, f as buildPaginationLabels } from './paginationLabels-CY2PvbMj.js';
6
+ import { c as NTablePaginationVariant, b as NTablePaginationLabels, a as NTableCardPagination } from './paginationLabels-dZLSNxfo.js';
7
+ export { D as DEFAULT_PAGINATION_KEY_PREFIX, d as NTableInfinitePagination, e as NTableLoadMorePagination, N as NajmTranslate, f as buildPaginationLabels } from './paginationLabels-dZLSNxfo.js';
8
8
  import * as class_variance_authority_types from 'class-variance-authority/types';
9
9
  import { VariantProps } from 'class-variance-authority';
10
10
  import * as LabelPrimitive from '@radix-ui/react-label';
@@ -39,8 +39,11 @@ import { ZodTypeAny, TypeOf } from 'zod';
39
39
  import { SortingState, ExpandedState, ColumnDef, Row, ColumnFiltersState, VisibilityState, RowSelectionState } from '@tanstack/react-table';
40
40
  export { N as NTableJson } from './NTableJson-tXqgfZI1.js';
41
41
  import * as _tanstack_table_core from '@tanstack/table-core';
42
- export { A as ApiPage, C as CardPaginationLabels, a as CardPaginationState, D as DEFAULT_CARD_PAGINATION_KEY_PREFIX, b as DEFAULT_MAX_PAGE_SIZE, c as DEFAULT_PAGE_SIZE, L as ListStrategy, O as OffsetPage, d as OffsetPageFetcher, e as OffsetPageOptions, f as OffsetPagination, Q as QueryValue, R as ResolvedListMode, g as buildCardPaginationLabels, h as cleanQuery, i as createCardPagination, j as createOffsetPagination, k as fetchOffsetPage, l as getPageIndex } from './pagination-BvukSZir.js';
42
+ export { C as CardPaginationKey, a as CardPaginationLabels, b as CardPaginationState, D as DEFAULT_CARD_PAGINATION_KEY_PREFIX, L as ListStrategy, R as ResolvedListMode, c as buildCardPaginationLabels, d as createCardPagination } from './cardPagination-Bwf3tEeN.js';
43
43
  import { ClassValue } from 'clsx';
44
+ export { ApiPage, DEFAULT_MAX_PAGE_SIZE, DEFAULT_PAGE_SIZE, OffsetPage, OffsetPageFetcher, OffsetPageOptions, OffsetPagination, QueryValue, cleanQuery, createOffsetPagination, fetchOffsetPage, getPageIndex } from './pagination.js';
45
+ import { NajmFormatConfig } from './format.js';
46
+ export { DEFAULT_PLACEHOLDER, SlugifyOptions, formatCurrency, formatDate, formatDateTime, formatNumber, formatPercent, formatRelativeTime, formatTime, humanizeToken, localDateInput, slugify } from './format.js';
44
47
 
45
48
  /**
46
49
  * Shared so the identity is stable across renders — `NajmDesignProvider`
@@ -500,6 +503,47 @@ declare const NBadge: typeof Badge;
500
503
  type NBadgeLook = BadgeDisplayLook;
501
504
  type NBadgeProps = BadgeProps;
502
505
 
506
+ /**
507
+ * The status vocabulary every dashboard ends up retyping: lifecycle, review,
508
+ * fulfilment and money states mapped onto the semantic badge colors.
509
+ *
510
+ * Shipped as a default so `<NBadge status="approved" />` is already correct
511
+ * without a per-app table. A consumer's own `statusMap` is consulted first and
512
+ * merges rather than replaces, so overriding one key costs only that key.
513
+ */
514
+ declare const NAJM_STATUS_COLORS: Record<string, BadgeColor>;
515
+ /**
516
+ * Text-only colors per badge color, for the `text`/`minimal` looks and for
517
+ * plain text that has to agree with a nearby badge — an amount rendered in the
518
+ * color of the payment it belongs to, say.
519
+ *
520
+ * `neutral` is `text-muted-foreground`, not `text-neutral-foreground`: the
521
+ * `-foreground` token is the contrast color *on* a solid neutral fill, so it
522
+ * reads as near-white in light mode and near-black in dark, and is unreadable
523
+ * anywhere else.
524
+ */
525
+ declare const NAJM_COLOR_TEXT_CLASSES: Record<BadgeColor, string>;
526
+ /** The looked-up color, or `undefined` when nothing claims this status. */
527
+ declare function findStatusColor(status: string | undefined, statusMap?: Record<string, BadgeColor>): BadgeColor | undefined;
528
+ /**
529
+ * Resolves a status token to a badge color: the consumer's map first, then the
530
+ * built-in vocabulary, then `fallback`.
531
+ *
532
+ * The fallback is `neutral` rather than `primary` because an unrecognized
533
+ * status is exactly the thing that must not shout.
534
+ */
535
+ declare function resolveStatusColor(status: string | undefined, statusMap?: Record<string, BadgeColor>, fallback?: BadgeColor): BadgeColor;
536
+ /** The text-only class for a badge color. */
537
+ declare function colorTextClass(color: BadgeColor): string;
538
+ /**
539
+ * The text-only class for a status token, for text that is *not* a badge — an
540
+ * amount that should carry the color of the payment beside it.
541
+ *
542
+ * An unmapped status returns `""` so the text keeps the surrounding color;
543
+ * pass `fallback` to color it anyway.
544
+ */
545
+ declare function statusTextClass(status: string | undefined, statusMap?: Record<string, BadgeColor>, fallback?: BadgeColor): string;
546
+
503
547
  type IndicatorVertical = "top" | "middle" | "bottom";
504
548
  type IndicatorHorizontal = "start" | "center" | "end";
505
549
  type IndicatorPosition = `${IndicatorVertical}-${IndicatorHorizontal}`;
@@ -3728,57 +3772,21 @@ declare function cn(...inputs: ClassValue[]): string;
3728
3772
 
3729
3773
  declare function resolveSlot<T>(slot: T | ((ctx: any) => ReactNode), ctx?: any): ReactNode;
3730
3774
 
3775
+ /** True when `src` is absent, blank, or the seeded placeholder. */
3776
+ declare function isPlaceholderAvatar(src: string | null | undefined): boolean;
3731
3777
  /**
3732
- * Locale-aware value formatting.
3778
+ * The image to render, or `fallback` when there is no real one.
3733
3779
  *
3734
- * Pure functions with no React and no DOM: every input arrives through
3735
- * `NajmFormatConfig`. `NajmFormatProvider` binds them to the live locale and
3736
- * time zone, and is what an application normally uses — these are exported for
3737
- * the server, where there is no context to read.
3738
- */
3739
- /** Rendered in place of a value that is absent or not formattable. */
3740
- declare const DEFAULT_PLACEHOLDER = "\u2014";
3741
- interface NajmFormatConfig {
3742
- /** BCP 47 tag handed to `Intl`, e.g. `"fr-MA"`. */
3743
- locale: string;
3744
- /**
3745
- * IANA zone every date is rendered in. Omitted means the host zone, which is
3746
- * the runtime's guess rather than the user's preference — supply it.
3747
- */
3748
- timeZone?: string;
3749
- /** ISO 4217 code for `formatCurrency`, e.g. `"MAD"`. */
3750
- currency?: string;
3751
- /** Defaults to an em dash. */
3752
- placeholder?: string;
3753
- }
3754
- /**
3755
- * Formats an integer count of minor units — cents, centimes — as currency.
3756
- *
3757
- * Minor units are the input because money that survives a round trip is an
3758
- * integer; a major-unit float cannot represent 0.1 exactly and has no business
3759
- * in a ledger. A non-integer input is refused rather than rounded, since at
3760
- * this layer it means the caller has already lost precision upstream.
3761
- */
3762
- declare function formatCurrency(minorUnits: number | null | undefined, { locale, currency, placeholder }: NajmFormatConfig): string;
3763
- declare function formatNumber(value: number | null | undefined, { locale, placeholder }: NajmFormatConfig, options?: Intl.NumberFormatOptions): string;
3764
- declare function formatPercent(value: number | null | undefined, config: NajmFormatConfig, fractionDigits?: number): string;
3765
- declare function formatDate(value: Date | number | string | null | undefined, { locale, timeZone, placeholder, }: NajmFormatConfig, options?: Intl.DateTimeFormatOptions): string;
3766
- declare function formatDateTime(value: Date | number | string | null | undefined, config: NajmFormatConfig, options?: Intl.DateTimeFormatOptions): string;
3767
- declare function formatTime(value: Date | number | string | null | undefined, config: NajmFormatConfig): string;
3768
- /**
3769
- * Renders a timestamp as distance from now — "3 days ago", "in 2 hours".
3770
- *
3771
- * Time zone is not a parameter: an elapsed duration is the same in every zone.
3772
- */
3773
- declare function formatRelativeTime(value: Date | number | string | null | undefined, { locale, placeholder }: NajmFormatConfig, now?: Date | number): string;
3774
- /**
3775
- * Turns a machine token into readable text: `out_for_delivery` → `Out For
3776
- * Delivery`.
3780
+ * ```ts
3781
+ * resolveAvatarSrc(child.image, childPlaceholder(child.gender))
3782
+ * ```
3777
3783
  *
3778
- * The fallback for a value with no catalog entry, not a substitute for one.
3779
- * Anything user-visible and known in advance belongs in the translations.
3784
+ * The fallback is a parameter rather than a package default because which stock
3785
+ * image belongs to a record is the application's to decide — a child, a family
3786
+ * and a sponsor do not share one. What is shared is the question of whether the
3787
+ * stored value counts as an image at all, which is all this answers.
3780
3788
  */
3781
- declare function humanizeToken(value: string): string;
3789
+ declare function resolveAvatarSrc<Fallback extends string | null | undefined>(src: string | null | undefined, fallback: Fallback): string | Fallback;
3782
3790
 
3783
3791
  interface NajmFormatContextValue extends Required<Pick<NajmFormatConfig, "locale" | "timeZone" | "placeholder">> {
3784
3792
  currency?: string;
@@ -4261,4 +4269,4 @@ interface NGridItemProps extends Omit<React$1.AllHTMLAttributes<HTMLDivElement>,
4261
4269
  declare function NGrid({ as: Comp, children, cols, smCols, mdCols, lgCols, xlCols, gap, className, style, ...props }: NGridProps): react_jsx_runtime.JSX.Element;
4262
4270
  declare function NGridItem({ children, span, smSpan, mdSpan, lgSpan, xlSpan, className, ...props }: NGridItemProps): react_jsx_runtime.JSX.Element;
4263
4271
 
4264
- 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_CARD_BREAKPOINT, DEFAULT_PLACEHOLDER, 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, EMPTY_DESIGN, 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_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, 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, 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, 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, type NajmFormatConfig, type NajmFormatContextValue, NajmFormatProvider, type NajmFormatProviderProps, NajmLayoutConfig, NajmMode, NajmPreset, NajmResponsiveBreakpoint, NajmResponsiveValue, NajmScroll, type NajmScrollProps, NajmThemeConfig, NajmThemeProvider, NajmThemeProviderProps, NajmThemeTokens, NajmTypographyConfig, 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, 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, formatCurrency, formatDate, formatDateTime, formatFileBytes, formatFileRelative, formatNumber, formatPercent, formatRelativeTime, formatTime, getIconColorProps, getNChartColor, getNextEditorTabValue, hiddenBelowClasses, humanizeToken, indicatorVariants, inputBorderClasses, normalizeThemeFileName, parseColor, parseNajmDesignConfig, parseNajmThemeConfig, parseThemeFile, resolveHiddenBelowClass, resolvePreset, resolveSlot, resolveVariantAlias, sidebarBorderClasses, sliderVariants, stringifyNajmDesignConfig, 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 };
4272
+ 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_CARD_BREAKPOINT, 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, EMPTY_DESIGN, 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_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 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, 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, 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, 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, NajmTypographyConfig, 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, 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, colorTextClass, composePreset, createDialogStore, createTableStore, defineNajmDesignConfig, defineNajmThemeConfig, detectFormat, dialogVariants, filterResponsiveColumns, findStatusColor, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNChartColor, getNextEditorTabValue, hiddenBelowClasses, indicatorVariants, inputBorderClasses, isPlaceholderAvatar, normalizeThemeFileName, parseColor, parseNajmDesignConfig, parseNajmThemeConfig, parseThemeFile, resolveAvatarSrc, resolveHiddenBelowClass, resolvePreset, resolveSlot, resolveStatusColor, resolveVariantAlias, sidebarBorderClasses, sliderVariants, statusTextClass, stringifyNajmDesignConfig, 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
@@ -1,12 +1,16 @@
1
- import { useNBranding } from './chunk-QOP7L6RD.mjs';
2
- export { DEFAULT_PLACEHOLDER, NBrandingProvider, NBrandingStateProvider, NajmFormatProvider, formatCurrency, formatDate, formatDateTime, formatNumber, formatPercent, formatRelativeTime, formatTime, humanizeToken, normalizeBranding, useNBranding, useNBrandingEditor, useNajmFormat, useNajmFormatContext } from './chunk-QOP7L6RD.mjs';
1
+ import { useNBranding } from './chunk-PCPMAEKP.mjs';
2
+ export { NBrandingProvider, NBrandingStateProvider, NajmFormatProvider, normalizeBranding, useNBranding, useNBrandingEditor, useNajmFormat, useNajmFormatContext } from './chunk-PCPMAEKP.mjs';
3
3
  import { useResolvedPaginationLabels } from './chunk-USZUOJMK.mjs';
4
4
  export { DEFAULT_PAGINATION_KEY_PREFIX, DEFAULT_TIME_ZONE, EMPTY_DESIGN, NTableDefaultsProvider, NajmDesignEditorProvider, NajmPreferencesProvider, NajmUIProvider, buildPaginationLabels, useNTableDefaults, useNajmDesignEditor, useNajmPreferencesContext, useNajmTheme, useNajmTimeZone } from './chunk-USZUOJMK.mjs';
5
5
  import { resolveRadiusValue, inputBorderClasses, Button, NIcon, NajmScroll, surfaceBorderClasses, useNajmScrollViewport, resolveVariantAlias, buttonVariants, NButton, parseNajmDesignConfig, useTableStore, TableStoreContext, sidebarBorderClasses, NTableJson } from './chunk-6OOBAEH2.mjs';
6
6
  export { Button, NAJM_COMPONENT_NAMES, NButton, NIcon, NTableJson, NajmScroll, RADIUS_VALUE_MAP, TableStoreContext, buttonVariants, defineNajmDesignConfig, defineNajmThemeConfig, inputBorderClasses, parseNajmDesignConfig, parseNajmThemeConfig, resolveRadiusValue, resolveVariantAlias, sidebarBorderClasses, stringifyNajmDesignConfig, stringifyNajmThemeConfig, surfaceBorderClasses, useTableStore } from './chunk-6OOBAEH2.mjs';
7
7
  import { useNajmComponentStyle, cn, NajmThemeContainerCtx, useNajmThemeMode, useNajmDesign, composePreset } from './chunk-KVZACF4G.mjs';
8
8
  export { NajmDesignProvider, NajmThemeProvider, cn, composePreset, resolvePreset, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmThemeMode } from './chunk-KVZACF4G.mjs';
9
- export { DEFAULT_CARD_BREAKPOINT, DEFAULT_CARD_PAGINATION_KEY_PREFIX, DEFAULT_MAX_PAGE_SIZE, DEFAULT_PAGE_SIZE, buildCardPaginationLabels, cleanQuery, createCardPagination, createOffsetPagination, fetchOffsetPage, getPageIndex, useCardViewport, useDesktopTableMode, useMediaQuery } from './chunk-7J7DWGKB.mjs';
9
+ export { DEFAULT_CARD_BREAKPOINT, DEFAULT_CARD_PAGINATION_KEY_PREFIX, buildCardPaginationLabels, createCardPagination, useCardViewport, useDesktopTableMode, useMediaQuery } from './chunk-OUS7OYVA.mjs';
10
+ import './chunk-F5KXJCCJ.mjs';
11
+ import { humanizeToken } from './chunk-JABLSOQN.mjs';
12
+ export { DEFAULT_PLACEHOLDER, formatCurrency, formatDate, formatDateTime, formatNumber, formatPercent, formatRelativeTime, formatTime, humanizeToken, localDateInput, slugify } from './chunk-JABLSOQN.mjs';
13
+ export { DEFAULT_MAX_PAGE_SIZE, DEFAULT_PAGE_SIZE, cleanQuery, createOffsetPagination, fetchOffsetPage, getPageIndex } from './chunk-2NX2VKS2.mjs';
10
14
  import * as React60 from 'react';
11
15
  import React60__default, { createContext, useRef, useMemo, useState, useEffect, useContext, useCallback, useLayoutEffect, isValidElement } from 'react';
12
16
  import * as TabsPrimitive from '@radix-ui/react-tabs';
@@ -2400,6 +2404,77 @@ function Checkbox({ className, ...props }) {
2400
2404
  }
2401
2405
  );
2402
2406
  }
2407
+
2408
+ // src/components/Badge/status.ts
2409
+ var NAJM_STATUS_COLORS = {
2410
+ active: "success",
2411
+ approved: "success",
2412
+ completed: "success",
2413
+ confirmed: "success",
2414
+ delivered: "success",
2415
+ paid: "success",
2416
+ published: "success",
2417
+ succeeded: "success",
2418
+ validated: "success",
2419
+ verified: "success",
2420
+ in_preparation: "warning",
2421
+ in_progress: "warning",
2422
+ out_for_delivery: "warning",
2423
+ pending: "warning",
2424
+ pending_email_verification: "warning",
2425
+ pending_review: "warning",
2426
+ processing: "warning",
2427
+ submitted: "warning",
2428
+ paused: "info",
2429
+ purchased: "info",
2430
+ scheduled: "info",
2431
+ archived: "neutral",
2432
+ cancelled: "neutral",
2433
+ canceled: "neutral",
2434
+ closed: "neutral",
2435
+ draft: "neutral",
2436
+ inactive: "neutral",
2437
+ stopped: "neutral",
2438
+ unknown: "neutral",
2439
+ blocked: "destructive",
2440
+ expired: "destructive",
2441
+ failed: "destructive",
2442
+ refunded: "destructive",
2443
+ rejected: "destructive",
2444
+ suspended: "destructive"
2445
+ };
2446
+ var NAJM_COLOR_TEXT_CLASSES = {
2447
+ primary: "text-primary",
2448
+ secondary: "text-secondary-foreground",
2449
+ accent: "text-accent-foreground",
2450
+ neutral: "text-muted-foreground",
2451
+ info: "text-info",
2452
+ success: "text-success",
2453
+ warning: "text-warning",
2454
+ destructive: "text-destructive"
2455
+ };
2456
+ function normalizeStatus(status) {
2457
+ return status.trim().toLowerCase().replace(/[\s-]+/g, "_");
2458
+ }
2459
+ function lookup(map, status, normalized) {
2460
+ if (!map) return void 0;
2461
+ return map[status] ?? map[normalized];
2462
+ }
2463
+ function findStatusColor(status, statusMap) {
2464
+ if (!status) return void 0;
2465
+ const normalized = normalizeStatus(status);
2466
+ return lookup(statusMap, status, normalized) ?? lookup(NAJM_STATUS_COLORS, status, normalized);
2467
+ }
2468
+ function resolveStatusColor(status, statusMap, fallback = "neutral") {
2469
+ return findStatusColor(status, statusMap) ?? fallback;
2470
+ }
2471
+ function colorTextClass(color) {
2472
+ return NAJM_COLOR_TEXT_CLASSES[color] ?? "text-foreground";
2473
+ }
2474
+ function statusTextClass(status, statusMap, fallback) {
2475
+ const color = findStatusColor(status, statusMap) ?? fallback;
2476
+ return color ? colorTextClass(color) : "";
2477
+ }
2403
2478
  var badgeVariants = cva(
2404
2479
  "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
2405
2480
  {
@@ -2458,8 +2533,11 @@ var badgeColorVariants = cva(
2458
2533
  { color: "accent", look: "soft", class: "bg-accent/10 text-accent-foreground border-accent/30" },
2459
2534
  { color: "accent", look: ["outline", "dash"], class: "text-accent-foreground border-accent/40" },
2460
2535
  { color: "neutral", look: "solid", class: "bg-neutral text-neutral-foreground" },
2461
- { color: "neutral", look: "soft", class: "bg-neutral/10 text-neutral-foreground border-neutral/30" },
2462
- { color: "neutral", look: ["outline", "dash"], class: "text-neutral-foreground border-neutral/40" },
2536
+ // Not `text-neutral-foreground`: that token is the contrast color on a
2537
+ // solid neutral fill, so on a tinted or transparent one it inverts with
2538
+ // the theme and disappears.
2539
+ { color: "neutral", look: "soft", class: "bg-neutral/10 text-muted-foreground border-neutral/30" },
2540
+ { color: "neutral", look: ["outline", "dash"], class: "text-muted-foreground border-neutral/40" },
2463
2541
  { color: "info", look: "solid", class: "bg-info text-info-foreground" },
2464
2542
  { color: "info", look: "soft", class: "bg-info/10 text-info border-info/20" },
2465
2543
  { color: "info", look: ["outline", "dash"], class: "text-info border-info/60" },
@@ -2476,14 +2554,6 @@ var badgeColorVariants = cva(
2476
2554
  defaultVariants: { color: "primary", look: "solid", size: "md", shape: "default" }
2477
2555
  }
2478
2556
  );
2479
- var COLOR_TEXT_MAP = {
2480
- success: "text-success",
2481
- warning: "text-warning",
2482
- accent: "text-accent-foreground",
2483
- info: "text-info",
2484
- neutral: "text-neutral-foreground",
2485
- destructive: "text-destructive"
2486
- };
2487
2557
  var SIZE_TEXT_MAP = {
2488
2558
  sm: "text-xs",
2489
2559
  md: "text-sm",
@@ -2521,14 +2591,14 @@ function Badge({
2521
2591
  const effVariant = variant ?? aliased.variant ?? recipe?.defaultVariant;
2522
2592
  const recipeRadius = shape === void 0 ? resolveRadiusValue(recipe?.radius) : void 0;
2523
2593
  const recipeStyle = recipeRadius ? { borderRadius: recipeRadius, ...style } : style;
2524
- const resolvedColor = statusMap?.[status ?? ""] ?? color ?? "primary";
2525
- const resolvedLabel = label ?? (typeof children === "string" ? children : void 0) ?? status;
2594
+ const resolvedColor = status ? resolveStatusColor(status, statusMap, color ?? "neutral") : color ?? "primary";
2595
+ const resolvedLabel = label ?? (typeof children === "string" ? children : void 0) ?? (status ? humanizeToken(status) : void 0);
2526
2596
  const content = typeof children !== "string" && children ? children : resolvedLabel ?? children;
2527
2597
  const resolvedIcon = icon ?? (resolvedColor ? iconMap?.[resolvedColor] : void 0);
2528
2598
  const iconNode = renderIcon(showIcon ? resolvedIcon : icon);
2529
2599
  const isMinimal = look === "minimal" || look === "text";
2530
2600
  if (isMinimal) {
2531
- const textColor = COLOR_TEXT_MAP[resolvedColor ?? ""] ?? "text-foreground";
2601
+ const textColor = colorTextClass(resolvedColor);
2532
2602
  const sizeClass = SIZE_TEXT_MAP[size ?? "md"] ?? "text-sm";
2533
2603
  return /* @__PURE__ */ jsxs(
2534
2604
  Comp,
@@ -8278,6 +8348,17 @@ function NSkeletonWidget() {
8278
8348
  function NSkeletonWidgets({ count = 5 }) {
8279
8349
  return /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5 gap-3", children: Array.from({ length: count }).map((_, i) => /* @__PURE__ */ jsx(NSkeletonWidget, {}, i)) });
8280
8350
  }
8351
+
8352
+ // src/lib/avatar.ts
8353
+ var PLACEHOLDER_AVATAR = /(^|\/)noavatar\.png(?:$|[?#])/i;
8354
+ function isPlaceholderAvatar(src) {
8355
+ const trimmed = src?.trim() ?? "";
8356
+ return !trimmed || PLACEHOLDER_AVATAR.test(trimmed);
8357
+ }
8358
+ function resolveAvatarSrc(src, fallback) {
8359
+ const trimmed = src?.trim() ?? "";
8360
+ return trimmed && !PLACEHOLDER_AVATAR.test(trimmed) ? trimmed : fallback;
8361
+ }
8281
8362
  var AVATAR_COLORS = [
8282
8363
  ["#3b82f6", "#1d4ed8"],
8283
8364
  ["#8b5cf6", "#6d28d9"],
@@ -8319,9 +8400,6 @@ function nameToColor(name) {
8319
8400
  function getInitials(name) {
8320
8401
  return name.split(" ").map((part) => part.charAt(0)).join("").toUpperCase().slice(0, 2);
8321
8402
  }
8322
- function shouldUseSrc(src) {
8323
- return Boolean(src && src !== "noavatar.png");
8324
- }
8325
8403
  function withVersion(src, version) {
8326
8404
  if (!version || src.startsWith("data:") || src.startsWith("blob:")) return src;
8327
8405
  const separator = src.includes("?") ? "&" : "?";
@@ -8344,7 +8422,8 @@ function NAvatar({
8344
8422
  }) {
8345
8423
  const label = title || fallback || "";
8346
8424
  const imageVersion = srcVersion ?? version;
8347
- const imageSrc = shouldUseSrc(src) ? withVersion(src, imageVersion) : fallbackSrc;
8425
+ const resolvedSrc = resolveAvatarSrc(src, void 0);
8426
+ const imageSrc = resolvedSrc ? withVersion(resolvedSrc, imageVersion) : fallbackSrc;
8348
8427
  const { bg, text } = nameToColor(label);
8349
8428
  const hasText = Boolean(title || subtitle || meta);
8350
8429
  const fallbackText = fallback && !title ? fallback : label ? getInitials(label) : "?";
@@ -15170,4 +15249,4 @@ function NGridItem({
15170
15249
  return /* @__PURE__ */ jsx("div", { className: itemClassName, ...props, children });
15171
15250
  }
15172
15251
 
15173
- export { Alert, NCard as AsyncCard, Avatar, AvatarFallback, AvatarFormInput, AvatarGroup, AvatarImage, AvatarInput, AvatarStatus, Badge, BaseInput, 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_SAVED_THEME_VALUE, NAlert, NAppShell, NCard as NAsyncCard, NAvatar, NBadge, NBarChart, NBulkActionsBar, 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, 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, NTableHeader, NTableLoadingSkeleton, NTablePagination, NTableRowSkeleton, NTableSkeleton, NTabs, NThemeCustomizer, NThemePresets, NUploader, NViewBody, NViewToggle, NativeSelect, NumberInput, OtpInput, PasswordInput, PhoneInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PrefixProvider, Progress, 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, Tabs, TabsContent, TabsList, TabsTrigger, TextAreaInput, TextInput, Textarea, TimeInput, TimeZoneInput, Toaster, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VariantProvider, WizardForm, alertVariants, avatarVariants, badgeColorVariants, badgeVariants, buildDefaultFileColumns, buildPageItems, createDialogStore, createTableStore, detectFormat, dialogVariants, filterResponsiveColumns, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNChartColor, getNextEditorTabValue, hiddenBelowClasses, indicatorVariants, normalizeThemeFileName, parseColor, parseThemeFile, resolveHiddenBelowClass, resolveSlot, sliderVariants, stringifyThemeFile, swapVariants, toPickerHex, toggleVariants, tooltipContentVariants, truncateByCharacters, useClickOutside, useContextMenu, useDebouncedValue, useDelayedLoading, useDialog, useDialogStore, useDynamicPageSize, useFormField, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useNForm, useNPortalScope, useNSidebar, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useVariant, useVariantPreset };
15252
+ export { Alert, NCard as AsyncCard, Avatar, AvatarFallback, AvatarFormInput, AvatarGroup, AvatarImage, AvatarInput, AvatarStatus, Badge, BaseInput, 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_COLOR_TEXT_CLASSES, NAJM_SAVED_THEME_VALUE, NAJM_STATUS_COLORS, NAlert, NAppShell, NCard as NAsyncCard, NAvatar, NBadge, NBarChart, NBulkActionsBar, 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, 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, NTableHeader, NTableLoadingSkeleton, NTablePagination, NTableRowSkeleton, NTableSkeleton, NTabs, NThemeCustomizer, NThemePresets, NUploader, NViewBody, NViewToggle, NativeSelect, NumberInput, OtpInput, PasswordInput, PhoneInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PrefixProvider, Progress, 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, Tabs, TabsContent, TabsList, TabsTrigger, TextAreaInput, TextInput, Textarea, TimeInput, TimeZoneInput, Toaster, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VariantProvider, WizardForm, alertVariants, avatarVariants, badgeColorVariants, badgeVariants, buildDefaultFileColumns, buildPageItems, colorTextClass, createDialogStore, createTableStore, detectFormat, dialogVariants, filterResponsiveColumns, findStatusColor, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNChartColor, getNextEditorTabValue, hiddenBelowClasses, indicatorVariants, isPlaceholderAvatar, normalizeThemeFileName, parseColor, parseThemeFile, resolveAvatarSrc, resolveHiddenBelowClass, resolveSlot, resolveStatusColor, sliderVariants, statusTextClass, stringifyThemeFile, swapVariants, toPickerHex, toggleVariants, tooltipContentVariants, truncateByCharacters, useClickOutside, useContextMenu, useDebouncedValue, useDelayedLoading, useDialog, useDialogStore, useDynamicPageSize, useFormField, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useNForm, useNPortalScope, useNSidebar, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useVariant, useVariantPreset };
@@ -1,55 +1,3 @@
1
- import { e as NajmTranslate, b as NTableCardPagination } from './paginationLabels-CY2PvbMj.js';
2
-
3
- /**
4
- * How a list continues.
5
- *
6
- * - `paged` — numbered pages on desktop, scroll continuation on card viewports.
7
- * - `infinite` — scroll continuation everywhere.
8
- * - `all` — one request for the whole set, no controls. Only valid for a list
9
- * with a proven bound.
10
- */
11
- type ListStrategy = "all" | "infinite" | "paged";
12
- /** The presentation mode resolved for the current viewport and strategy. */
13
- type ResolvedListMode = "all" | "infinite" | "paged";
14
- interface CardPaginationState {
15
- /**
16
- * The resolved mode. When omitted, `cardViewport` alone decides — a card
17
- * viewport continues on scroll, a desktop one paginates.
18
- */
19
- mode?: ResolvedListMode;
20
- cardViewport?: boolean;
21
- hasNextPage: boolean;
22
- loadingMore: boolean;
23
- /**
24
- * Truthy when the last append failed. The value is not rendered — the message
25
- * shown is `loadMoreError` from the labels, so a thrown `Error` or an API
26
- * envelope can be passed straight through without leaking its text into the UI.
27
- */
28
- loadMoreError?: unknown;
29
- onLoadMore: () => unknown | Promise<unknown>;
30
- }
31
- interface CardPaginationLabels {
32
- loadMoreError?: string;
33
- retryLabel?: string;
34
- itemsLoaded?: (count: number) => string;
35
- }
36
- declare const DEFAULT_CARD_PAGINATION_KEY_PREFIX = "common.pagination";
37
- /**
38
- * Projects a translator onto the three card-continuation labels, matching
39
- * `buildPaginationLabels` — same prefix convention, same key-per-field naming.
40
- */
41
- declare function buildCardPaginationLabels(t: NajmTranslate, prefix?: string): CardPaginationLabels;
42
- /**
43
- * Builds the `cardPagination` prop from the state a paged list already holds.
44
- *
45
- * The three modes are not interchangeable presentations of one thing: `paged`
46
- * hands page-size control back to NTable, which measures the container and
47
- * reports the size it wants through `onPaginationChange`; `all` renders exactly
48
- * what it is given and shows no controls; `infinite` is the only one that needs
49
- * continuation wiring, which is why the other two ignore the labels entirely.
50
- */
51
- declare function createCardPagination(state: CardPaginationState, labels?: CardPaginationLabels): NTableCardPagination;
52
-
53
1
  /**
54
2
  * The offset-pagination protocol behind `NTable`'s page controls.
55
3
  *
@@ -127,4 +75,4 @@ type QueryValue = string | number | boolean | null | undefined;
127
75
  */
128
76
  declare function cleanQuery(query: Record<string, QueryValue>): Record<string, QueryValue>;
129
77
 
130
- export { type ApiPage as A, type CardPaginationLabels as C, DEFAULT_CARD_PAGINATION_KEY_PREFIX as D, type ListStrategy as L, type OffsetPage as O, type QueryValue as Q, type ResolvedListMode as R, type CardPaginationState as a, DEFAULT_MAX_PAGE_SIZE as b, DEFAULT_PAGE_SIZE as c, type OffsetPageFetcher as d, type OffsetPageOptions as e, type OffsetPagination as f, buildCardPaginationLabels as g, cleanQuery as h, createCardPagination as i, createOffsetPagination as j, fetchOffsetPage as k, getPageIndex as l };
78
+ export { type ApiPage, DEFAULT_MAX_PAGE_SIZE, DEFAULT_PAGE_SIZE, type OffsetPage, type OffsetPageFetcher, type OffsetPageOptions, type OffsetPagination, type QueryValue, cleanQuery, createOffsetPagination, fetchOffsetPage, getPageIndex };
@@ -0,0 +1 @@
1
+ export { DEFAULT_MAX_PAGE_SIZE, DEFAULT_PAGE_SIZE, cleanQuery, createOffsetPagination, fetchOffsetPage, getPageIndex } from './chunk-2NX2VKS2.mjs';
@@ -122,8 +122,15 @@ type NTableCardPagination = {
122
122
  * depends on no `najm-*` package, and this signature is satisfied by every
123
123
  * mainstream i18n library. The application keeps its catalog and its own
124
124
  * language provider.
125
+ *
126
+ * `Key` narrows the accepted keys. It exists for the application that types its
127
+ * translator to a generated union of its catalog — such a `t` is *not*
128
+ * assignable to `NajmTranslate<string>`, since a parameter position accepting
129
+ * fewer values is the wrong way round. Builders below name the exact keys they
130
+ * pass, so a narrow translator satisfies them without a cast and the keys stay
131
+ * checked against the catalog.
125
132
  */
126
- type NajmTranslate = (key: string, params?: Record<string, string | number>) => string;
133
+ type NajmTranslate<Key extends string = string> = (key: Key, params?: Record<string, string | number>) => string;
127
134
  declare const DEFAULT_PAGINATION_KEY_PREFIX = "common.pagination";
128
135
  /**
129
136
  * Projects a translator onto the ten pagination labels.
@@ -140,4 +147,4 @@ declare const DEFAULT_PAGINATION_KEY_PREFIX = "common.pagination";
140
147
  */
141
148
  declare function buildPaginationLabels(t: NajmTranslate, prefix?: string): NTablePaginationLabels;
142
149
 
143
- export { DEFAULT_PAGINATION_KEY_PREFIX as D, type NTablePaginationVariant as N, type NTablePaginationLabels as a, type NTableCardPagination as b, type NTableInfinitePagination as c, type NTableLoadMorePagination as d, type NajmTranslate as e, buildPaginationLabels as f };
150
+ export { DEFAULT_PAGINATION_KEY_PREFIX as D, type NajmTranslate as N, type NTableCardPagination as a, type NTablePaginationLabels as b, type NTablePaginationVariant as c, type NTableInfinitePagination as d, type NTableLoadMorePagination as e, buildPaginationLabels as f };
package/dist/query.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import * as _tanstack_query_core from '@tanstack/query-core';
2
- import { d as OffsetPageFetcher, O as OffsetPage, L as ListStrategy, R as ResolvedListMode } from './pagination-BvukSZir.js';
3
- export { A as ApiPage, C as CardPaginationLabels, a as CardPaginationState, b as DEFAULT_MAX_PAGE_SIZE, c as DEFAULT_PAGE_SIZE, e as OffsetPageOptions, f as OffsetPagination, Q as QueryValue, g as buildCardPaginationLabels, h as cleanQuery, i as createCardPagination, j as createOffsetPagination, k as fetchOffsetPage, l as getPageIndex } from './pagination-BvukSZir.js';
4
- import './paginationLabels-CY2PvbMj.js';
2
+ import { OffsetPageFetcher, OffsetPage } from './pagination.js';
3
+ export { ApiPage, DEFAULT_MAX_PAGE_SIZE, DEFAULT_PAGE_SIZE, OffsetPageOptions, OffsetPagination, QueryValue, cleanQuery, createOffsetPagination, fetchOffsetPage, getPageIndex } from './pagination.js';
4
+ import { L as ListStrategy, R as ResolvedListMode } from './cardPagination-Bwf3tEeN.js';
5
+ export { C as CardPaginationKey, a as CardPaginationLabels, b as CardPaginationState, c as buildCardPaginationLabels, d as createCardPagination } from './cardPagination-Bwf3tEeN.js';
6
+ import './paginationLabels-dZLSNxfo.js';
5
7
  import 'react';
6
8
 
7
9
  interface UseOffsetInfiniteQueryOptions<T> {
package/dist/query.mjs CHANGED
@@ -1,5 +1,7 @@
1
- import { fetchOffsetPage, useCardViewport, DEFAULT_MAX_PAGE_SIZE } from './chunk-7J7DWGKB.mjs';
2
- export { DEFAULT_MAX_PAGE_SIZE, DEFAULT_PAGE_SIZE, buildCardPaginationLabels, cleanQuery, createCardPagination, createOffsetPagination, fetchOffsetPage, getPageIndex } from './chunk-7J7DWGKB.mjs';
1
+ import { useCardViewport } from './chunk-OUS7OYVA.mjs';
2
+ export { buildCardPaginationLabels, createCardPagination } from './chunk-OUS7OYVA.mjs';
3
+ import { fetchOffsetPage, DEFAULT_MAX_PAGE_SIZE } from './chunk-2NX2VKS2.mjs';
4
+ export { DEFAULT_MAX_PAGE_SIZE, DEFAULT_PAGE_SIZE, cleanQuery, createOffsetPagination, fetchOffsetPage, getPageIndex } from './chunk-2NX2VKS2.mjs';
3
5
  import { useInfiniteQuery } from '@tanstack/react-query';
4
6
  import { useState, useRef, useEffect, useCallback } from 'react';
5
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "najm-kit",
3
- "version": "2.7.2",
3
+ "version": "2.8.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Reusable React UI component package for Najm framework",
@@ -38,6 +38,16 @@
38
38
  "import": "./dist/query.mjs",
39
39
  "default": "./dist/query.mjs"
40
40
  },
41
+ "./format": {
42
+ "types": "./dist/format.d.ts",
43
+ "import": "./dist/format.mjs",
44
+ "default": "./dist/format.mjs"
45
+ },
46
+ "./pagination": {
47
+ "types": "./dist/pagination.d.ts",
48
+ "import": "./dist/pagination.mjs",
49
+ "default": "./dist/pagination.mjs"
50
+ },
41
51
  "./json": {
42
52
  "types": "./dist/json.d.ts",
43
53
  "import": "./dist/json.mjs",