import * as React$1 from 'react'; import React__default, { RefObject, ReactNode, ComponentType, InputHTMLAttributes, Ref, ImgHTMLAttributes, MouseEvent, MouseEventHandler, CSSProperties } from 'react'; import { b as NajmDesignConfig, f as NajmThemeProviderProps, g as NajmAppearance, N as NajmMode, h as NajmThemeConfig, i as NajmAccent, j as NajmThemeTokens, k as NajmPreset, l as NajmComponentName, m as NajmComponentStyleConfig, a as NajmComponentThemeConfig, d as NajmTypographyConfig, c as NajmLayoutConfig, n as NajmResponsiveBreakpoint, o as NajmResponsiveValue } from './design-types-CJYLgxmw.js'; export { p as NAJM_COMPONENT_NAMES, q as NajmComponentRadius, r as NajmDensity, s as NajmSlotStyle, e as NajmVariantStyle, R as RADIUS_VALUE_MAP, t as resolveRadiusValue } from './design-types-CJYLgxmw.js'; export { a as NAJM_CURRENCIES, b as NAJM_CURRENCY_OPTIONS, d as NAJM_TIME_ZONES, e as NajmCurrency, N as NajmTimeZone, f as defineNajmDesignConfig, p as parseNajmDesignConfig, r as resolveVariantAlias, s as stringifyNajmDesignConfig } from './design-config-CdpHWwvE.js'; export { F as FormLocationInput, N as NLocationDialog, a as NLocationInput, b as NLocationProvider, i as isCompleteCoordinatePair, n as normalizeLocationValue, u as useNLocationProvider } from './contracts-GKNJ-pXo.js'; import { T as TailwindColor, n as TextInputProps, o as NumberInputProps, P as PasswordInputProps, O as OtpInputProps, p as TextAreaInputProps, S as SelectInputProps, C as ComboboxInputProps, M as MultiSelectInputProps, R as RadioGroupInputProps, q as CheckboxInputProps, r as CheckboxGroupInputProps, s as SwitchInputProps, D as DateInputProps, t as FileInputProps, I as ImageInputProps, A as AvatarInputProps, u as StarRatingInputProps, v as ColorArrayInputProps, w as ColorPickerInputProps, E as EmojiInputProps, x as LangInputProps, y as PhoneInputProps, z as TimeInputProps, B as TimeZoneInputProps, H as FormProps, J as FormInputProps, K as FormVariant } from './types-B-o4sfPa.js'; export { Q as AvatarInputRadius, U as ColorFormat, V as FormInputBackground, F as FormLocationInputProps, W as FormSlotClassNames, X as ImageInputPreviewError, Y as ImageInputPreviewSource, Z as InputIcon, c as NCoordinates, d as NLocationCandidate, e as NLocationClassNames, f as NLocationDialogProps, a as NLocationGeocoderAdapter, g as NLocationInputProps, b as NLocationLabels, N as NLocationMapAdapter, i as NLocationMapProps, j as NLocationProviderProps, m as NLocationValue, _ as NSlider, $ as NSliderProps, a0 as SelectItemType, a1 as Slider, a2 as SliderInput, a3 as SliderInputProps, a4 as SliderOrientation, a5 as SliderProps, a6 as SliderSize, a7 as SliderVariant, a8 as VariantProvider, a9 as detectFormat, aa as formatColor, ab as parseColor, ac as sliderVariants, ad as toPickerHex, ae as useVariant, af as useVariantPreset } from './types-B-o4sfPa.js'; import { d as NTableToolbarLabels, B as BadgeColor, e as BadgeShape } from './NajmUIProvider-wCcltXO6.js'; export { f as Badge, g as BadgeIcon, h as BadgeLook, i as BadgeProps, j as BadgeSize, k as BadgeVariant, D as DEFAULT_FEEDBACK_KEY_PREFIX, l as DEFAULT_TIME_ZONE, F as FeedbackKey, m as NBadge, n as NBadgeDefaults, o as NBadgeLook, p as NBadgeProps, N as NFeedbackDefaults, a as NFeedbackLabelKeys, b as NFeedbackLabels, q as NTableDefaults, r as NTableDefaultsProvider, s as NajmPreferencesContextValue, t as NajmPreferencesProvider, u as NajmPreferencesProviderProps, v as NajmUIProvider, c as NajmUIProviderProps, w as badgeColorVariants, x as badgeVariants, y as useDocumentDirection, z as useNTableDefaults, A as useNajmPreferencesContext, C as useNajmTheme, E as useNajmTimeZone, G as useResolvedToolbarLabels } from './NajmUIProvider-wCcltXO6.js'; import { N as NajmTranslate, c as NTablePaginationVariant, b as NTablePaginationLabels, a as NTableCardPagination } from './paginationLabels-dZLSNxfo.js'; export { D as DEFAULT_PAGINATION_KEY_PREFIX, d as NTableInfinitePagination, e as NTableLoadMorePagination, f as buildPaginationLabels } from './paginationLabels-dZLSNxfo.js'; import * as class_variance_authority_types from 'class-variance-authority/types'; import { VariantProps } from 'class-variance-authority'; import { N as NIconSource } from './NIcon-D73-C51g.js'; export { a as NIcon, b as NIconProps } from './NIcon-D73-C51g.js'; import { NajmFormatConfig } from './format.js'; export { DEFAULT_PLACEHOLDER, DEFAULT_STATUS_KEY_PREFIX, DEFAULT_STATUS_LABEL_LANGUAGE, NAJM_STATUS_LABELS, NajmStatusLabelOptions, SlugifyOptions, findPackagedStatusLabel, findStatusLabel, formatCurrency, formatDate, formatDateTime, formatNumber, formatPercent, formatRelativeTime, formatStatusLabel, formatTime, humanizeToken, localDateInput, resolveStatusLabelLanguage, slugify } from './format.js'; import * as LabelPrimitive from '@radix-ui/react-label'; import * as DialogPrimitive from '@radix-ui/react-dialog'; import * as zustand from 'zustand'; import { StoreApi } from 'zustand'; import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; import * as PopoverPrimitive from '@radix-ui/react-popover'; import * as SelectPrimitive from '@radix-ui/react-select'; import * as CheckboxPrimitive from '@radix-ui/react-checkbox'; import * as RadioGroupPrimitive from '@radix-ui/react-radio-group'; import * as SwitchPrimitive from '@radix-ui/react-switch'; import * as TabsPrimitive from '@radix-ui/react-tabs'; import * as TooltipPrimitive from '@radix-ui/react-tooltip'; import * as ProgressPrimitive from '@radix-ui/react-progress'; import * as SeparatorPrimitive from '@radix-ui/react-separator'; import { OverlayScrollbarsComponentProps } from 'overlayscrollbars-react'; export { l as NBrandingEditorValue, N as NBrandingInput, m as NBrandingPayload, n as NBrandingProvider, o as NBrandingStateProvider, p as NBrandingStateProviderProps, q as NBrandingValue, a as NEmptyState, b as NEmptyStateProps, c as NErrorState, d as NErrorStateProps, e as NFeedbackSurface, f as NForbiddenState, g as NForbiddenStateProps, h as NLoadingState, i as NLoadingStateProps, j as NNotFoundState, k as NNotFoundStateProps, r as normalizeBranding, u as useNBranding, s as useNBrandingEditor } from './NNotFoundState-Z2n2gbhS.js'; import * as AvatarPrimitive from '@radix-ui/react-avatar'; import { Command as Command$1 } from 'cmdk'; import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'; import * as TogglePrimitive from '@radix-ui/react-toggle'; import { ToasterProps } from 'sonner'; export { toast } from 'sonner'; import * as react_hook_form from 'react-hook-form'; import { FieldValues, FieldPath, ControllerProps, UseFormProps, UseFormReturn } from 'react-hook-form'; import { Slot } from '@radix-ui/react-slot'; import { LucideProps, LucideIcon } from 'lucide-react'; import { ZodTypeAny, TypeOf } from 'zod'; import { F as FormDevToolsOptions, a as FormDevTools } from './formFill-CQkTA0JS.js'; export { b as FormDevToolsConfig, c as FormFillOverride, d as FormFillOverrides, e as buildFormFill } from './formFill-CQkTA0JS.js'; import { SortingState, ExpandedState, ColumnDef, Row, ColumnFiltersState, VisibilityState, RowSelectionState } from '@tanstack/react-table'; export { N as NTableJson } from './NTableJson-BHXwRVvL.js'; import * as _tanstack_table_core from '@tanstack/table-core'; 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'; import { ClassValue } from 'clsx'; export { ApiPage, DEFAULT_MAX_PAGE_SIZE, DEFAULT_PAGE_SIZE, OffsetPage, OffsetPageFetcher, OffsetPageOptions, OffsetPagination, QueryValue, cleanQuery, createOffsetPagination, fetchOffsetPage, getPageIndex } from './pagination.js'; import 'culori'; import '@radix-ui/react-slider'; /** * Shared so the identity is stable across renders — `NajmDesignProvider` * memoizes on `config.components`, `config.typography` and `config.layout`, and * a fresh literal here would invalidate that on every render of the tree. */ declare const EMPTY_DESIGN: NajmDesignConfig; interface NajmDesignEditorValue { /** `draft ?? committed`. What the tree is currently rendered against. */ design: NajmDesignConfig; /** The last design the application saved. */ committed: NajmDesignConfig; /** The unsaved edit layered over `committed`, or `null`. */ draft: NajmDesignConfig | null; hasDraft: boolean; /** Clones `committed` into a draft. A no-op while one is already open. */ beginDraft: () => void; setDraft: (design: NajmDesignConfig) => void; cancelDraft: () => void; /** Adopt a design the application persisted, discarding any draft. */ setCommitted: (design: NajmDesignConfig) => void; } /** * The draft/commit layer a runtime theme editor needs. * * Returns `null` outside a provider, so a component that only *offers* theme * editing stays mountable in an application that has none. * * The editor holds no opinion about persistence: an application saves through * whatever its own API is, then hands the result back via `setCommitted`. That * is the same split `NajmPreferencesProvider` draws for theme and time zone. */ declare function useNajmDesignEditor(): NajmDesignEditorValue | null; interface NajmDesignEditorProviderProps { children: React$1.ReactNode; /** * Controlled design. When given, this provider only forwards it and every * command below is inert — the application already owns the state. */ design?: NajmDesignConfig; /** * Seeds design state this provider owns from then on; ignored after mount. * * Uncontrolled on purpose, matching `initialTheme` and `initialTimeZone`: * the page is rendered once against what the server resolved, and every * change after that originates in the editor. */ initialDesign?: NajmDesignConfig; } declare function NajmDesignEditorProvider({ children, design, initialDesign, }: NajmDesignEditorProviderProps): React$1.JSX.Element; declare const DEFAULT_TOOLBAR_KEY_PREFIX = "common.table"; type DefaultToolbarPrefix = typeof DEFAULT_TOOLBAR_KEY_PREFIX; /** The twelve catalog keys `buildToolbarLabels` reads under `Prefix`. */ type ToolbarKey = `${Prefix}.settings` | `${Prefix}.view` | `${Prefix}.columns` | `${Prefix}.modeTable` | `${Prefix}.modeCards` | `${Prefix}.modeJson` | `${Prefix}.modeFiles` | `${Prefix}.modeOption` | `${Prefix}.filters` | `${Prefix}.filterRegion` | `${Prefix}.allOption` | `${Prefix}.create`; /** * Projects a translator onto the toolbar labels, matching * `buildPaginationLabels` — same prefix convention, same key-per-field naming. * * `modeOption` interpolates `mode` with the already-translated visible name, so * a catalog writes one template rather than four accessible names. * * No result is inspected or second-guessed, for the reason given on * `buildPaginationLabels`: a translator that echoes a missing key renders that * key, which is the signal the entry is missing. */ declare function buildToolbarLabels(t: NajmTranslate>, prefix?: Prefix): NTableToolbarLabels; /** Returns the active mode inherited from the nearest Najm theme provider. */ declare function useNajmThemeMode(): NajmMode | undefined; declare function useNajmAppearance(): NajmAppearance; declare function NajmThemeProvider({ config, preset, mode, accent, tokens, accentOnly, appearance, radius, className, asChild, children, }: NajmThemeProviderProps): React$1.JSX.Element; declare const THEME_TOKEN_KEYS: readonly ["background", "foreground", "card", "card-foreground", "popover", "popover-foreground", "primary", "primary-foreground", "secondary", "secondary-foreground", "tertiary", "tertiary-foreground", "muted", "muted-foreground", "accent", "accent-foreground", "destructive", "destructive-foreground", "border", "input", "ring", "sidebar", "sidebar-foreground", "sidebar-primary", "sidebar-primary-foreground", "sidebar-accent", "sidebar-accent-foreground", "sidebar-border", "sidebar-ring", "chart-1", "chart-2", "chart-3", "chart-4", "chart-5"]; type ThemeCustomizerTokenKey = (typeof THEME_TOKEN_KEYS)[number]; type NThemeCustomizerTab = "theme" | "typography"; interface NThemeCustomizerFontOption { value: string; label: React$1.ReactNode; } type NThemeCustomizerTokenLabels = { [K in ThemeCustomizerTokenKey]: React$1.ReactNode; }; interface NThemeCustomizerOptionLabels { scale: Partial>; } interface NThemeCustomizerLabels { themeTab: React$1.ReactNode; typographyTab: React$1.ReactNode; lightMode: React$1.ReactNode; darkMode: React$1.ReactNode; resetField: React$1.ReactNode; resetSection: React$1.ReactNode; importTheme: React$1.ReactNode; exportTheme: React$1.ReactNode; invalidThemeFile: React$1.ReactNode; /** Override the swatch button's accessible name when no token label is provided. */ colorSwatchFallback: React$1.ReactNode; defaultOption: React$1.ReactNode; themeSection: React$1.ReactNode; typographySection: React$1.ReactNode; layoutSubsection: React$1.ReactNode; pageHeaderSubsection: React$1.ReactNode; sidebarSubsection: React$1.ReactNode; tableSubsection: React$1.ReactNode; inputSubsection: React$1.ReactNode; previewMode: React$1.ReactNode; surfaceGroup: React$1.ReactNode; brandGroup: React$1.ReactNode; feedbackGroup: React$1.ReactNode; borderFocusGroup: React$1.ReactNode; sidebarGroup: React$1.ReactNode; chartsGroup: React$1.ReactNode; globalRadius: React$1.ReactNode; globalBorderWidth: React$1.ReactNode; fontSans: React$1.ReactNode; fontHeading: React$1.ReactNode; fontMono: React$1.ReactNode; advancedTypography: React$1.ReactNode; baseSize: React$1.ReactNode; scale: React$1.ReactNode; lineHeight: React$1.ReactNode; letterSpacing: React$1.ReactNode; pageGutter: React$1.ReactNode; sectionGap: React$1.ReactNode; pageHeaderCard: React$1.ReactNode; sidebarSections: React$1.ReactNode; sidebarNoSections: React$1.ReactNode; sidebarSectionLabels: React$1.ReactNode; sidebarSectionSeparators: React$1.ReactNode; sidebarExpandedWidth: React$1.ReactNode; sidebarCollapsedWidth: React$1.ReactNode; sidebarMobileWidth: React$1.ReactNode; tableHeaderColor: React$1.ReactNode; tableHeaderTextColor: React$1.ReactNode; tableBorderColor: React$1.ReactNode; inputBorderWidth: React$1.ReactNode; /** Per-token display labels keyed by `ThemeCustomizerTokenKey`. */ tokens: Partial; /** Localized labels for the enum-style options. */ options: Partial; } /** A named design the host has stored somewhere and can restore later. */ interface NThemePreset { id: string; name: string; design: NajmDesignConfig; /** Marks a preset the host ships rather than one the user created. */ isBuiltIn?: boolean; } type NThemePresetsStatus = "idle" | "loading" | "error"; interface NThemePresetsLabels { title: React$1.ReactNode; description: React$1.ReactNode; empty: React$1.ReactNode; loadError: React$1.ReactNode; select: React$1.ReactNode; selectPlaceholder: React$1.ReactNode; /** Row that restores the host's currently stored design. */ savedOption: React$1.ReactNode; saveCurrent: React$1.ReactNode; saveTitle: React$1.ReactNode; saveDescription: React$1.ReactNode; saveAction: React$1.ReactNode; nameLabel: React$1.ReactNode; namePlaceholder: React$1.ReactNode; delete: React$1.ReactNode; deleteTitle: React$1.ReactNode; /** Supports a `{name}` placeholder. */ deleteDescription: React$1.ReactNode; cancel: React$1.ReactNode; } interface NThemePresetsProps { presets: readonly NThemePreset[]; /** `null` means the host's stored design is showing, not a preset. */ selectedPresetId?: string | null; /** Shown as the first row so the user can drop a preview. Omit to hide it. */ savedDesign?: NajmDesignConfig; status?: NThemePresetsStatus; /** Receives `null` when the user picks the stored-design row. */ onSelect: (preset: NThemePreset | null) => void; /** Omit to hide the save control. */ onSave?: (name: string) => void | Promise; /** Omit to hide every delete control. */ onDelete?: (preset: NThemePreset) => void | Promise; labels: NThemePresetsLabels; disabled?: boolean; className?: string; } interface NThemeCustomizerProps { value: NajmDesignConfig; factoryValue: NajmDesignConfig; onChange: (value: NajmDesignConfig) => void; /** Overrides the active mode inherited from the nearest Najm theme provider. */ previewMode?: NajmMode; /** Handles the opt-in internal light/dark control in standalone editors. */ onPreviewModeChange?: (mode: NajmMode) => void; /** Whether to show the internal light/dark control. Defaults to `false`. */ showPreviewMode?: boolean; /** Whether to show JSON import/export actions. Defaults to `true`. */ showFileActions?: boolean; /** Whether to show the internal section reset action. Defaults to `true`. */ showResetAction?: boolean; /** Download filename used by the Export action. Defaults to `najm-theme.json`. */ exportFileName?: string; /** Receives strict JSON parsing or design-contract validation failures. */ onImportError?: (error: Error) => void; /** * Whether to render the internal Theme/Typography tab bar. Defaults to `true`. * When `false`, the first resolved entry from `tabs` is rendered directly so * a host application can present a single section inside its own tabs. */ showTabs?: boolean; tabs?: readonly NThemeCustomizerTab[]; fontOptions?: readonly NThemeCustomizerFontOption[]; labels?: Partial; /** * Saved designs offered above the editor. Provide this plus `onPresetSelect` * to render the picker; the customizer stays presentational and never stores * a preset itself. */ presets?: readonly NThemePreset[]; selectedPresetId?: string | null; presetsStatus?: NThemePresetsStatus; /** * The design the host currently has stored, offered as the "current saved * theme" row so a preview can be dropped. Defaults to `factoryValue`, which * is only correct when the host has not persisted anything of its own. */ savedDesign?: NajmDesignConfig; onPresetSelect?: (preset: NThemePreset | null) => void; onPresetSave?: (name: string) => void | Promise; onPresetDelete?: (preset: NThemePreset) => void | Promise; presetLabels?: Partial; disabled?: boolean; className?: string; } declare function NThemeCustomizer({ value, factoryValue, onChange, previewMode, onPreviewModeChange, showPreviewMode, showFileActions, showResetAction, exportFileName, onImportError, showTabs, tabs, fontOptions, labels, presets, selectedPresetId, presetsStatus, savedDesign, onPresetSelect, onPresetSave, onPresetDelete, presetLabels, disabled, className, }: NThemeCustomizerProps): React$1.JSX.Element; /** Sentinel row that drops the preview and shows the host's saved design. */ declare const NAJM_SAVED_THEME_VALUE = "__najm_saved_theme__"; /** * Saved-theme picker for `NThemeCustomizer`. Presentational only: the host owns * where presets live and what saving one means. Selecting a row hands the * design back through `onSelect` so the host can preview it before persisting. */ declare function NThemePresets({ presets, selectedPresetId, savedDesign, status, onSelect, onSave, onDelete, labels, disabled, className, }: NThemePresetsProps): React$1.JSX.Element; declare const DEFAULT_THEME_FILE_NAME = "najm-theme.json"; declare function parseThemeFile(content: string): NajmDesignConfig; declare function stringifyThemeFile(config: NajmDesignConfig): string; declare function normalizeThemeFileName(fileName: string | undefined): string; /** Keeps authored TypeScript theme objects type-checked without changing them. */ declare function defineNajmThemeConfig(config: NajmThemeConfig): NajmThemeConfig; /** Parses and validates theme settings loaded from JSON, an API, or local storage. */ declare function parseNajmThemeConfig(input: unknown): NajmThemeConfig; declare function stringifyNajmThemeConfig(config: NajmThemeConfig, space?: number): string; declare function composePreset(mode: NajmMode, accent: NajmAccent): NajmThemeTokens; declare function resolvePreset(preset: NajmPreset): NajmThemeTokens; interface NajmDesignContextValue { components: NajmComponentThemeConfig; typography?: NajmTypographyConfig; layout?: NajmLayoutConfig; } declare function useNajmDesign(): NajmDesignContextValue; /** Returns the resolved component style recipe for a given component name. */ declare function useNajmComponentStyle(name: NajmComponentName): NajmComponentStyleConfig | undefined; interface NajmDesignProviderProps { config: NajmDesignConfig; mode?: NajmMode; className?: string; children: React$1.ReactNode; } /** * Applies a full design config: wraps children in NajmThemeProvider for theme * tokens, applies typography CSS variables, and exposes component recipes via * context. NajmThemeProvider continues to work standalone for token-only needs. */ declare function NajmDesignProvider({ config, mode, className, children, }: NajmDesignProviderProps): React$1.JSX.Element; type NajmBorderSide = 'all' | 'top' | 'right' | 'bottom' | 'left' | 'start' | 'end'; /** * Border utility for structural surfaces (cards, tables, dividers, side rails). * `bordered === false` returns a per-side reset so primitives that already * include a base Tailwind `border`/`border-r`/etc. still drop the border. */ declare function surfaceBorderClasses(bordered?: boolean | undefined, side?: NajmBorderSide): string; /** * Border utility for sidebar surfaces. Uses the dedicated `sidebar-border` * token so the sidebar edge can be themed independently from the main * `border` token. */ declare function sidebarBorderClasses(bordered?: boolean | undefined, side?: NajmBorderSide): string; /** Border utility for form fields (inputs, selects). */ declare function inputBorderClasses(bordered?: boolean | undefined): string; /** * The kit's keyboard focus indicator. * * `:focus-visible` rather than `:focus`, so a mouse click on a button does not * leave a ring behind — the indicator appears for the users who navigate by * keyboard and need to know where they are. */ declare const focusRingClasses = "outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50"; /** * The same indicator, for a wrapper that owns the field a child is focused in. * * Composite inputs put the border, padding and background on a wrapper and * strip the inner control bare, so focus lands on an element that is invisible * by design while the thing the user sees as "the field" is its parent. Ringing * the inner control would draw inside the border; the wrapper has to light up. * * Both selectors, because both happen: the multi-select trigger is itself the * focusable element, and the number field holds a real `` inside. `:has` * rather than `:focus-within` so this stays a keyboard indicator either way. */ declare const focusRingWithinClasses = "focus-visible:ring-[3px] focus-visible:ring-ring/50 has-[:focus-visible]:ring-[3px] has-[:focus-visible]:ring-ring/50"; interface KeyboardOptions { enabled?: boolean; preventDefault?: boolean; /** * When `true` (default), ignore key events that originate inside editable * text fields: ``, * `