najm-kit 2.11.22 → 2.12.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.
Files changed (34) hide show
  1. package/CHANGELOG.md +22 -7
  2. package/README.md +28 -1
  3. package/dist/NIcon-D73-C51g.d.ts +21 -0
  4. package/dist/{NNotFoundState-BmGDW2Bx.d.ts → NNotFoundState-Z2n2gbhS.d.ts} +1 -16
  5. package/dist/{NajmUIProvider-BwL5HFIV.d.ts → NajmUIProvider-C9IJW1ya.d.ts} +2 -19
  6. package/dist/adapters/app.d.ts +6 -4
  7. package/dist/adapters/app.mjs +9 -6
  8. package/dist/adapters/next.d.ts +2 -1
  9. package/dist/adapters/next.mjs +5 -3
  10. package/dist/chunk-5UY7U2ED.mjs +9 -0
  11. package/dist/chunk-A34LRQYI.mjs +7 -0
  12. package/dist/chunk-BFFTC7LD.mjs +66 -0
  13. package/dist/{chunk-5ZTOCWRA.mjs → chunk-F32O3WRX.mjs} +7 -197
  14. package/dist/chunk-FZX3DONZ.mjs +200 -0
  15. package/dist/chunk-GYPQLOQ5.mjs +2202 -0
  16. package/dist/{chunk-BDQK6ECA.mjs → chunk-LMW4DM5L.mjs} +43 -101
  17. package/dist/{chunk-DKHIQFXX.mjs → chunk-QDFLHSWO.mjs} +1 -1
  18. package/dist/{chunk-5JVFMOLI.mjs → chunk-QJ22WAQY.mjs} +2 -28
  19. package/dist/{chunk-LK3SMYUP.mjs → chunk-TZRTOQCC.mjs} +1 -6
  20. package/dist/chunk-VZXMMC72.mjs +31 -0
  21. package/dist/{chunk-M5VGBZ7R.mjs → chunk-WHGRN7PP.mjs} +2 -1
  22. package/dist/formFill-CQkTA0JS.d.ts +17 -0
  23. package/dist/index.d.ts +20 -436
  24. package/dist/index.mjs +338 -1950
  25. package/dist/json.mjs +5 -3
  26. package/dist/location/google.d.ts +14 -0
  27. package/dist/location/google.mjs +184 -0
  28. package/dist/location/index.d.ts +33 -0
  29. package/dist/location/index.mjs +9 -0
  30. package/dist/location/leaflet.d.ts +13 -0
  31. package/dist/location/leaflet.mjs +168 -0
  32. package/dist/theme.css +23 -2
  33. package/dist/types-BQBx0RZd.d.ts +578 -0
  34. package/package.json +29 -2
package/dist/index.mjs CHANGED
@@ -1,28 +1,37 @@
1
1
  import { resolveAvatarSrc } from './chunk-BEGOH366.mjs';
2
2
  export { isPlaceholderAvatar, resolveAvatarSrc } from './chunk-BEGOH366.mjs';
3
- import { NLoadingState, NErrorState, NEmptyState, useResolvedFormDevTools, useNBranding } from './chunk-5ZTOCWRA.mjs';
4
- export { FormDevToolsProvider, NBrandingProvider, NBrandingStateProvider, NEmptyState, NErrorState, NForbiddenState, NLoadingState, NNotFoundState, NPageLayout, NSpinner, NajmFormatProvider, buildFormFill, normalizeBranding, useNBranding, useNBrandingEditor, useNajmFormat, useNajmFormatContext } from './chunk-5ZTOCWRA.mjs';
5
- import { normalizeImageSources, useImageChain, useNBadgeDefaults, mergeBadgeMaps, resolveStatusColor, resolveBadgeStatusLabel, colorTextClass, useResolvedPaginationLabels, useResolvedToolbarLabels } from './chunk-BDQK6ECA.mjs';
6
- export { DEFAULT_FEEDBACK_KEY_PREFIX, DEFAULT_PAGINATION_KEY_PREFIX, DEFAULT_TIME_ZONE, DEFAULT_TOOLBAR_KEY_PREFIX, EMPTY_DESIGN, NAJM_COLOR_TEXT_CLASSES, NAJM_STATUS_COLORS, NTableDefaultsProvider, NajmDesignEditorProvider, NajmPreferencesProvider, NajmUIProvider, buildPaginationLabels, buildToolbarLabels, colorTextClass, findStatusColor, normalizeStatusToken, resolveStatusColor, statusTextClass, useDocumentDirection, useNTableDefaults, useNajmDesignEditor, useNajmPreferencesContext, useNajmTheme, useNajmTimeZone, useResolvedToolbarLabels } from './chunk-BDQK6ECA.mjs';
7
- import { NajmScroll, useNajmScrollViewport, useTableStore, TableStoreContext, NTableJson } from './chunk-5JVFMOLI.mjs';
8
- export { NTableJson, NajmScroll, TableStoreContext, useTableStore } from './chunk-5JVFMOLI.mjs';
9
- import { inputBorderClasses, Button, NIcon, surfaceBorderClasses, buttonVariants, NButton, sidebarBorderClasses } from './chunk-M5VGBZ7R.mjs';
10
- export { Button, NButton, NIcon, buttonVariants, inputBorderClasses, sidebarBorderClasses, surfaceBorderClasses } from './chunk-M5VGBZ7R.mjs';
11
- import { useNajmComponentStyle, cn, NajmThemeContainerCtx, useNajmThemeMode, useNajmDesign, composePreset } from './chunk-LK3SMYUP.mjs';
12
- export { NajmDesignProvider, NajmThemeProvider, cn, composePreset, resolvePreset, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmThemeMode } from './chunk-LK3SMYUP.mjs';
3
+ import { BaseInput, Input, Label, focusRingClasses, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, NConfirmDialog, Form, VariantProvider, usePrefix, useVariantPreset, useBordered, FormField, FormItem, FormLabel, FormControl, FormDescription, FormMessage, PrefixProvider, NSheet, useNSidebar, Sheet, SheetContent, SheetTitle } from './chunk-GYPQLOQ5.mjs';
4
+ export { BaseInput, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormLocationInput, FormMessage, IconButton, Input, Label, NConfirmDialog, NDeleteDialog, NDeleteDialogContent, NDialog, NDialogDescription, NDialogHeader, NDialogPrimaryButton, NDialogSecondaryButton, NLocationDialog, NLocationInput, NLocationProvider, NMultiDialog, NPageHeader, NPageHeaderActions, NPageHeaderCompactActions, NPageHeaderFilters, NPageHeaderTop, NPortalScopeProvider, NSheet, NSidebarProvider, PrefixProvider, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, VariantProvider, createDialogStore, dialogVariants, focusRingClasses, focusRingWithinClasses, isCompleteCoordinatePair, normalizeLocationValue, useDialog, useDialogStore, useFormField, useNLocationProvider, useNPortalScope, useNSidebar, usePrefix, useVariant, useVariantPreset } from './chunk-GYPQLOQ5.mjs';
5
+ import { NErrorState, NEmptyState, useResolvedFormDevTools, useNBranding } from './chunk-F32O3WRX.mjs';
6
+ export { FormDevToolsProvider, NBrandingProvider, NBrandingStateProvider, NEmptyState, NErrorState, NForbiddenState, NNotFoundState, NajmFormatProvider, buildFormFill, normalizeBranding, useNBranding, useNBrandingEditor, useNajmFormat, useNajmFormatContext } from './chunk-F32O3WRX.mjs';
7
+ import { NLoadingState } from './chunk-FZX3DONZ.mjs';
8
+ export { NLoadingState, NPageLayout, NSpinner } from './chunk-FZX3DONZ.mjs';
9
+ import { normalizeImageSources, useImageChain, useNBadgeDefaults, mergeBadgeMaps, resolveStatusColor, resolveBadgeStatusLabel, colorTextClass, useResolvedPaginationLabels, useResolvedToolbarLabels } from './chunk-LMW4DM5L.mjs';
10
+ export { DEFAULT_PAGINATION_KEY_PREFIX, DEFAULT_TIME_ZONE, DEFAULT_TOOLBAR_KEY_PREFIX, EMPTY_DESIGN, NAJM_COLOR_TEXT_CLASSES, NAJM_STATUS_COLORS, NTableDefaultsProvider, NajmDesignEditorProvider, NajmPreferencesProvider, NajmUIProvider, buildPaginationLabels, buildToolbarLabels, colorTextClass, findStatusColor, normalizeStatusToken, resolveStatusColor, statusTextClass, useDocumentDirection, useNTableDefaults, useNajmDesignEditor, useNajmPreferencesContext, useNajmTheme, useNajmTimeZone, useResolvedToolbarLabels } from './chunk-LMW4DM5L.mjs';
11
+ export { DEFAULT_FEEDBACK_KEY_PREFIX } from './chunk-BFFTC7LD.mjs';
12
+ import { useTableStore, TableStoreContext, NTableJson } from './chunk-VZXMMC72.mjs';
13
+ export { NTableJson, TableStoreContext, useTableStore } from './chunk-VZXMMC72.mjs';
14
+ import { useNajmScrollViewport, NajmScroll } from './chunk-QJ22WAQY.mjs';
15
+ export { NajmScroll } from './chunk-QJ22WAQY.mjs';
16
+ import { Button, NIcon, buttonVariants, NButton, surfaceBorderClasses, sidebarBorderClasses } from './chunk-WHGRN7PP.mjs';
17
+ export { Button, NButton, NIcon, buttonVariants, inputBorderClasses, sidebarBorderClasses, surfaceBorderClasses } from './chunk-WHGRN7PP.mjs';
18
+ import { NajmThemeContainerCtx, useNajmComponentStyle, useNajmThemeMode, useNajmDesign, composePreset } from './chunk-TZRTOQCC.mjs';
19
+ export { NajmDesignProvider, NajmThemeProvider, composePreset, resolvePreset, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmThemeMode } from './chunk-TZRTOQCC.mjs';
20
+ import { cn } from './chunk-5UY7U2ED.mjs';
21
+ export { cn } from './chunk-5UY7U2ED.mjs';
13
22
  export { DEFAULT_CARD_BREAKPOINT, DEFAULT_CARD_PAGINATION_KEY_PREFIX, buildCardPaginationLabels, createCardPagination, useCardViewport, useDesktopTableMode, useMediaQuery } from './chunk-OUS7OYVA.mjs';
14
23
  import './chunk-F5KXJCCJ.mjs';
15
24
  import { humanizeToken } from './chunk-JABLSOQN.mjs';
16
25
  export { DEFAULT_PLACEHOLDER, formatCurrency, formatDate, formatDateTime, formatNumber, formatPercent, formatRelativeTime, formatTime, humanizeToken, localDateInput, slugify } from './chunk-JABLSOQN.mjs';
17
26
  export { DEFAULT_MAX_PAGE_SIZE, DEFAULT_PAGE_SIZE, cleanQuery, createOffsetPagination, fetchOffsetPage, getPageIndex } from './chunk-2NX2VKS2.mjs';
18
27
  import { NAJM_TIME_ZONES } from './chunk-XGIYOEWD.mjs';
19
- import { resolveRadiusValue, resolveVariantAlias, parseNajmDesignConfig } from './chunk-TFHWLE7N.mjs';
28
+ import { resolveVariantAlias, resolveRadiusValue, parseNajmDesignConfig } from './chunk-TFHWLE7N.mjs';
20
29
  export { NAJM_COMPONENT_NAMES, RADIUS_VALUE_MAP, defineNajmDesignConfig, defineNajmThemeConfig, parseNajmDesignConfig, parseNajmThemeConfig, resolveRadiusValue, resolveVariantAlias, stringifyNajmDesignConfig, stringifyNajmThemeConfig } from './chunk-TFHWLE7N.mjs';
21
- import * as React66 from 'react';
22
- import React66__default, { createContext, useState, useRef, useMemo, useEffect, useContext, useCallback, useLayoutEffect, isValidElement } from 'react';
30
+ import * as React54 from 'react';
31
+ import React54__default, { useState, useRef, useMemo, useEffect, useCallback, useLayoutEffect, isValidElement } from 'react';
23
32
  import * as TabsPrimitive from '@radix-ui/react-tabs';
24
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
25
- import { Eye, EyeOff, Clock, ChevronDown, AlertTriangle, RefreshCw, X, XIcon, Menu, Search, SearchIcon, CheckIcon, ChevronUp, ChevronDownIcon, ChevronUpIcon, ChevronsUpDown, Check, CircleIcon, ChevronLeftIcon, ChevronRightIcon, Calendar as Calendar$1, FileUp, Folder, UploadCloud, CheckCircle2, AlertCircle, Camera, Star, Globe, Trash2, Plus, Upload, Download, RotateCcw, Table as Table$1, FileJson, ChevronRight, ArrowUpDown, Loader2, Copy, MoreVertical, Edit, ChevronsLeft, ChevronLeft, ChevronsRight, Pencil, Merge, PanelLeftOpen, PanelLeftClose, LogOut, Image, ArrowUp, ArrowDown, CheckSquare, FilePlus, FolderPlus, Share2, Move, ClipboardPaste, Scissors, ArrowUpRight, ArrowDownRight, List, LayoutGrid, Code, FolderOpen, SlidersHorizontal, Columns3, Settings, Filter, SearchX, Inbox } from 'lucide-react';
33
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
34
+ import { Eye, EyeOff, Clock, ChevronDown, AlertTriangle, RefreshCw, SearchIcon, CheckIcon, X, ChevronUp, ChevronDownIcon, ChevronUpIcon, ChevronsUpDown, Check, CircleIcon, ChevronLeftIcon, ChevronRightIcon, Calendar as Calendar$1, FileUp, Folder, UploadCloud, CheckCircle2, AlertCircle, Camera, Star, Globe, Trash2, Plus, Upload, Download, RotateCcw, Table as Table$1, FileJson, ChevronRight, ArrowUpDown, Loader2, Copy, Search, MoreVertical, Edit, ChevronsLeft, ChevronLeft, ChevronsRight, Pencil, Merge, PanelLeftOpen, PanelLeftClose, Menu, LogOut, Image, ArrowUp, ArrowDown, CheckSquare, FilePlus, FolderPlus, Share2, Move, ClipboardPaste, Scissors, ArrowUpRight, ArrowDownRight, List, LayoutGrid, Code, FolderOpen, SlidersHorizontal, Columns3, Settings, Filter, SearchX, Inbox } from 'lucide-react';
26
35
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
27
36
  import { cva } from 'class-variance-authority';
28
37
  import { HexColorPicker } from 'react-colorful';
@@ -30,13 +39,10 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
30
39
  import { converter, parse, formatHsl, formatRgb, formatHex } from 'culori';
31
40
  import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
32
41
  import { Command as Command$1, defaultFilter } from 'cmdk';
33
- import * as SheetPrimitive from '@radix-ui/react-dialog';
34
- import { create } from 'zustand';
35
42
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
36
43
  import { Slot } from '@radix-ui/react-slot';
37
44
  import * as SelectPrimitive from '@radix-ui/react-select';
38
45
  import * as SwitchPrimitive from '@radix-ui/react-switch';
39
- import * as LabelPrimitive from '@radix-ui/react-label';
40
46
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
41
47
  import { format, parseISO } from 'date-fns';
42
48
  import { DayPicker } from 'react-day-picker';
@@ -50,13 +56,11 @@ import * as AvatarPrimitive from '@radix-ui/react-avatar';
50
56
  import * as TogglePrimitive from '@radix-ui/react-toggle';
51
57
  import { Toaster as Toaster$1 } from 'sonner';
52
58
  export { toast } from 'sonner';
53
- import { FormProvider, Controller, useFormContext, useForm, useFieldArray } from 'react-hook-form';
59
+ import { useForm, useFormContext, useFieldArray } from 'react-hook-form';
54
60
  import { zodResolver } from '@hookform/resolvers/zod';
55
61
  import { getExpandedRowModel, getSortedRowModel, getPaginationRowModel, getFilteredRowModel, getCoreRowModel, useReactTable, flexRender } from '@tanstack/react-table';
62
+ import { create } from 'zustand';
56
63
 
57
- // src/theme/focus.ts
58
- var focusRingClasses = "outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50";
59
- var focusRingWithinClasses = "focus-visible:ring-[3px] focus-visible:ring-ring/50 has-[:focus-visible]:ring-[3px] has-[:focus-visible]:ring-ring/50";
60
64
  function Tabs({
61
65
  className,
62
66
  variant = "pills",
@@ -276,7 +280,7 @@ function NTabs({
276
280
  }
277
281
  var PORTAL_LAYER_STYLE_ID = "najm-kit-portal-layer-styles";
278
282
  function useNajmPortalLayerStyles() {
279
- React66.useInsertionEffect(() => {
283
+ React54.useInsertionEffect(() => {
280
284
  if (typeof document === "undefined") return;
281
285
  if (document.getElementById(PORTAL_LAYER_STYLE_ID)) return;
282
286
  const style = document.createElement("style");
@@ -307,7 +311,7 @@ var tooltipContentVariants = cva(
307
311
  }
308
312
  );
309
313
  function TooltipContent({ className, sideOffset = 4, variant, children, ...props }) {
310
- const container = React66.useContext(NajmThemeContainerCtx);
314
+ const container = React54.useContext(NajmThemeContainerCtx);
311
315
  useNajmPortalLayerStyles();
312
316
  return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsx(
313
317
  TooltipPrimitive.Content,
@@ -425,89 +429,6 @@ function NEditorTabs({
425
429
  }
426
430
  );
427
431
  }
428
- var NO_SHADE = /* @__PURE__ */ new Set(["black", "white"]);
429
- var PRESETS = {
430
- muted: "border-muted-foreground",
431
- primary: "border-primary",
432
- accent: "border-accent",
433
- success: "border-green-600",
434
- warning: "border-amber-600",
435
- destructive: "border-red-600"
436
- };
437
- var inputVariants = cva(
438
- "relative w-full flex items-center h-10 bg-card text-foreground overflow-hidden transition-colors",
439
- {
440
- variants: {
441
- variant: {
442
- default: "p-2 rounded-md",
443
- rounded: "p-2 rounded-full",
444
- ghost: "p-0! !bg-transparent !bg-none"
445
- },
446
- status: {
447
- default: "",
448
- error: ""
449
- },
450
- hasIcon: { true: "pl-8", false: "pl-3" },
451
- disabled: { true: "cursor-not-allowed", false: "" }
452
- },
453
- defaultVariants: { variant: "default", status: "default", hasIcon: false, disabled: false }
454
- }
455
- );
456
- var ERROR_BORDER = "border !border-red-600";
457
- var ERROR_FOCUS_RING = "focus-visible:ring-destructive/20 has-[:focus-visible]:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:has-[:focus-visible]:ring-destructive/40";
458
- var FOCUS_INTERACTIVE_BASE = "border focus-within:border-primary";
459
- var HOVER_INTERACTIVE_BASE = "hover:border-primary";
460
- var STATIC_BASE = "border";
461
- var BaseInput = React66__default.forwardRef(
462
- ({ children, variant = "default", status = "default", bordered, borderColor, className, style, disabled = false, onHover, onClick, hasIcon, ...rest }, ref) => {
463
- const recipe = useNajmComponentStyle("input");
464
- const isGhost = variant === "ghost";
465
- const isError = status === "error";
466
- const hasExplicitColor = !!borderColor;
467
- const isBordered = bordered !== false;
468
- const recipeRadius = variant === "default" ? resolveRadiusValue(recipe?.radius) : void 0;
469
- let colorClass = "";
470
- let borderClass = "";
471
- if (!isGhost) {
472
- if (isError) {
473
- borderClass = ERROR_BORDER;
474
- } else if (hasExplicitColor) {
475
- borderClass = `${STATIC_BASE} ${FOCUS_INTERACTIVE_BASE} ${HOVER_INTERACTIVE_BASE}`;
476
- colorClass = PRESETS[borderColor] ?? (NO_SHADE.has(borderColor) ? `border-${borderColor}` : `border-${borderColor}-600`);
477
- } else {
478
- const restingBorderClass = inputBorderClasses(isBordered);
479
- borderClass = isBordered ? `${STATIC_BASE} ${restingBorderClass} [&:not(:focus-within):not([data-state=open]):hover]:border-input focus-within:border-ring data-[state=open]:border-ring` : restingBorderClass;
480
- }
481
- }
482
- return /* @__PURE__ */ jsx(
483
- "div",
484
- {
485
- ref,
486
- "data-bordered": !isGhost && !isBordered ? "false" : !isGhost ? "true" : void 0,
487
- style: recipeRadius ? { borderRadius: recipeRadius, ...style } : style,
488
- className: cn(
489
- inputVariants({ variant, status, hasIcon, disabled }),
490
- // The wrapper is what the user reads as "the field": the inner
491
- // control is stripped of its own ring precisely so this element can
492
- // carry the border. Until this was added, the border merely changed
493
- // colour on focus — a 1px hue shift and nothing else — and the number
494
- // fields and the multi-select trigger came out of the acceptance walk
495
- // as tab stops with no visible indicator at all.
496
- !isGhost && focusRingWithinClasses,
497
- !isGhost && isError && ERROR_FOCUS_RING,
498
- !isGhost && borderClass,
499
- !isGhost && colorClass,
500
- className
501
- ),
502
- onMouseEnter: disabled ? void 0 : onHover,
503
- onClick: disabled ? void 0 : onClick,
504
- ...rest,
505
- children
506
- }
507
- );
508
- }
509
- );
510
- BaseInput.displayName = "BaseInput";
511
432
  function Popover({ ...props }) {
512
433
  return /* @__PURE__ */ jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
513
434
  }
@@ -518,7 +439,7 @@ function PopoverAnchor({ ...props }) {
518
439
  return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
519
440
  }
520
441
  function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
521
- const container = React66.useContext(NajmThemeContainerCtx);
442
+ const container = React54.useContext(NajmThemeContainerCtx);
522
443
  useNajmPortalLayerStyles();
523
444
  return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsx(
524
445
  PopoverPrimitive.Content,
@@ -627,7 +548,7 @@ function SwatchesColorPicker({
627
548
  hideSwatches = false
628
549
  }) {
629
550
  const inputRef = useRef(null);
630
- const themeContainer = React66__default.useContext(NajmThemeContainerCtx);
551
+ const themeContainer = React54__default.useContext(NajmThemeContainerCtx);
631
552
  const resolvedValue = resolvePickerColor(value, themeContainer);
632
553
  return /* @__PURE__ */ jsxs(
633
554
  BaseInput,
@@ -697,7 +618,7 @@ function PopoverColorPicker({
697
618
  formats = DEFAULT_FORMATS,
698
619
  output = "preserve"
699
620
  }) {
700
- const themeContainer = React66__default.useContext(NajmThemeContainerCtx);
621
+ const themeContainer = React54__default.useContext(NajmThemeContainerCtx);
701
622
  const resolvedValue = resolvePickerColor(value, themeContainer);
702
623
  const initialFormat = formats.includes(detectFormat(resolvedValue)) ? detectFormat(resolvedValue) : formats[0] ?? "hex";
703
624
  const [activeFormat, setActiveFormat] = useState(initialFormat);
@@ -743,1656 +664,216 @@ function PopoverColorPicker({
743
664
  children: [
744
665
  /* @__PURE__ */ jsx(
745
666
  "span",
746
- {
747
- className: "w-8 h-8 rounded-md border border-border shrink-0",
748
- style: { backgroundColor: value }
749
- }
750
- ),
751
- /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground font-mono truncate", children: value })
752
- ]
753
- }
754
- ) }),
755
- /* @__PURE__ */ jsxs(PopoverContent, { className: "w-64 flex flex-col gap-3", align: "start", children: [
756
- /* @__PURE__ */ jsx(
757
- HexColorPicker,
758
- {
759
- color: toPickerHex(
760
- draft === value ? resolvedValue : resolvePickerColor(draft, themeContainer)
761
- ),
762
- onChange: handlePickerChange,
763
- style: { width: "100%" }
764
- }
765
- ),
766
- formats.length > 1 && /* @__PURE__ */ jsx("div", { className: "flex gap-1 rounded-md bg-muted p-1", children: formats.map((fmt) => /* @__PURE__ */ jsx(
767
- "button",
768
- {
769
- type: "button",
770
- onClick: () => handleTabChange(fmt),
771
- className: cn(
772
- "flex-1 rounded-sm px-1.5 py-1 text-xs font-medium uppercase cursor-pointer transition-colors",
773
- activeFormat === fmt ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
774
- ),
775
- children: fmt
776
- },
777
- fmt
778
- )) }),
779
- /* @__PURE__ */ jsx(
780
- "input",
781
- {
782
- type: "text",
783
- value: draft,
784
- onChange: (e) => handleTextChange(e.target.value),
785
- spellCheck: false,
786
- className: "w-full rounded-md border border-border bg-background px-2 py-1.5 text-sm font-mono outline-none focus-visible:ring-2 focus-visible:ring-ring"
787
- }
788
- ),
789
- !hideSwatches && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5", children: colors.map((color) => /* @__PURE__ */ jsx(
790
- "button",
791
- {
792
- type: "button",
793
- onClick: () => handlePreset(color),
794
- className: cn(
795
- "w-5 h-5 rounded-md border border-border transition-transform hover:scale-110 cursor-pointer"
796
- ),
797
- style: { backgroundColor: color },
798
- title: color
799
- },
800
- color
801
- )) })
802
- ] })
803
- ] });
804
- }
805
- var sizeClasses = {
806
- sm: "p-0.5 [&_button]:h-6 [&_button]:px-1.5 [&_button]:text-xs",
807
- md: "p-0.5 [&_button]:h-7 [&_button]:px-2 [&_button]:text-sm"
808
- };
809
- function SegmentedControl({
810
- value,
811
- onChange,
812
- options,
813
- ariaLabel,
814
- className,
815
- size = "md",
816
- disabled = false
817
- }) {
818
- return /* @__PURE__ */ jsx(
819
- "div",
820
- {
821
- role: "radiogroup",
822
- "aria-label": ariaLabel,
823
- "data-disabled": disabled ? "" : void 0,
824
- className: cn(
825
- "inline-flex items-center rounded-lg bg-muted",
826
- sizeClasses[size],
827
- className
828
- ),
829
- children: options.map((opt) => {
830
- const selected = opt.value === value;
831
- return /* @__PURE__ */ jsxs(
832
- "button",
833
- {
834
- type: "button",
835
- role: "radio",
836
- "aria-checked": selected,
837
- "aria-label": opt.ariaLabel ?? (typeof opt.label === "string" ? opt.label : void 0),
838
- disabled,
839
- "aria-disabled": disabled || void 0,
840
- onClick: () => onChange(opt.value),
841
- className: cn(
842
- "inline-flex items-center justify-center gap-1.5 rounded-md font-medium transition-colors",
843
- "outline-none focus-visible:ring-2 focus-visible:ring-ring",
844
- "disabled:pointer-events-none disabled:opacity-50",
845
- selected ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
846
- ),
847
- children: [
848
- opt.icon && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: opt.icon }),
849
- opt.label
850
- ]
851
- },
852
- opt.value
853
- );
854
- })
855
- }
856
- );
857
- }
858
- function Collapsible({ ...props }) {
859
- return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
860
- }
861
- function CollapsibleTrigger2({
862
- className,
863
- ...props
864
- }) {
865
- return /* @__PURE__ */ jsx(
866
- CollapsiblePrimitive.CollapsibleTrigger,
867
- {
868
- "data-slot": "collapsible-trigger",
869
- className: cn(focusRingClasses, className),
870
- ...props
871
- }
872
- );
873
- }
874
- function CollapsibleContent2({ ...props }) {
875
- return /* @__PURE__ */ jsx(CollapsiblePrimitive.CollapsibleContent, { "data-slot": "collapsible-content", ...props });
876
- }
877
- function CustomizerField({
878
- label,
879
- description,
880
- htmlFor,
881
- className,
882
- layout = "stacked",
883
- onReset,
884
- resetLabel,
885
- resetAriaLabel,
886
- disabled,
887
- children
888
- }) {
889
- return /* @__PURE__ */ jsxs(
890
- "div",
891
- {
892
- className: cn(
893
- "flex gap-1.5",
894
- layout === "inline-start" ? "flex-row items-center gap-2" : "flex-col",
895
- className
896
- ),
897
- children: [
898
- /* @__PURE__ */ jsxs(
899
- "div",
900
- {
901
- className: cn(
902
- "flex items-center gap-2",
903
- layout === "inline-start" ? "w-28 shrink-0 justify-start" : "justify-between"
904
- ),
905
- children: [
906
- /* @__PURE__ */ jsx(
907
- "label",
908
- {
909
- htmlFor,
910
- className: cn(
911
- "min-w-0 text-xs font-medium text-muted-foreground",
912
- layout === "inline-start" && "truncate text-start"
913
- ),
914
- title: typeof label === "string" || typeof label === "number" ? String(label) : void 0,
915
- children: label
916
- }
917
- ),
918
- onReset ? /* @__PURE__ */ jsx(
919
- ResetButton,
920
- {
921
- onClick: onReset,
922
- "aria-label": typeof resetAriaLabel === "string" || typeof resetAriaLabel === "number" ? String(resetAriaLabel) : typeof resetLabel === "string" || typeof resetLabel === "number" ? String(resetLabel) : "Reset field",
923
- title: typeof resetLabel === "string" || typeof resetLabel === "number" ? String(resetLabel) : "Reset",
924
- disabled
925
- }
926
- ) : null
927
- ]
928
- }
929
- ),
930
- /* @__PURE__ */ jsx("div", { className: cn(layout === "inline-start" && "min-w-0 flex-1"), children }),
931
- description ? /* @__PURE__ */ jsx("p", { className: "text-[11px] leading-snug text-muted-foreground/80", children: description }) : null
932
- ]
933
- }
934
- );
935
- }
936
- function ResetButton({
937
- onClick,
938
- disabled,
939
- className,
940
- ...rest
941
- }) {
942
- return /* @__PURE__ */ jsx(
943
- NButton,
944
- {
945
- type: "button",
946
- variant: "ghost",
947
- size: "icon-xs",
948
- onClick,
949
- disabled,
950
- "aria-disabled": disabled,
951
- className: cn("text-muted-foreground hover:text-foreground", className),
952
- ...rest,
953
- children: /* @__PURE__ */ jsx(RotateCcw, { className: "size-3" })
954
- }
955
- );
956
- }
957
- function Sheet({ ...props }) {
958
- return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
959
- }
960
- function SheetTrigger({ ...props }) {
961
- return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
962
- }
963
- function SheetClose({ ...props }) {
964
- return /* @__PURE__ */ jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
965
- }
966
- function SheetPortal({ ...props }) {
967
- const container = React66.useContext(NajmThemeContainerCtx);
968
- return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", container: container ?? void 0, ...props });
969
- }
970
- function SheetOverlay({ className, ...props }) {
971
- return /* @__PURE__ */ jsx(
972
- SheetPrimitive.Overlay,
973
- {
974
- "data-slot": "sheet-overlay",
975
- className: cn(
976
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
977
- className
978
- ),
979
- ...props
980
- }
981
- );
982
- }
983
- var sheetVariants = cva(
984
- "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 fixed z-50 gap-4 shadow-lg transition ease-in-out border-border",
985
- {
986
- variants: {
987
- side: {
988
- top: "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 border-b",
989
- bottom: "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 border-t",
990
- left: "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
991
- right: "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"
992
- }
993
- },
994
- defaultVariants: { side: "right" }
995
- }
996
- );
997
- function SheetContent({ className, portalClassName, side, children, ...props }) {
998
- return /* @__PURE__ */ jsx(SheetPortal, { children: /* @__PURE__ */ jsxs("div", { className: portalClassName, children: [
999
- /* @__PURE__ */ jsx(SheetOverlay, {}),
1000
- /* @__PURE__ */ jsxs(
1001
- SheetPrimitive.Content,
1002
- {
1003
- "data-slot": "sheet-content",
1004
- className: cn(sheetVariants({ side }), className),
1005
- ...props,
1006
- children: [
1007
- children,
1008
- /* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 end-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
1009
- /* @__PURE__ */ jsx(X, { className: "size-4" }),
1010
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
1011
- ] })
1012
- ]
1013
- }
1014
- )
1015
- ] }) });
1016
- }
1017
- function SheetHeader({ className, ...props }) {
1018
- return /* @__PURE__ */ jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-1.5 p-6", className), ...props });
1019
- }
1020
- function SheetFooter({ className, ...props }) {
1021
- return /* @__PURE__ */ jsx("div", { "data-slot": "sheet-footer", className: cn("mt-auto flex flex-col gap-2 p-6", className), ...props });
1022
- }
1023
- function SheetTitle({ className, ...props }) {
1024
- return /* @__PURE__ */ jsx(SheetPrimitive.Title, { "data-slot": "sheet-title", className: cn("text-foreground font-semibold", className), ...props });
1025
- }
1026
- function SheetDescription({ className, ...props }) {
1027
- return /* @__PURE__ */ jsx(SheetPrimitive.Description, { "data-slot": "sheet-description", className: cn("text-muted-foreground text-sm", className), ...props });
1028
- }
1029
- var PortalScopeContext = createContext(void 0);
1030
- function NPortalScopeProvider({ className, children }) {
1031
- return /* @__PURE__ */ jsx(PortalScopeContext.Provider, { value: className, children });
1032
- }
1033
- var useNPortalScope = () => useContext(PortalScopeContext);
1034
- var responsiveSectionPadding = "px-3 py-3 lg:px-3 2xl:px-4";
1035
- function NSheet({
1036
- open,
1037
- onOpenChange,
1038
- icon: Icon2,
1039
- title,
1040
- description,
1041
- width = 480,
1042
- side = "right",
1043
- portalClassName,
1044
- classNames,
1045
- bodyClassName,
1046
- contentClassName,
1047
- children,
1048
- footer
1049
- }) {
1050
- const inheritedScope = useNPortalScope();
1051
- const portal = portalClassName ?? inheritedScope;
1052
- const style = {
1053
- width: `min(${width}px, 95vw)`,
1054
- maxWidth: `${width}px`
1055
- };
1056
- return /* @__PURE__ */ jsx(Sheet, { open, onOpenChange, children: /* @__PURE__ */ jsxs(
1057
- SheetContent,
1058
- {
1059
- side,
1060
- portalClassName: portal,
1061
- className: cn(
1062
- "flex h-dvh max-h-dvh flex-col gap-0 overflow-hidden bg-background p-0 text-foreground",
1063
- contentClassName,
1064
- classNames?.content
1065
- ),
1066
- style,
1067
- children: [
1068
- /* @__PURE__ */ jsx(
1069
- SheetHeader,
1070
- {
1071
- className: cn(
1072
- "shrink-0 border-b border-border p-0",
1073
- responsiveSectionPadding,
1074
- classNames?.header
1075
- ),
1076
- children: /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2 lg:gap-3 xl:gap-3 2xl:gap-4", children: [
1077
- /* @__PURE__ */ jsx("div", { className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10", children: /* @__PURE__ */ jsx(Icon2, { className: "size-4 text-primary" }) }),
1078
- /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
1079
- /* @__PURE__ */ jsx(SheetTitle, { className: "truncate text-sm font-semibold text-foreground", children: title }),
1080
- description && /* @__PURE__ */ jsx(SheetDescription, { className: "truncate text-xs text-muted-foreground", children: description })
1081
- ] })
1082
- ] })
1083
- }
1084
- ),
1085
- /* @__PURE__ */ jsx(NajmScroll, { axis: "y", className: "min-h-0 flex-1", children: /* @__PURE__ */ jsx(
1086
- "div",
1087
- {
1088
- "data-slot": "sheet-body",
1089
- className: cn(responsiveSectionPadding, bodyClassName, classNames?.body),
1090
- children
1091
- }
1092
- ) }),
1093
- footer && /* @__PURE__ */ jsx(
1094
- "div",
1095
- {
1096
- "data-slot": "sheet-footer",
1097
- className: cn(
1098
- "shrink-0 border-t border-border",
1099
- responsiveSectionPadding,
1100
- classNames?.footer
1101
- ),
1102
- children: footer
1103
- }
1104
- )
1105
- ]
1106
- }
1107
- ) });
1108
- }
1109
- function Dialog({ ...props }) {
1110
- return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "dialog", ...props });
1111
- }
1112
- function DialogTrigger({ ...props }) {
1113
- return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
1114
- }
1115
- function DialogPortal({ ...props }) {
1116
- const container = React66.useContext(NajmThemeContainerCtx);
1117
- return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "dialog-portal", container: container ?? void 0, ...props });
1118
- }
1119
- function DialogClose({ ...props }) {
1120
- return /* @__PURE__ */ jsx(SheetPrimitive.Close, { "data-slot": "dialog-close cursor-pointer", ...props });
1121
- }
1122
- function DialogOverlay({ className, ...props }) {
1123
- return /* @__PURE__ */ jsx(
1124
- SheetPrimitive.Overlay,
1125
- {
1126
- "data-slot": "dialog-overlay",
1127
- className: cn(
1128
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
1129
- className
1130
- ),
1131
- ...props
1132
- }
1133
- );
1134
- }
1135
- var dialogPaddingMap = {
1136
- none: "p-0 gap-0 overflow-hidden",
1137
- sm: "p-3",
1138
- md: "p-6",
1139
- lg: "p-8"
1140
- };
1141
- var MOBILE_PADDING_QUERY = "(max-width: 639.98px)";
1142
- function getDefaultPadding() {
1143
- if (typeof window === "undefined" || typeof window.matchMedia !== "function") return "md";
1144
- return window.matchMedia(MOBILE_PADDING_QUERY).matches ? "sm" : "md";
1145
- }
1146
- function useResponsivePadding(value) {
1147
- const [resolved, setResolved] = React66.useState(() => value ?? getDefaultPadding());
1148
- React66.useEffect(() => {
1149
- if (value) {
1150
- setResolved(value);
1151
- return;
1152
- }
1153
- if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
1154
- const mql = window.matchMedia(MOBILE_PADDING_QUERY);
1155
- const update = () => setResolved(mql.matches ? "sm" : "md");
1156
- update();
1157
- mql.addEventListener("change", update);
1158
- return () => mql.removeEventListener("change", update);
1159
- }, [value]);
1160
- return resolved;
1161
- }
1162
- function DialogContent({
1163
- className,
1164
- children,
1165
- padding,
1166
- hideClose = false,
1167
- onOpenAutoFocus,
1168
- onCloseAutoFocus,
1169
- ...props
1170
- }) {
1171
- const resolvedPadding = useResponsivePadding(padding);
1172
- const portalClassName = useNPortalScope();
1173
- const openerRef = React66.useRef(null);
1174
- return /* @__PURE__ */ jsx(DialogPortal, { "data-slot": "dialog-portal", children: /* @__PURE__ */ jsxs("div", { className: portalClassName, children: [
1175
- /* @__PURE__ */ jsx(DialogOverlay, {}),
1176
- /* @__PURE__ */ jsxs(
1177
- SheetPrimitive.Content,
1178
- {
1179
- "data-slot": "dialog-content",
1180
- "data-padding": resolvedPadding,
1181
- onOpenAutoFocus: (event) => {
1182
- const active = document.activeElement;
1183
- openerRef.current = active instanceof HTMLElement && active !== document.body ? active : null;
1184
- onOpenAutoFocus?.(event);
1185
- },
1186
- onCloseAutoFocus: (event) => {
1187
- onCloseAutoFocus?.(event);
1188
- if (event.defaultPrevented) return;
1189
- const opener = openerRef.current;
1190
- setTimeout(() => {
1191
- if (!opener?.isConnected) return;
1192
- const active = document.activeElement;
1193
- const lost = !active || active === document.body || active === document.documentElement || !active.isConnected;
1194
- if (lost) opener.focus();
1195
- }, 0);
1196
- },
1197
- className: cn(
1198
- "bg-card text-card-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-sm translate-x-[-50%] translate-y-[-50%] gap-4 rounded-none lg:rounded-lg najm-border border-border shadow-lg duration-200",
1199
- dialogPaddingMap[resolvedPadding],
1200
- className
1201
- ),
1202
- ...props,
1203
- children: [
1204
- children,
1205
- !hideClose && /* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "ring-offset-background cursor-pointer focus:ring-ring absolute top-4 end-4 rounded-xs text-muted-foreground hover:text-foreground transition-colors focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [
1206
- /* @__PURE__ */ jsx(XIcon, {}),
1207
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
1208
- ] })
1209
- ]
1210
- }
1211
- )
1212
- ] }) });
1213
- }
1214
- function DialogHeader({ className, ...props }) {
1215
- return /* @__PURE__ */ jsx("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-start", className), ...props });
1216
- }
1217
- function DialogFooter({ className, ...props }) {
1218
- return /* @__PURE__ */ jsx("div", { "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props });
1219
- }
1220
- function DialogTitle({ className, ...props }) {
1221
- return /* @__PURE__ */ jsx(SheetPrimitive.Title, { "data-slot": "dialog-title", className: cn("text-lg leading-none font-semibold", className), ...props });
1222
- }
1223
- function DialogDescription({ className, ...props }) {
1224
- return /* @__PURE__ */ jsx(SheetPrimitive.Description, { "data-slot": "dialog-description", className: cn("text-muted-foreground text-sm", className), ...props });
1225
- }
1226
- var variantClasses = {
1227
- primary: "bg-primary text-primary-foreground hover:bg-primary/90",
1228
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
1229
- ghost: "bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground",
1230
- destructive: "bg-transparent text-destructive hover:bg-destructive/10"
1231
- };
1232
- var sizeClasses2 = {
1233
- sm: "h-6 w-6",
1234
- md: "h-8 w-8",
1235
- lg: "h-10 w-10"
1236
- };
1237
- var IconButton = React66.forwardRef(
1238
- ({
1239
- className,
1240
- variant = "ghost",
1241
- size = "md",
1242
- active = false,
1243
- type = "button",
1244
- children,
1245
- style,
1246
- ...props
1247
- }, ref) => {
1248
- const recipe = useNajmComponentStyle("button");
1249
- const recipeRadius = resolveRadiusValue(recipe?.radius);
1250
- return /* @__PURE__ */ jsx(
1251
- "button",
1252
- {
1253
- ref,
1254
- type,
1255
- "aria-pressed": active || void 0,
1256
- style: recipeRadius ? { borderRadius: recipeRadius, ...style } : style,
1257
- className: cn(
1258
- "inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md transition-colors",
1259
- "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
1260
- "disabled:cursor-not-allowed disabled:opacity-50",
1261
- variantClasses[variant],
1262
- sizeClasses2[size],
1263
- active && "bg-accent text-accent-foreground",
1264
- className
1265
- ),
1266
- ...props,
1267
- children
1268
- }
1269
- );
1270
- }
1271
- );
1272
- IconButton.displayName = "IconButton";
1273
- var NSidebarContext = createContext(null);
1274
- function useNSidebar() {
1275
- return useContext(NSidebarContext);
1276
- }
1277
- function NSidebarProvider({
1278
- children,
1279
- defaultCollapsed = false,
1280
- mobileBreakpoint = "md"
1281
- }) {
1282
- const [collapsed, setCollapsed] = useState(defaultCollapsed);
1283
- const [mobileOpen, setMobileOpen] = useState(false);
1284
- const openMobile = useCallback(() => setMobileOpen(true), []);
1285
- const closeMobile = useCallback(() => setMobileOpen(false), []);
1286
- const toggleCollapsed = useCallback(() => setCollapsed((prev) => !prev), []);
1287
- const value = useMemo(
1288
- () => ({
1289
- collapsed,
1290
- mobileOpen,
1291
- openMobile,
1292
- closeMobile,
1293
- setMobileOpen,
1294
- setCollapsed,
1295
- toggleCollapsed,
1296
- mobileBreakpoint
1297
- }),
1298
- [collapsed, mobileOpen, openMobile, closeMobile, toggleCollapsed, mobileBreakpoint]
1299
- );
1300
- return /* @__PURE__ */ jsx(NSidebarContext.Provider, { value, children });
1301
- }
1302
- function NPageHeaderActions({ children, className }) {
1303
- return /* @__PURE__ */ jsx("div", { className: cn("flex shrink-0 items-center gap-0 lg:gap-1 xl:gap-2 2xl:gap-2", className), children });
1304
- }
1305
- NPageHeaderActions.displayName = "NPageHeaderActions";
1306
- function NPageHeaderCompactActions({ children, className }) {
1307
- return /* @__PURE__ */ jsx("div", { className: cn("flex shrink-0 items-center", className), children });
1308
- }
1309
- NPageHeaderCompactActions.displayName = "NPageHeaderCompactActions";
1310
- function NPageHeaderFilters({ children, className }) {
1311
- return /* @__PURE__ */ jsx("div", { className: cn("py-3 lg:px-3 xl:px-4 2xl:px-5", className), children });
1312
- }
1313
- NPageHeaderFilters.displayName = "NPageHeaderFilters";
1314
- function NPageHeaderTop({ children, className }) {
1315
- return /* @__PURE__ */ jsx("div", { className, children });
1316
- }
1317
- NPageHeaderTop.displayName = "NPageHeaderTop";
1318
- function isPageHeaderSlot(child, slot) {
1319
- return React66__default.isValidElement(child) && child.type === slot;
1320
- }
1321
- function getSlotElements(children, slot) {
1322
- const matches = React66__default.Children.toArray(children).filter((child) => isPageHeaderSlot(child, slot));
1323
- return matches.length > 0 ? matches : void 0;
1324
- }
1325
- var responsiveClasses = {
1326
- sm: {
1327
- main: "sm:flex sm:justify-between",
1328
- identity: "sm:col-start-auto sm:row-start-auto sm:justify-self-auto",
1329
- controls: "sm:col-start-auto sm:row-start-auto sm:justify-self-auto",
1330
- fullActions: "sm:flex",
1331
- compactActions: "sm:hidden",
1332
- sidebarTrigger: "sm:hidden",
1333
- icon: "sm:flex",
1334
- subtitle: "sm:block",
1335
- minH: "sm:min-h-14"
1336
- },
1337
- md: {
1338
- main: "md:flex md:justify-between",
1339
- identity: "md:col-start-auto md:row-start-auto md:justify-self-auto",
1340
- controls: "md:col-start-auto md:row-start-auto md:justify-self-auto",
1341
- fullActions: "md:flex",
1342
- compactActions: "md:hidden",
1343
- sidebarTrigger: "md:hidden",
1344
- icon: "md:flex",
1345
- subtitle: "md:block",
1346
- minH: "md:min-h-14"
1347
- },
1348
- lg: {
1349
- main: "lg:flex lg:justify-between lg:px-3 2xl:px-4",
1350
- identity: "lg:col-start-auto lg:row-start-auto lg:justify-self-auto",
1351
- controls: "lg:col-start-auto lg:row-start-auto lg:justify-self-auto",
1352
- fullActions: "lg:flex",
1353
- compactActions: "lg:hidden",
1354
- sidebarTrigger: "lg:hidden",
1355
- icon: "lg:flex",
1356
- subtitle: "lg:block",
1357
- minH: "lg:min-h-14"
1358
- }
1359
- };
1360
- function NPageHeader({
1361
- icon: Icon2,
1362
- title,
1363
- subtitle,
1364
- actions,
1365
- compactActions,
1366
- filters,
1367
- top,
1368
- mobileBreakpoint: mobileBreakpointProp,
1369
- onSidebarOpen,
1370
- sidebarTriggerLabel = "Open sidebar",
1371
- sidebarTriggerClassName,
1372
- search,
1373
- children,
1374
- className,
1375
- headerClassName,
1376
- card,
1377
- bordered
1378
- }) {
1379
- const [internalSearch, setInternalSearch] = useState("");
1380
- const recipe = useNajmComponentStyle("pageHeader");
1381
- const sidebar = useNSidebar();
1382
- const resolvedOnSidebarOpen = onSidebarOpen ?? sidebar?.openMobile;
1383
- const mobileBreakpoint = mobileBreakpointProp ?? sidebar?.mobileBreakpoint ?? "md";
1384
- const searchValue = search?.value ?? internalSearch;
1385
- const handleSearchChange = useCallback((e) => {
1386
- setInternalSearch(e.currentTarget.value);
1387
- search?.onChange?.(e);
1388
- }, [search?.onChange]);
1389
- const slottedActions = getSlotElements(children, NPageHeaderActions);
1390
- const slottedCompactActions = getSlotElements(children, NPageHeaderCompactActions);
1391
- const slottedFilters = getSlotElements(children, NPageHeaderFilters);
1392
- const slottedTop = getSlotElements(children, NPageHeaderTop);
1393
- const resolvedActions = slottedActions ?? actions;
1394
- const resolvedCompactActions = slottedCompactActions ?? compactActions;
1395
- const resolvedFilters = slottedFilters ?? filters;
1396
- const resolvedTop = slottedTop ?? top;
1397
- const hasCompactActions = resolvedCompactActions !== void 0 && resolvedCompactActions !== null && resolvedCompactActions !== false;
1398
- const breakpointClasses = responsiveClasses[mobileBreakpoint];
1399
- const isCard = card ?? recipe?.card ?? bordered === true;
1400
- const recipeRadius = resolveRadiusValue(recipe?.radius);
1401
- const bleedStyle = isCard ? void 0 : {
1402
- marginTop: "calc(var(--najm-section-gap, 0px) * -1)",
1403
- marginInline: "calc(var(--najm-page-gutter, 0px) * -1)"
1404
- };
1405
- const recipeStyle = recipeRadius || recipe?.borderWidth || bleedStyle ? {
1406
- ...bleedStyle,
1407
- ...recipeRadius ? { borderRadius: recipeRadius } : {},
1408
- ...recipe?.borderWidth ? { borderWidth: recipe.borderWidth } : {}
1409
- } : void 0;
1410
- return /* @__PURE__ */ jsxs(
1411
- "div",
1412
- {
1413
- "data-slot": "page-header",
1414
- "data-card": isCard ? "true" : void 0,
1415
- "data-bordered": bordered === false ? "false" : bordered ? "true" : void 0,
1416
- style: recipeStyle,
1417
- className: cn(
1418
- isCard ? cn("rounded-xl bg-card text-card-foreground shadow-none", surfaceBorderClasses(true)) : cn(
1419
- "border-b bg-background text-foreground",
1420
- surfaceBorderClasses(true, "bottom").replace("najm-border-b", "najm-border-b")
1421
- ),
1422
- className
1423
- ),
1424
- children: [
1425
- resolvedTop,
1426
- /* @__PURE__ */ jsxs(
1427
- "div",
1428
- {
1429
- "data-slot": "page-header-main",
1430
- className: cn(
1431
- // min-h-14 matches NSidebarHeader so the two bottom rules line up.
1432
- "relative grid min-h-14 grid-cols-[minmax(2.75rem,1fr)_minmax(0,auto)_minmax(2.75rem,1fr)] items-center gap-2 px-2 lg:px-3 2xl:px-4",
1433
- breakpointClasses.main,
1434
- breakpointClasses.minH,
1435
- headerClassName
1436
- ),
1437
- children: [
1438
- resolvedOnSidebarOpen && /* @__PURE__ */ jsx(
1439
- Button,
1440
- {
1441
- type: "button",
1442
- variant: "ghost",
1443
- size: "icon",
1444
- onClick: resolvedOnSidebarOpen,
1445
- "aria-label": sidebarTriggerLabel,
1446
- "data-slot": "page-header-sidebar-trigger",
1447
- className: cn(
1448
- "col-start-1 row-start-1 justify-self-start",
1449
- breakpointClasses.sidebarTrigger,
1450
- sidebarTriggerClassName
1451
- ),
1452
- children: /* @__PURE__ */ jsx(Menu, { className: "h-5 w-5" })
1453
- }
1454
- ),
1455
- /* @__PURE__ */ jsxs(
1456
- "div",
1457
- {
1458
- "data-slot": "page-header-identity",
1459
- className: cn(
1460
- "col-start-2 row-start-1 flex min-w-0 max-w-full items-center justify-self-center gap-2 lg:gap-3 xl:gap-3 2xl:gap-4",
1461
- breakpointClasses.identity
1462
- ),
1463
- children: [
1464
- /* @__PURE__ */ jsx("div", { className: cn("hidden h-8 w-8 shrink-0 rounded-lg bg-primary/10 items-center justify-center", breakpointClasses.icon), children: /* @__PURE__ */ jsx(Icon2, { className: "h-4 w-4 text-primary" }) }),
1465
- /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
1466
- /* @__PURE__ */ jsx("h2", { className: "truncate text-sm font-semibold text-foreground", children: title }),
1467
- subtitle && /* @__PURE__ */ jsx("p", { className: cn("hidden truncate text-xs leading-relaxed text-muted-foreground sm:text-sm sm:leading-normal", breakpointClasses.subtitle), children: subtitle })
1468
- ] })
1469
- ]
1470
- }
1471
- ),
1472
- /* @__PURE__ */ jsxs(
1473
- "div",
1474
- {
1475
- "data-slot": "page-header-controls",
1476
- className: cn(
1477
- "col-start-3 row-start-1 flex min-w-0 shrink-0 items-center justify-self-end gap-3",
1478
- breakpointClasses.controls
1479
- ),
1480
- children: [
1481
- hasCompactActions && /* @__PURE__ */ jsx(
1482
- "div",
1483
- {
1484
- "data-slot": "page-header-compact-actions",
1485
- className: cn("flex items-center", breakpointClasses.compactActions),
1486
- children: slottedCompactActions ? resolvedCompactActions : /* @__PURE__ */ jsx(NPageHeaderCompactActions, { children: resolvedCompactActions })
1487
- }
1488
- ),
1489
- /* @__PURE__ */ jsxs(
1490
- "div",
1491
- {
1492
- "data-slot": "page-header-full-actions",
1493
- className: cn(
1494
- "shrink-0 items-center gap-3",
1495
- hasCompactActions ? "hidden" : "flex",
1496
- hasCompactActions && breakpointClasses.fullActions
1497
- ),
1498
- children: [
1499
- search && /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1500
- /* @__PURE__ */ jsx(Search, { size: 14, className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none" }),
1501
- /* @__PURE__ */ jsx(
1502
- "input",
1503
- {
1504
- ref: search.ref,
1505
- type: "text",
1506
- value: searchValue,
1507
- placeholder: search.placeholder ?? "Search...",
1508
- className: cn(
1509
- "h-9 w-full max-w-[280px] rounded-lg bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground outline-none border border-border focus:border-primary focus:ring-1 focus:ring-primary/20 transition-colors",
1510
- search.className
1511
- ),
1512
- onChange: handleSearchChange
1513
- }
1514
- )
1515
- ] }),
1516
- resolvedActions && (slottedActions ? resolvedActions : /* @__PURE__ */ jsx(NPageHeaderActions, { children: resolvedActions }))
1517
- ]
1518
- }
1519
- )
1520
- ]
1521
- }
1522
- )
1523
- ]
1524
- }
1525
- ),
1526
- resolvedFilters && (slottedFilters ? resolvedFilters : /* @__PURE__ */ jsx(NPageHeaderFilters, { children: resolvedFilters }))
1527
- ]
1528
- }
1529
- );
1530
- }
1531
- var generateId = () => `dialog-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
1532
- var buildButtonConfig = (partial, defaults) => {
1533
- return { ...defaults, ...partial };
1534
- };
1535
- function createDialogStore() {
1536
- return create((set, get) => ({
1537
- dialogs: [],
1538
- pushDialog: (config) => {
1539
- return new Promise((resolve, reject) => {
1540
- const id = generateId();
1541
- const primaryButtonConfig = buildButtonConfig(config.primaryButton, {
1542
- text: "Confirm",
1543
- variant: "default",
1544
- loading: false,
1545
- disabled: false,
1546
- loadingText: "Processing..."
1547
- });
1548
- const secondaryButtonConfig = buildButtonConfig(config.secondaryButton, {
1549
- text: "Cancel",
1550
- variant: "outline",
1551
- loading: false,
1552
- disabled: false,
1553
- loadingText: "Processing..."
1554
- });
1555
- const dialogConfig = {
1556
- id,
1557
- title: config.title,
1558
- description: config.description,
1559
- pageHeader: config.pageHeader,
1560
- padding: config.padding,
1561
- children: config.children,
1562
- primaryButton: primaryButtonConfig,
1563
- secondaryButton: secondaryButtonConfig,
1564
- showButtons: config.showButtons ?? true,
1565
- size: config.size,
1566
- width: config.width,
1567
- height: config.height,
1568
- className: config.className,
1569
- actionMode: config.actionMode ?? "auto",
1570
- render: config.render,
1571
- resolve,
1572
- reject
1573
- };
1574
- set((state) => ({ dialogs: [...state.dialogs, dialogConfig] }));
1575
- });
1576
- },
1577
- popDialog: async (result) => {
1578
- const { dialogs } = get();
1579
- if (dialogs.length === 0) return;
1580
- const dialog = dialogs[dialogs.length - 1];
1581
- const closeCurrentDialog = () => {
1582
- dialog.resolve?.(result);
1583
- set((state) => ({ dialogs: state.dialogs.slice(0, -1) }));
1584
- };
1585
- const handler = dialog.primaryButton?.onClick ?? dialog.primaryButton?.onConfirm;
1586
- if (handler && result != null) {
1587
- get().setPrimaryLoading(true);
1588
- try {
1589
- await handler(result);
1590
- closeCurrentDialog();
1591
- } finally {
1592
- get().setPrimaryLoading(false);
1593
- }
1594
- return;
1595
- }
1596
- dialog.resolve?.(result);
1597
- set((state) => ({ dialogs: state.dialogs.slice(0, -1) }));
1598
- },
1599
- closeDialog: (id, result) => {
1600
- const { dialogs } = get();
1601
- const dialog = dialogs.find((d) => d.id === id);
1602
- if (!dialog) return;
1603
- dialog.resolve?.(result);
1604
- set((state) => ({ dialogs: state.dialogs.filter((d) => d.id !== id) }));
1605
- },
1606
- closeAllDialogs: () => {
1607
- const { dialogs } = get();
1608
- dialogs.forEach((d) => d.reject?.(new Error("All dialogs closed")));
1609
- set({ dialogs: [] });
1610
- },
1611
- getCurrentDialog: () => {
1612
- const { dialogs } = get();
1613
- return dialogs[dialogs.length - 1];
1614
- },
1615
- setPrimaryLoading: (loading) => {
1616
- set((state) => {
1617
- const newDialogs = [...state.dialogs];
1618
- const idx = newDialogs.length - 1;
1619
- if (idx < 0 || !newDialogs[idx].primaryButton) return state;
1620
- newDialogs[idx] = {
1621
- ...newDialogs[idx],
1622
- primaryButton: { ...newDialogs[idx].primaryButton, loading }
1623
- };
1624
- return { dialogs: newDialogs };
1625
- });
1626
- },
1627
- setSecondaryLoading: (loading) => {
1628
- set((state) => {
1629
- const newDialogs = [...state.dialogs];
1630
- const idx = newDialogs.length - 1;
1631
- if (idx < 0 || !newDialogs[idx].secondaryButton) return state;
1632
- newDialogs[idx] = {
1633
- ...newDialogs[idx],
1634
- secondaryButton: { ...newDialogs[idx].secondaryButton, loading }
1635
- };
1636
- return { dialogs: newDialogs };
1637
- });
1638
- },
1639
- updatePrimaryButton: (config, dialogId) => {
1640
- set((state) => {
1641
- const newDialogs = [...state.dialogs];
1642
- const idx = dialogId ? newDialogs.findIndex((d) => d.id === dialogId) : newDialogs.length - 1;
1643
- if (idx === -1 || !newDialogs[idx].primaryButton) return state;
1644
- newDialogs[idx] = {
1645
- ...newDialogs[idx],
1646
- primaryButton: { ...newDialogs[idx].primaryButton, ...config }
1647
- };
1648
- return { dialogs: newDialogs };
1649
- });
1650
- },
1651
- updateSecondaryButton: (config, dialogId) => {
1652
- set((state) => {
1653
- const newDialogs = [...state.dialogs];
1654
- const idx = dialogId ? newDialogs.findIndex((d) => d.id === dialogId) : newDialogs.length - 1;
1655
- if (idx === -1 || !newDialogs[idx].secondaryButton) return state;
1656
- newDialogs[idx] = {
1657
- ...newDialogs[idx],
1658
- secondaryButton: { ...newDialogs[idx].secondaryButton, ...config }
1659
- };
1660
- return { dialogs: newDialogs };
1661
- });
1662
- },
1663
- updateShowButtons: (show, dialogId) => {
1664
- set((state) => {
1665
- const newDialogs = [...state.dialogs];
1666
- const idx = dialogId ? newDialogs.findIndex((d) => d.id === dialogId) : newDialogs.length - 1;
1667
- if (idx === -1) return state;
1668
- newDialogs[idx] = { ...newDialogs[idx], showButtons: show };
1669
- return { dialogs: newDialogs };
1670
- });
1671
- },
1672
- handlePrimaryClick: async (dialogId, data) => {
1673
- const { dialogs, setPrimaryLoading, closeDialog } = get();
1674
- const dialog = dialogs.find((d) => d.id === dialogId);
1675
- if (!dialog?.primaryButton) return;
1676
- const handler = dialog.primaryButton.onClick ?? dialog.primaryButton.onConfirm;
1677
- if (handler) {
1678
- setPrimaryLoading(true);
1679
- try {
1680
- await handler(data);
1681
- closeDialog(dialogId, data);
1682
- } finally {
1683
- setPrimaryLoading(false);
1684
- }
1685
- } else {
1686
- closeDialog(dialogId, data);
1687
- }
1688
- },
1689
- handleSecondaryClick: async (dialogId, data) => {
1690
- const { dialogs, closeDialog } = get();
1691
- const dialog = dialogs.find((d) => d.id === dialogId);
1692
- if (!dialog?.secondaryButton) {
1693
- closeDialog(dialogId, null);
1694
- return;
1695
- }
1696
- const handler = dialog.secondaryButton.onClick ?? dialog.secondaryButton.onConfirm;
1697
- if (handler) {
1698
- await handler(data);
1699
- }
1700
- closeDialog(dialogId, null);
1701
- },
1702
- handleConfirm: async (data) => {
1703
- const { dialogs, handlePrimaryClick } = get();
1704
- const current = dialogs[dialogs.length - 1];
1705
- if (!current) return;
1706
- await handlePrimaryClick(current.id, data);
1707
- },
1708
- handleOpenChange: (dialogId, open) => {
1709
- if (!open) {
1710
- const { closeDialog } = get();
1711
- closeDialog(dialogId, null);
1712
- }
1713
- }
1714
- }));
1715
- }
1716
- var defaultStore = createDialogStore();
1717
- function useDialogStore() {
1718
- return defaultStore;
1719
- }
1720
- function NDialogHeader(_props) {
1721
- return null;
1722
- }
1723
- function NDialogDescription(_props) {
1724
- return null;
1725
- }
1726
- function NDialogPrimaryButton(_props) {
1727
- return null;
1728
- }
1729
- function NDialogSecondaryButton(_props) {
1730
- return null;
1731
- }
1732
- function parseDirectDialogSlots(children) {
1733
- const body = [];
1734
- const parsed = {};
1735
- React66__default.Children.forEach(children, (child) => {
1736
- if (!React66__default.isValidElement(child)) {
1737
- body.push(child);
1738
- return;
1739
- }
1740
- if (child.type === NDialogHeader) {
1741
- parsed.header = child.props;
1742
- return;
1743
- }
1744
- if (child.type === NDialogDescription) {
1745
- parsed.description = child.props;
1746
- return;
1747
- }
1748
- if (child.type === NDialogPrimaryButton || child.type === NDialogSecondaryButton) {
1749
- const { children: text, label, ...config } = child.props;
1750
- const button = { ...config, text: label ?? text ?? (child.type === NDialogPrimaryButton ? "Confirm" : "Cancel") };
1751
- if (child.type === NDialogPrimaryButton) parsed.primaryButton = button;
1752
- else parsed.secondaryButton = button;
1753
- return;
1754
- }
1755
- body.push(child);
1756
- });
1757
- return { ...parsed, body };
1758
- }
1759
- var dialogVariants = cva(
1760
- "flex flex-col w-full max-w-full h-full max-h-screen",
1761
- {
1762
- variants: {
1763
- variant: {
1764
- default: "",
1765
- window: "rounded-none lg:rounded-sm"
1766
- },
1767
- size: {
1768
- sm: "lg:max-w-md",
1769
- md: "lg:max-w-lg",
1770
- lg: "lg:max-w-xl",
1771
- xl: "lg:max-w-2xl",
1772
- xxl: "lg:max-w-3xl",
1773
- full: "lg:max-w-4xl"
1774
- },
1775
- width: {
1776
- sm: "lg:max-w-sm",
1777
- md: "lg:max-w-md",
1778
- lg: "lg:max-w-lg",
1779
- xl: "lg:max-w-xl",
1780
- xxl: "lg:max-w-2xl",
1781
- "3xl": "lg:max-w-3xl",
1782
- "4xl": "lg:max-w-4xl",
1783
- "5xl": "lg:max-w-5xl",
1784
- "6xl": "lg:max-w-6xl",
1785
- "7xl": "lg:max-w-7xl",
1786
- full: "lg:max-w-5/6",
1787
- auto: "lg:w-auto"
1788
- },
1789
- height: {
1790
- auto: "lg:h-auto lg:max-h-[95vh]",
1791
- sm: "lg:h-[40vh]",
1792
- md: "lg:h-[60vh]",
1793
- lg: "lg:h-[70vh]",
1794
- xl: "lg:h-[80vh]",
1795
- xxl: "lg:h-[95vh]",
1796
- full: "lg:h-[95vh]"
1797
- }
1798
- },
1799
- defaultVariants: {
1800
- variant: "default",
1801
- size: "xl",
1802
- width: "3xl",
1803
- height: "auto"
1804
- }
1805
- }
1806
- );
1807
- var CONTENT_ACTIONS_SELECTOR = '[data-najm-dialog-actions="content"], [data-najm-wizard-form="true"]';
1808
- function useContentOwnsActions() {
1809
- const [contentElement, setContentElement] = React66__default.useState(null);
1810
- const [contentOwnsActions, setContentOwnsActions] = React66__default.useState(false);
1811
- const contentElementRef = React66__default.useRef(null);
1812
- const handleContentElementRef = React66__default.useCallback((node) => {
1813
- if (contentElementRef.current === node) return;
1814
- contentElementRef.current = node;
1815
- setContentElement(node);
1816
- }, []);
1817
- React66__default.useLayoutEffect(() => {
1818
- if (!contentElement) {
1819
- setContentOwnsActions((current) => current ? false : current);
1820
- return;
1821
- }
1822
- const update = () => {
1823
- const next = !!contentElement.querySelector(CONTENT_ACTIONS_SELECTOR);
1824
- setContentOwnsActions((current) => current === next ? current : next);
1825
- };
1826
- update();
1827
- const observer = new MutationObserver(update);
1828
- observer.observe(contentElement, {
1829
- childList: true,
1830
- subtree: true,
1831
- attributes: true,
1832
- attributeFilter: ["data-najm-dialog-actions", "data-najm-wizard-form"]
1833
- });
1834
- return () => observer.disconnect();
1835
- }, [contentElement]);
1836
- return { contentOwnsActions, setContentElement: handleContentElementRef };
1837
- }
1838
- function shouldRenderDialogButtons(showButtons, actionMode = "auto", contentOwnsActions) {
1839
- if (!showButtons || actionMode === "content") return false;
1840
- if (actionMode === "auto" && contentOwnsActions) return false;
1841
- return true;
1842
- }
1843
- var windowHeaderSpacing = {
1844
- none: "px-3 py-2",
1845
- sm: "-mx-3 -mt-3 px-3 py-2",
1846
- md: "-mx-6 -mt-6 px-3 py-2",
1847
- lg: "-mx-8 -mt-8 px-3 py-2"
1848
- };
1849
- function DialogChrome({
1850
- pageHeader,
1851
- title,
1852
- description,
1853
- padding,
1854
- variant = "default",
1855
- headerClassName,
1856
- titleClassName,
1857
- descriptionClassName,
1858
- closeButtonClassName,
1859
- contentRef,
1860
- children
1861
- }) {
1862
- const resolvedPadding = useResponsivePadding(padding);
1863
- const noTitle = !title || title.trim() === "";
1864
- const noDescription = !description || description.trim() === "";
1865
- const noHeader = noTitle && noDescription;
1866
- const flush = resolvedPadding === "none";
1867
- return /* @__PURE__ */ jsxs(Fragment, { children: [
1868
- pageHeader ? /* @__PURE__ */ jsxs(Fragment, { children: [
1869
- /* @__PURE__ */ jsx(DialogTitle, { className: cn("sr-only", titleClassName), children: pageHeader.title || title || "Dialog" }),
1870
- (pageHeader.subtitle || description) && /* @__PURE__ */ jsx(DialogDescription, { className: cn("sr-only", descriptionClassName), children: pageHeader.subtitle || description }),
1871
- /* @__PURE__ */ jsx("div", { className: cn("shrink-0", headerClassName), children: /* @__PURE__ */ jsx(
1872
- NPageHeader,
1873
- {
1874
- ...pageHeader,
1875
- card: false,
1876
- actions: /* @__PURE__ */ jsxs(Fragment, { children: [
1877
- pageHeader.actions,
1878
- /* @__PURE__ */ jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { "aria-label": "Close", variant: "ghost", className: closeButtonClassName, children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) }) })
1879
- ] })
1880
- }
1881
- ) })
1882
- ] }) : variant === "window" ? /* @__PURE__ */ jsxs(
1883
- DialogHeader,
1884
- {
1885
- className: cn(
1886
- "flex-row items-center justify-between gap-3 border-b border-border bg-secondary text-start text-secondary-foreground",
1887
- windowHeaderSpacing[resolvedPadding],
1888
- headerClassName
1889
- ),
1890
- children: [
1891
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 space-y-1", children: [
1892
- /* @__PURE__ */ jsx(DialogTitle, { className: cn("truncate text-sm", noTitle && "sr-only", titleClassName), children: title || "Dialog" }),
1893
- /* @__PURE__ */ jsx(DialogDescription, { className: cn("text-xs", noDescription && "sr-only", descriptionClassName), children: description })
1894
- ] }),
1895
- /* @__PURE__ */ jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx(
1896
- IconButton,
1897
- {
1898
- "aria-label": "Close",
1899
- variant: "ghost",
1900
- size: "sm",
1901
- className: cn("border border-border bg-background text-foreground hover:bg-accent", closeButtonClassName),
1902
- children: /* @__PURE__ */ jsx(X, { className: "h-3.5 w-3.5" })
1903
- }
1904
- ) })
1905
- ]
1906
- }
1907
- ) : /* @__PURE__ */ jsxs(DialogHeader, { className: cn(noHeader && "sr-only", headerClassName), children: [
1908
- /* @__PURE__ */ jsx(DialogTitle, { className: cn(noTitle && "sr-only", titleClassName), children: title }),
1909
- /* @__PURE__ */ jsx(DialogDescription, { className: cn(noDescription && "sr-only", descriptionClassName), children: description })
1910
- ] }),
1911
- flush ? (
1912
- // Full-bleed content owns its own layout/scrolling; no outer scroll wrapper.
1913
- /* @__PURE__ */ jsx("div", { ref: contentRef, className: "flex min-h-0 flex-1 flex-col", children })
1914
- ) : /* @__PURE__ */ jsx(NajmScroll, { axis: "y", className: "flex-1 px-1 -mx-1", children: /* @__PURE__ */ jsx("div", { ref: contentRef, style: { display: "contents" }, children }) })
1915
- ] });
1916
- }
1917
- function DialogItem({ dialog, index, store }) {
1918
- if (dialog.render) {
1919
- return /* @__PURE__ */ jsx(Fragment, { children: dialog.render({
1920
- dialog,
1921
- index,
1922
- zIndex: 9990 + index,
1923
- close: (result) => store.getState().closeDialog(dialog.id, result),
1924
- confirm: (data) => store.getState().handlePrimaryClick(dialog.id, data),
1925
- cancel: (data) => store.getState().handleSecondaryClick(dialog.id, data),
1926
- onOpenChange: (open) => store.getState().handleOpenChange(dialog.id, open)
1927
- }) });
1928
- }
1929
- const {
1930
- id,
1931
- title,
1932
- description,
1933
- pageHeader,
1934
- padding,
1935
- children,
1936
- primaryButton,
1937
- secondaryButton,
1938
- showButtons,
1939
- size,
1940
- width,
1941
- height,
1942
- className,
1943
- headerClassName,
1944
- titleClassName,
1945
- descriptionClassName,
1946
- closeButtonClassName,
1947
- variant = "default",
1948
- actionMode = "auto"
1949
- } = dialog;
1950
- const { contentOwnsActions, setContentElement } = useContentOwnsActions();
1951
- const renderDialogButtons = shouldRenderDialogButtons(showButtons, actionMode, contentOwnsActions);
1952
- const handlePrimary = async (e) => {
1953
- const hasForm = !!primaryButton?.form;
1954
- if (!hasForm && e) e.preventDefault();
1955
- await store.getState().handlePrimaryClick(id);
1956
- };
1957
- const handleSecondary = async (e) => {
1958
- const hasForm = !!secondaryButton?.form;
1959
- if (!hasForm && e) e.preventDefault();
1960
- await store.getState().handleSecondaryClick(id);
1961
- };
1962
- return /* @__PURE__ */ jsx(Dialog, { open: true, onOpenChange: (open) => store.getState().handleOpenChange(id, open), children: /* @__PURE__ */ jsxs(
1963
- DialogContent,
1964
- {
1965
- "data-dialog-id": id,
1966
- "data-variant": variant,
1967
- padding,
1968
- hideClose: !!pageHeader || variant === "window",
1969
- className: cn(dialogVariants({ variant, size, width, height }), className),
1970
- style: { zIndex: 9990 + index },
1971
- children: [
1972
- /* @__PURE__ */ jsx(
1973
- DialogChrome,
1974
- {
1975
- pageHeader,
1976
- title,
1977
- description,
1978
- padding,
1979
- variant,
1980
- headerClassName,
1981
- titleClassName,
1982
- descriptionClassName,
1983
- closeButtonClassName,
1984
- contentRef: setContentElement,
1985
- children
1986
- }
1987
- ),
1988
- /* @__PURE__ */ jsxs(DialogFooter, { className: cn(!renderDialogButtons && "sr-only"), children: [
1989
- renderDialogButtons && secondaryButton && /* @__PURE__ */ jsx(
1990
- Button,
1991
- {
1992
- type: secondaryButton.form ? "submit" : "button",
1993
- "data-button-type": "secondary",
1994
- onClick: secondaryButton.form ? void 0 : handleSecondary,
1995
- disabled: secondaryButton.disabled || secondaryButton.loading || false,
1996
- variant: secondaryButton.variant || "outline",
1997
- leftIcon: secondaryButton.icon,
1998
- loading: secondaryButton.loading,
1999
- loadingText: secondaryButton.loadingText,
2000
- form: secondaryButton.form,
2001
- className: cn("w-auto", secondaryButton.className),
2002
- children: secondaryButton.text
2003
- }
2004
- ),
2005
- renderDialogButtons && primaryButton && /* @__PURE__ */ jsx(
2006
- Button,
2007
- {
2008
- type: primaryButton.form ? "submit" : "button",
2009
- "data-button-type": "primary",
2010
- onClick: primaryButton.form ? void 0 : handlePrimary,
2011
- disabled: primaryButton.disabled || primaryButton.loading || false,
2012
- variant: primaryButton.variant || "default",
2013
- leftIcon: primaryButton.icon,
2014
- loading: primaryButton.loading,
2015
- loadingText: primaryButton.loadingText,
2016
- form: primaryButton.form,
2017
- className: cn("w-auto", primaryButton.className),
2018
- children: primaryButton.text
2019
- }
2020
- )
2021
- ] })
2022
- ]
2023
- }
2024
- ) }, id);
2025
- }
2026
- function NMultiDialog({ store: storeProp }) {
2027
- const defaultStore2 = useDialogStore();
2028
- const store = storeProp ?? defaultStore2;
2029
- const dialogs = store((s) => s.dialogs);
2030
- return /* @__PURE__ */ jsx(Fragment, { children: dialogs.map((dialog, index) => /* @__PURE__ */ jsx(DialogItem, { dialog, index, store }, dialog.id)) });
2031
- }
2032
- var buildButtonConfig2 = (partial, defaults) => {
2033
- return { ...defaults, ...partial };
2034
- };
2035
- var isDirectDialogProps = (props) => {
2036
- return "trigger" in props || "open" in props || "defaultOpen" in props || "onOpenChange" in props || "title" in props || "description" in props || "children" in props || "primaryButton" in props || "secondaryButton" in props || "showButtons" in props || "size" in props || "width" in props || "height" in props || "className" in props || "headerClassName" in props || "titleClassName" in props || "descriptionClassName" in props || "closeButtonClassName" in props || "variant" in props || "pageHeader" in props || "padding" in props;
2037
- };
2038
- function NDirectDialog({
2039
- trigger,
2040
- open,
2041
- defaultOpen = false,
2042
- onOpenChange,
2043
- title,
2044
- description,
2045
- pageHeader,
2046
- padding,
2047
- children,
2048
- primaryButton,
2049
- secondaryButton,
2050
- showButtons = true,
2051
- size,
2052
- width,
2053
- height,
2054
- className,
2055
- headerClassName,
2056
- titleClassName,
2057
- descriptionClassName,
2058
- closeButtonClassName,
2059
- variant = "default",
2060
- actionMode = "auto",
2061
- closeOnPrimary = true,
2062
- closeOnSecondary = true
2063
- }) {
2064
- const slots = parseDirectDialogSlots(children);
2065
- const resolvedTitle = title ?? slots.header?.label ?? slots.header?.children;
2066
- const resolvedDescription = description ?? slots.description?.label ?? slots.description?.children;
2067
- const resolvedHeaderClassName = cn(slots.header?.className, headerClassName);
2068
- const resolvedTitleClassName = cn(slots.header?.titleClassName, titleClassName);
2069
- const resolvedDescriptionClassName = cn(slots.description?.className, descriptionClassName);
2070
- const [internalOpen, setInternalOpen] = React66__default.useState(defaultOpen);
2071
- const [primaryLoading, setPrimaryLoading] = React66__default.useState(false);
2072
- const isControlled = open !== void 0;
2073
- const currentOpen = isControlled ? open : internalOpen;
2074
- const setOpen = (nextOpen) => {
2075
- if (!isControlled) {
2076
- setInternalOpen(nextOpen);
2077
- }
2078
- onOpenChange?.(nextOpen);
2079
- };
2080
- const resolvedPrimaryButton = buildButtonConfig2(primaryButton ?? slots.primaryButton, {
2081
- text: "Confirm",
2082
- variant: "default",
2083
- loading: false,
2084
- disabled: false,
2085
- loadingText: "Processing..."
2086
- });
2087
- const resolvedSecondaryButton = buildButtonConfig2(secondaryButton ?? slots.secondaryButton, {
2088
- text: "Cancel",
2089
- variant: "outline",
2090
- loading: false,
2091
- disabled: false,
2092
- loadingText: "Processing..."
2093
- });
2094
- const isPrimaryLoading = primaryLoading || !!resolvedPrimaryButton.loading;
2095
- const { contentOwnsActions, setContentElement } = useContentOwnsActions();
2096
- const renderDialogButtons = shouldRenderDialogButtons(showButtons, actionMode, contentOwnsActions);
2097
- const handlePrimary = async (e) => {
2098
- const hasForm = !!resolvedPrimaryButton.form;
2099
- if (!hasForm && e) e.preventDefault();
2100
- if (resolvedPrimaryButton.onClick) {
2101
- setPrimaryLoading(true);
2102
- try {
2103
- await resolvedPrimaryButton.onClick();
2104
- } finally {
2105
- setPrimaryLoading(false);
2106
- }
2107
- }
2108
- if (closeOnPrimary) {
2109
- setOpen(false);
2110
- }
2111
- };
2112
- const handleSecondary = async (e) => {
2113
- const hasForm = !!resolvedSecondaryButton.form;
2114
- if (!hasForm && e) e.preventDefault();
2115
- if (resolvedSecondaryButton.onClick) {
2116
- await resolvedSecondaryButton.onClick();
2117
- }
2118
- if (closeOnSecondary) {
2119
- setOpen(false);
2120
- }
2121
- };
2122
- return /* @__PURE__ */ jsxs(Dialog, { open: currentOpen, onOpenChange: setOpen, children: [
2123
- trigger ? /* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: trigger }) : null,
2124
- /* @__PURE__ */ jsxs(
2125
- DialogContent,
2126
- {
2127
- "data-variant": variant,
2128
- padding,
2129
- hideClose: !!pageHeader || variant === "window",
2130
- className: cn(dialogVariants({ variant, size, width, height }), className),
2131
- children: [
2132
- /* @__PURE__ */ jsx(
2133
- DialogChrome,
2134
- {
2135
- pageHeader,
2136
- title: resolvedTitle,
2137
- description: resolvedDescription,
2138
- padding,
2139
- variant,
2140
- headerClassName: resolvedHeaderClassName,
2141
- titleClassName: resolvedTitleClassName,
2142
- descriptionClassName: resolvedDescriptionClassName,
2143
- closeButtonClassName,
2144
- contentRef: setContentElement,
2145
- children: slots.body
2146
- }
2147
- ),
2148
- /* @__PURE__ */ jsx(DialogFooter, { className: cn(!renderDialogButtons && "sr-only"), children: renderDialogButtons && /* @__PURE__ */ jsxs(Fragment, { children: [
2149
- /* @__PURE__ */ jsx(
2150
- Button,
2151
- {
2152
- type: resolvedSecondaryButton.form ? "submit" : "button",
2153
- "data-button-type": "secondary",
2154
- onClick: resolvedSecondaryButton.form ? void 0 : handleSecondary,
2155
- disabled: resolvedSecondaryButton.disabled || resolvedSecondaryButton.loading || false,
2156
- variant: resolvedSecondaryButton.variant || "outline",
2157
- leftIcon: resolvedSecondaryButton.icon,
2158
- loading: resolvedSecondaryButton.loading,
2159
- loadingText: resolvedSecondaryButton.loadingText,
2160
- form: resolvedSecondaryButton.form,
2161
- className: cn("w-auto", resolvedSecondaryButton.className),
2162
- children: resolvedSecondaryButton.text
2163
- }
2164
- ),
2165
- /* @__PURE__ */ jsx(
2166
- Button,
2167
- {
2168
- type: resolvedPrimaryButton.form ? "submit" : "button",
2169
- "data-button-type": "primary",
2170
- onClick: resolvedPrimaryButton.form ? void 0 : handlePrimary,
2171
- disabled: resolvedPrimaryButton.disabled || isPrimaryLoading || false,
2172
- variant: resolvedPrimaryButton.variant || "default",
2173
- leftIcon: resolvedPrimaryButton.icon,
2174
- loading: isPrimaryLoading,
2175
- loadingText: resolvedPrimaryButton.loadingText,
2176
- form: resolvedPrimaryButton.form,
2177
- className: cn("w-auto", resolvedPrimaryButton.className),
2178
- children: resolvedPrimaryButton.text
2179
- }
2180
- )
2181
- ] }) })
2182
- ]
2183
- }
2184
- )
2185
- ] });
2186
- }
2187
- function NDialog(props) {
2188
- if (isDirectDialogProps(props)) {
2189
- return /* @__PURE__ */ jsx(NDirectDialog, { ...props });
2190
- }
2191
- return /* @__PURE__ */ jsx(NMultiDialog, { ...props });
2192
- }
2193
- function NConfirmDialog({
2194
- open,
2195
- onOpenChange,
2196
- title = "Are you sure?",
2197
- description,
2198
- confirmLabel = "Confirm",
2199
- cancelLabel = "Cancel",
2200
- onConfirm,
2201
- variant = "default",
2202
- loading = false,
2203
- children,
2204
- icon
2205
- }) {
2206
- const isDestructive = variant === "destructive";
2207
- const resolvedIcon = icon ?? (isDestructive ? "alert-triangle" : "circle-help");
2208
- return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: (value) => {
2209
- if (!value && loading) return;
2210
- onOpenChange(value);
2211
- }, children: /* @__PURE__ */ jsxs(DialogContent, { children: [
2212
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3 text-center pt-1", children: [
667
+ {
668
+ className: "w-8 h-8 rounded-md border border-border shrink-0",
669
+ style: { backgroundColor: value }
670
+ }
671
+ ),
672
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground font-mono truncate", children: value })
673
+ ]
674
+ }
675
+ ) }),
676
+ /* @__PURE__ */ jsxs(PopoverContent, { className: "w-64 flex flex-col gap-3", align: "start", children: [
2213
677
  /* @__PURE__ */ jsx(
2214
- "div",
678
+ HexColorPicker,
679
+ {
680
+ color: toPickerHex(
681
+ draft === value ? resolvedValue : resolvePickerColor(draft, themeContainer)
682
+ ),
683
+ onChange: handlePickerChange,
684
+ style: { width: "100%" }
685
+ }
686
+ ),
687
+ formats.length > 1 && /* @__PURE__ */ jsx("div", { className: "flex gap-1 rounded-md bg-muted p-1", children: formats.map((fmt) => /* @__PURE__ */ jsx(
688
+ "button",
2215
689
  {
690
+ type: "button",
691
+ onClick: () => handleTabChange(fmt),
2216
692
  className: cn(
2217
- "flex size-16 items-center justify-center rounded-full",
2218
- isDestructive ? "bg-destructive/10 text-destructive" : "bg-primary/10 text-primary"
693
+ "flex-1 rounded-sm px-1.5 py-1 text-xs font-medium uppercase cursor-pointer transition-colors",
694
+ activeFormat === fmt ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
2219
695
  ),
2220
- children: /* @__PURE__ */ jsx(NIcon, { icon: resolvedIcon, className: "size-8" })
696
+ children: fmt
697
+ },
698
+ fmt
699
+ )) }),
700
+ /* @__PURE__ */ jsx(
701
+ "input",
702
+ {
703
+ type: "text",
704
+ value: draft,
705
+ onChange: (e) => handleTextChange(e.target.value),
706
+ spellCheck: false,
707
+ className: "w-full rounded-md border border-border bg-background px-2 py-1.5 text-sm font-mono outline-none focus-visible:ring-2 focus-visible:ring-ring"
2221
708
  }
2222
709
  ),
2223
- /* @__PURE__ */ jsxs(DialogHeader, { className: "text-center sm:text-center", children: [
2224
- /* @__PURE__ */ jsx(DialogTitle, { className: isDestructive ? "text-destructive" : "", children: title }),
2225
- description && /* @__PURE__ */ jsx(DialogDescription, { children: description })
2226
- ] })
2227
- ] }),
2228
- children,
2229
- /* @__PURE__ */ jsxs(DialogFooter, { children: [
2230
- /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: () => onOpenChange(false), disabled: loading, children: cancelLabel }),
2231
- /* @__PURE__ */ jsx(Button, { variant: isDestructive ? "destructive" : "default", onClick: onConfirm, disabled: loading, children: loading ? "Processing..." : confirmLabel })
710
+ !hideSwatches && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5", children: colors.map((color) => /* @__PURE__ */ jsx(
711
+ "button",
712
+ {
713
+ type: "button",
714
+ onClick: () => handlePreset(color),
715
+ className: cn(
716
+ "w-5 h-5 rounded-md border border-border transition-transform hover:scale-110 cursor-pointer"
717
+ ),
718
+ style: { backgroundColor: color },
719
+ title: color
720
+ },
721
+ color
722
+ )) })
2232
723
  ] })
2233
- ] }) });
724
+ ] });
2234
725
  }
2235
- function NDeleteDialogContent({
2236
- title = "Delete",
2237
- itemName,
2238
- itemType,
2239
- icon: Icon2 = "trash-2",
2240
- warningText = "Are you sure you want to delete?",
2241
- className
726
+ var sizeClasses = {
727
+ sm: "p-0.5 [&_button]:h-6 [&_button]:px-1.5 [&_button]:text-xs",
728
+ md: "p-0.5 [&_button]:h-7 [&_button]:px-2 [&_button]:text-sm"
729
+ };
730
+ function SegmentedControl({
731
+ value,
732
+ onChange,
733
+ options,
734
+ ariaLabel,
735
+ className,
736
+ size = "md",
737
+ disabled = false
2242
738
  }) {
2243
- return /* @__PURE__ */ jsx("form", { id: "najm-delete-form", onSubmit: (e) => e.preventDefault(), children: /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col items-center text-center", className), children: [
2244
- /* @__PURE__ */ jsx("div", { className: "mb-6 flex size-16 items-center justify-center rounded-[20px] bg-destructive/10 text-destructive dark:bg-[#5a1822] dark:text-white", children: /* @__PURE__ */ jsx(NIcon, { icon: Icon2, className: "size-7" }) }),
2245
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2246
- /* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold leading-none text-card-foreground dark:text-white", children: title }),
2247
- /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
2248
- /* @__PURE__ */ jsx("p", { className: "text-sm font-medium leading-5 text-muted-foreground dark:text-[#aab4c2]", children: warningText }),
2249
- /* @__PURE__ */ jsxs("p", { className: "mx-auto max-w-[280px] break-words text-center text-sm font-bold leading-5 text-card-foreground dark:text-white", children: [
2250
- '"',
2251
- itemName,
2252
- '"',
2253
- itemType ? /* @__PURE__ */ jsxs(Fragment, { children: [
2254
- " (",
2255
- itemType,
2256
- ")"
2257
- ] }) : null
2258
- ] })
2259
- ] })
2260
- ] })
2261
- ] }) });
739
+ return /* @__PURE__ */ jsx(
740
+ "div",
741
+ {
742
+ role: "radiogroup",
743
+ "aria-label": ariaLabel,
744
+ "data-disabled": disabled ? "" : void 0,
745
+ className: cn(
746
+ "inline-flex items-center rounded-lg bg-muted",
747
+ sizeClasses[size],
748
+ className
749
+ ),
750
+ children: options.map((opt) => {
751
+ const selected = opt.value === value;
752
+ return /* @__PURE__ */ jsxs(
753
+ "button",
754
+ {
755
+ type: "button",
756
+ role: "radio",
757
+ "aria-checked": selected,
758
+ "aria-label": opt.ariaLabel ?? (typeof opt.label === "string" ? opt.label : void 0),
759
+ disabled,
760
+ "aria-disabled": disabled || void 0,
761
+ onClick: () => onChange(opt.value),
762
+ className: cn(
763
+ "inline-flex items-center justify-center gap-1.5 rounded-md font-medium transition-colors",
764
+ "outline-none focus-visible:ring-2 focus-visible:ring-ring",
765
+ "disabled:pointer-events-none disabled:opacity-50",
766
+ selected ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
767
+ ),
768
+ children: [
769
+ opt.icon && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: opt.icon }),
770
+ opt.label
771
+ ]
772
+ },
773
+ opt.value
774
+ );
775
+ })
776
+ }
777
+ );
778
+ }
779
+ function Collapsible({ ...props }) {
780
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
781
+ }
782
+ function CollapsibleTrigger2({
783
+ className,
784
+ ...props
785
+ }) {
786
+ return /* @__PURE__ */ jsx(
787
+ CollapsiblePrimitive.CollapsibleTrigger,
788
+ {
789
+ "data-slot": "collapsible-trigger",
790
+ className: cn(focusRingClasses, className),
791
+ ...props
792
+ }
793
+ );
794
+ }
795
+ function CollapsibleContent2({ ...props }) {
796
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.CollapsibleContent, { "data-slot": "collapsible-content", ...props });
2262
797
  }
2263
- function NDeleteDialog({
2264
- open = true,
2265
- title = "Delete",
798
+ function CustomizerField({
799
+ label,
2266
800
  description,
2267
- itemName,
2268
- itemType,
2269
- icon,
2270
- warningText,
2271
- confirmText = "Confirm",
2272
- cancelText = "Cancel",
2273
- loading,
2274
- zIndex,
801
+ htmlFor,
2275
802
  className,
2276
- contentClassName,
2277
- onOpenChange,
2278
- onConfirm,
2279
- onCancel
803
+ layout = "stacked",
804
+ onReset,
805
+ resetLabel,
806
+ resetAriaLabel,
807
+ disabled,
808
+ children
2280
809
  }) {
2281
- return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(
2282
- DialogContent,
810
+ return /* @__PURE__ */ jsxs(
811
+ "div",
2283
812
  {
2284
813
  className: cn(
2285
- "h-auto max-w-[380px] gap-0 rounded-[18px] border border-border bg-card p-6 pt-8 shadow-2xl dark:border-0 dark:bg-[#222b38]",
2286
- "[&>button]:end-4 [&>button]:top-4 [&>button]:flex [&>button]:size-6 [&>button]:items-center [&>button]:justify-center",
2287
- "[&>button]:rounded-full [&>button]:bg-muted [&>button]:text-muted-foreground [&>button]:opacity-100 [&>button]:ring-offset-0",
2288
- "[&>button]:hover:bg-secondary [&>button]:hover:text-foreground dark:[&>button]:bg-[#4d5a6d] dark:[&>button]:text-white dark:[&>button]:hover:bg-[#647186] dark:[&>button]:hover:text-white",
814
+ "flex gap-1.5",
815
+ layout === "inline-start" ? "flex-row items-center gap-2" : "flex-col",
2289
816
  className
2290
817
  ),
2291
- style: { zIndex },
2292
818
  children: [
2293
- /* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
2294
- /* @__PURE__ */ jsx(DialogTitle, { children: title }),
2295
- /* @__PURE__ */ jsx(DialogDescription, { children: description })
2296
- ] }),
2297
- /* @__PURE__ */ jsx(
2298
- NDeleteDialogContent,
819
+ /* @__PURE__ */ jsxs(
820
+ "div",
2299
821
  {
2300
- title,
2301
- itemName,
2302
- itemType,
2303
- icon,
2304
- warningText,
2305
- className: contentClassName
822
+ className: cn(
823
+ "flex items-center gap-2",
824
+ layout === "inline-start" ? "w-28 shrink-0 justify-start" : "justify-between"
825
+ ),
826
+ children: [
827
+ /* @__PURE__ */ jsx(
828
+ "label",
829
+ {
830
+ htmlFor,
831
+ className: cn(
832
+ "min-w-0 text-xs font-medium text-muted-foreground",
833
+ layout === "inline-start" && "truncate text-start"
834
+ ),
835
+ title: typeof label === "string" || typeof label === "number" ? String(label) : void 0,
836
+ children: label
837
+ }
838
+ ),
839
+ onReset ? /* @__PURE__ */ jsx(
840
+ ResetButton,
841
+ {
842
+ onClick: onReset,
843
+ "aria-label": typeof resetAriaLabel === "string" || typeof resetAriaLabel === "number" ? String(resetAriaLabel) : typeof resetLabel === "string" || typeof resetLabel === "number" ? String(resetLabel) : "Reset field",
844
+ title: typeof resetLabel === "string" || typeof resetLabel === "number" ? String(resetLabel) : "Reset",
845
+ disabled
846
+ }
847
+ ) : null
848
+ ]
2306
849
  }
2307
850
  ),
2308
- /* @__PURE__ */ jsxs(DialogFooter, { className: "mt-6 grid grid-cols-2 gap-3 sm:grid-cols-2", children: [
2309
- /* @__PURE__ */ jsx(
2310
- Button,
2311
- {
2312
- type: "button",
2313
- "data-button-type": "secondary",
2314
- variant: "outline",
2315
- onClick: onCancel,
2316
- disabled: loading,
2317
- className: "h-10 w-full rounded-[10px] border border-destructive bg-transparent text-sm font-bold text-card-foreground shadow-none hover:bg-transparent hover:text-card-foreground dark:border-destructive dark:bg-transparent dark:text-white dark:hover:bg-transparent dark:hover:text-white",
2318
- children: cancelText
2319
- }
2320
- ),
2321
- /* @__PURE__ */ jsx(
2322
- Button,
2323
- {
2324
- type: "button",
2325
- "data-button-type": "primary",
2326
- variant: "destructive",
2327
- onClick: onConfirm,
2328
- loading,
2329
- className: "h-10 w-full rounded-[10px] bg-destructive text-sm font-bold text-destructive-foreground shadow-none hover:bg-destructive/90 focus-visible:ring-destructive/40 dark:bg-[#dc4d61] dark:text-white dark:hover:bg-[#e15f70] dark:focus-visible:ring-[#dc4d61]/40",
2330
- children: confirmText
2331
- }
2332
- )
2333
- ] })
851
+ /* @__PURE__ */ jsx("div", { className: cn(layout === "inline-start" && "min-w-0 flex-1"), children }),
852
+ description ? /* @__PURE__ */ jsx("p", { className: "text-[11px] leading-snug text-muted-foreground/80", children: description }) : null
2334
853
  ]
2335
854
  }
2336
- ) });
855
+ );
2337
856
  }
2338
- function useDialog(store) {
2339
- const resolvedStore = store ?? useDialogStore();
2340
- const custom = async (options) => {
2341
- try {
2342
- return await resolvedStore.getState().pushDialog(options);
2343
- } catch (error) {
2344
- console.error("[useDialog] Failed to push dialog:", error);
2345
- return null;
2346
- }
2347
- };
2348
- const confirmDelete = async (options) => {
2349
- try {
2350
- return await resolvedStore.getState().pushDialog({
2351
- title: options.title || "Delete",
2352
- description: options.description,
2353
- size: options.size || "sm",
2354
- className: options.className,
2355
- render: ({ dialog, zIndex, confirm, cancel, onOpenChange }) => React66__default.createElement(NDeleteDialog, {
2356
- itemName: options.itemName,
2357
- itemType: options.itemType,
2358
- icon: options.icon,
2359
- warningText: options.warningText,
2360
- title: dialog.title,
2361
- description: dialog.description,
2362
- confirmText: dialog.primaryButton?.text,
2363
- cancelText: dialog.secondaryButton?.text,
2364
- loading: dialog.primaryButton?.loading,
2365
- className: dialog.className,
2366
- zIndex,
2367
- onOpenChange,
2368
- onConfirm: () => confirm(),
2369
- onCancel: () => cancel()
2370
- }),
2371
- primaryButton: {
2372
- text: options.confirmText || "Confirm",
2373
- variant: "destructive",
2374
- loading: options.loading,
2375
- onClick: options.onConfirm
2376
- },
2377
- secondaryButton: {
2378
- text: options.cancelText || "Cancel",
2379
- variant: "outline"
2380
- },
2381
- showButtons: true
2382
- });
2383
- } catch (error) {
2384
- console.error("[useDialog] Failed to show confirmDelete:", error);
2385
- return null;
857
+ function ResetButton({
858
+ onClick,
859
+ disabled,
860
+ className,
861
+ ...rest
862
+ }) {
863
+ return /* @__PURE__ */ jsx(
864
+ NButton,
865
+ {
866
+ type: "button",
867
+ variant: "ghost",
868
+ size: "icon-xs",
869
+ onClick,
870
+ disabled,
871
+ "aria-disabled": disabled,
872
+ className: cn("text-muted-foreground hover:text-foreground", className),
873
+ ...rest,
874
+ children: /* @__PURE__ */ jsx(RotateCcw, { className: "size-3" })
2386
875
  }
2387
- };
2388
- return {
2389
- custom,
2390
- openDialog: custom,
2391
- confirmDelete,
2392
- closeAll: () => resolvedStore.getState().closeAllDialogs(),
2393
- push: (opts) => resolvedStore.getState().pushDialog(opts),
2394
- pop: (result) => resolvedStore.getState().popDialog(result)
2395
- };
876
+ );
2396
877
  }
2397
878
  function Command({ className, ...props }) {
2398
879
  return /* @__PURE__ */ jsx(Command$1, { "data-slot": "command", className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className), ...props });
@@ -2646,8 +1127,8 @@ function resolveIcon(icon) {
2646
1127
  }
2647
1128
  var MultiSelectInput = ({ ariaLabel, placeholder = "Select items...", value = [], onChange, icon, showIcon = true, iconColor, items, className = "", variant = "default", status = "default", bordered, borderColor, disabled = false, searchPlaceholder = "Search...", emptyMessage = "No items found.", maxDisplay = 3, showSearch = true }) => {
2648
1129
  const [open, setOpen] = useState(false);
2649
- const triggerRef = React66__default.useRef(null);
2650
- const pointerDismissedRef = React66__default.useRef(false);
1130
+ const triggerRef = React54__default.useRef(null);
1131
+ const pointerDismissedRef = React54__default.useRef(false);
2651
1132
  const shouldDisplayIcon = Boolean(icon) && showIcon && value.length === 0;
2652
1133
  const iconProps = getIconColorProps(iconColor, "h-4 w-4");
2653
1134
  const handleSelect = (itemValue) => {
@@ -2763,7 +1244,7 @@ function SelectScrollDownButton({ className, ...props }) {
2763
1244
  return /* @__PURE__ */ jsx(SelectPrimitive.ScrollDownButton, { "data-slot": "select-scroll-down-button", className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" }) });
2764
1245
  }
2765
1246
  function SelectContent({ className, children, position = "popper", style, ...props }) {
2766
- const container = React66.useContext(NajmThemeContainerCtx);
1247
+ const container = React54.useContext(NajmThemeContainerCtx);
2767
1248
  const recipe = useNajmComponentStyle("select");
2768
1249
  const contentSlot = recipe?.slots?.content;
2769
1250
  const borderWidth = contentSlot?.borderWidth ?? recipe?.borderWidth;
@@ -2846,9 +1327,9 @@ var SelectInput = ({ placeholder = "", ariaLabel, value, onChange, icon, showIco
2846
1327
  (item) => typeof item === "string" ? item === value : item.value === value
2847
1328
  );
2848
1329
  const displayLabel = typeof found === "string" ? found : found?.label ?? value;
2849
- const [open, setOpen] = React66__default.useState(false);
2850
- const triggerRef = React66__default.useRef(null);
2851
- const pointerDismissedRef = React66__default.useRef(false);
1330
+ const [open, setOpen] = React54__default.useState(false);
1331
+ const triggerRef = React54__default.useRef(null);
1332
+ const pointerDismissedRef = React54__default.useRef(false);
2852
1333
  return /* @__PURE__ */ jsxs("div", { className: cn("group relative", className), children: [
2853
1334
  /* @__PURE__ */ jsxs(
2854
1335
  BaseInput,
@@ -2906,23 +1387,6 @@ var SelectInput = ({ placeholder = "", ariaLabel, value, onChange, icon, showIco
2906
1387
  )
2907
1388
  ] });
2908
1389
  };
2909
- var Input = React66.forwardRef(function Input2({ className, type, ...props }, ref) {
2910
- return /* @__PURE__ */ jsx(
2911
- "input",
2912
- {
2913
- ref,
2914
- type,
2915
- "data-slot": "input",
2916
- className: cn(
2917
- "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input flex h-9 w-full min-w-0 rounded-md border bg-card px-3 py-1 text-base text-foreground shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
2918
- "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
2919
- "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
2920
- className
2921
- ),
2922
- ...props
2923
- }
2924
- );
2925
- });
2926
1390
  var TRACK = {
2927
1391
  xs: "h-3 w-5",
2928
1392
  sm: "h-4 w-7",
@@ -3717,7 +2181,7 @@ function CollapsibleSection({
3717
2181
  children,
3718
2182
  disabled
3719
2183
  }) {
3720
- const [open, setOpen] = React66.useState(true);
2184
+ const [open, setOpen] = React54.useState(true);
3721
2185
  const titleText = typeof title === "string" || typeof title === "number" ? String(title) : "Section";
3722
2186
  return /* @__PURE__ */ jsxs(
3723
2187
  Collapsible,
@@ -4036,7 +2500,7 @@ function TokenGroupSection({
4036
2500
  disabled,
4037
2501
  labels
4038
2502
  }) {
4039
- const [open, setOpen] = React66.useState(groupId === "surface" || groupId === "brand");
2503
+ const [open, setOpen] = React54.useState(groupId === "surface" || groupId === "brand");
4040
2504
  const labelText = typeof label === "string" || typeof label === "number" ? String(label) : "Group";
4041
2505
  return /* @__PURE__ */ jsxs(
4042
2506
  Collapsible,
@@ -4329,17 +2793,7 @@ function FontSelect({
4329
2793
  }
4330
2794
  );
4331
2795
  }
4332
- function Label2({ className, ...props }) {
4333
- return /* @__PURE__ */ jsx(
4334
- LabelPrimitive.Root,
4335
- {
4336
- "data-slot": "label",
4337
- className: cn("flex items-center gap-2 text-sm leading-none font-medium text-foreground select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
4338
- ...props
4339
- }
4340
- );
4341
- }
4342
- var TextInput = React66__default.forwardRef(({ value, onChange, placeholder = "", icon, showIcon = true, iconColor, className = "", variant = "default", status = "default", bordered, borderColor, disabled = false, ...props }, ref) => {
2796
+ var TextInput = React54__default.forwardRef(({ value, onChange, placeholder = "", icon, showIcon = true, iconColor, className = "", variant = "default", status = "default", bordered, borderColor, disabled = false, ...props }, ref) => {
4343
2797
  const shouldDisplayIcon = Boolean(icon) && showIcon;
4344
2798
  const iconProps = getIconColorProps(iconColor, "h-4 w-4");
4345
2799
  return /* @__PURE__ */ jsxs(BaseInput, { variant, status, bordered, borderColor, className: cn("gap-2", className), disabled, children: [
@@ -4348,7 +2802,7 @@ var TextInput = React66__default.forwardRef(({ value, onChange, placeholder = ""
4348
2802
  ] });
4349
2803
  });
4350
2804
  TextInput.displayName = "TextInput";
4351
- var NumberInput = React66__default.forwardRef(({ value, onChange, placeholder = "", icon, showIcon = true, iconColor, className = "", variant = "default", status = "default", bordered, borderColor, disabled = false, ...props }, ref) => {
2805
+ var NumberInput = React54__default.forwardRef(({ value, onChange, placeholder = "", icon, showIcon = true, iconColor, className = "", variant = "default", status = "default", bordered, borderColor, disabled = false, ...props }, ref) => {
4352
2806
  const shouldDisplayIcon = Boolean(icon) && showIcon;
4353
2807
  const iconProps = getIconColorProps(iconColor, "h-4 w-4");
4354
2808
  return /* @__PURE__ */ jsxs(BaseInput, { variant, status, bordered, borderColor, className: cn("gap-2", className), children: [
@@ -4357,7 +2811,7 @@ var NumberInput = React66__default.forwardRef(({ value, onChange, placeholder =
4357
2811
  ] });
4358
2812
  });
4359
2813
  NumberInput.displayName = "NumberInput";
4360
- var PasswordInput = React66__default.forwardRef(({ value, onChange, placeholder = "", icon, showIcon = true, iconColor, className = "", variant = "default", status = "default", bordered, borderColor, disabled = false, ...props }, ref) => {
2814
+ var PasswordInput = React54__default.forwardRef(({ value, onChange, placeholder = "", icon, showIcon = true, iconColor, className = "", variant = "default", status = "default", bordered, borderColor, disabled = false, ...props }, ref) => {
4361
2815
  const [showPassword, setShowPassword] = useState(false);
4362
2816
  const shouldDisplayIcon = Boolean(icon) && showIcon;
4363
2817
  const iconProps = getIconColorProps(iconColor, "h-4 w-4");
@@ -4372,7 +2826,7 @@ function normalizeCode(value, numeric, length) {
4372
2826
  const normalized = numeric ? value.replace(/\D/g, "") : value.replace(/\s/g, "");
4373
2827
  return normalized.slice(0, length);
4374
2828
  }
4375
- var OtpInput = React66__default.forwardRef(
2829
+ var OtpInput = React54__default.forwardRef(
4376
2830
  ({
4377
2831
  value,
4378
2832
  onChange,
@@ -4511,7 +2965,7 @@ var OtpInput = React66__default.forwardRef(
4511
2965
  }
4512
2966
  );
4513
2967
  OtpInput.displayName = "OtpInput";
4514
- var Textarea = React66.forwardRef(function Textarea2({ className, ...props }, ref) {
2968
+ var Textarea = React54.forwardRef(function Textarea2({ className, ...props }, ref) {
4515
2969
  return /* @__PURE__ */ jsx(
4516
2970
  "textarea",
4517
2971
  {
@@ -4528,7 +2982,7 @@ var Textarea = React66.forwardRef(function Textarea2({ className, ...props }, re
4528
2982
  var DEFAULT_ROWS = 3;
4529
2983
  var MIN_ROWS = 2;
4530
2984
  var REM_PER_ROW = 1.5;
4531
- var TextAreaInput = React66__default.forwardRef(({ value, onChange, placeholder = "", className = "", variant = "default", status = "default", bordered, borderColor, iconColor: _iconColor, rows, ...props }, ref) => {
2985
+ var TextAreaInput = React54__default.forwardRef(({ value, onChange, placeholder = "", className = "", variant = "default", status = "default", bordered, borderColor, iconColor: _iconColor, rows, ...props }, ref) => {
4532
2986
  const visibleRows = Math.max(rows ?? DEFAULT_ROWS, MIN_ROWS);
4533
2987
  const textareaMinHeight = `${visibleRows * REM_PER_ROW}rem`;
4534
2988
  return /* @__PURE__ */ jsx(
@@ -4558,8 +3012,8 @@ var TextAreaInput = React66__default.forwardRef(({ value, onChange, placeholder
4558
3012
  TextAreaInput.displayName = "TextAreaInput";
4559
3013
  var ComboboxInput = ({ placeholder = "Select...", searchPlaceholder = "Search...", emptyMessage = "No results found.", loading = false, loadingMessage = "Loading...", onSearchChange, shouldFilter = true, value, onChange, icon, showIcon = true, iconColor, items = [], className = "", variant = "default", status = "default", bordered, borderColor, disabled = false, allowFreeText = false, ariaLabel }) => {
4560
3014
  const [open, setOpen] = useState(false);
4561
- const triggerRef = React66__default.useRef(null);
4562
- const pointerDismissedRef = React66__default.useRef(false);
3015
+ const triggerRef = React54__default.useRef(null);
3016
+ const pointerDismissedRef = React54__default.useRef(false);
4563
3017
  const [query, setQuery] = useState("");
4564
3018
  const normalizedItems = items.map((item) => typeof item === "string" ? { value: item, label: item } : item);
4565
3019
  const selectedItem = normalizedItems.find((item) => item.value === value);
@@ -4736,14 +3190,14 @@ var RadioGroupInput = ({ value, onChange, className = "", variant = "default", s
4736
3190
  const itemLabel = typeof item === "string" ? item : item.label;
4737
3191
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center space-y-0", children: [
4738
3192
  /* @__PURE__ */ jsx(RadioGroupItem, { value: itemValue }),
4739
- /* @__PURE__ */ jsx(Label2, { className: "text-sm font-normal peer-disabled:opacity-70 ml-1", children: itemLabel })
3193
+ /* @__PURE__ */ jsx(Label, { className: "text-sm font-normal peer-disabled:opacity-70 ml-1", children: itemLabel })
4740
3194
  ] }, itemValue);
4741
3195
  }) }) });
4742
3196
  var CheckboxInput = ({ value, onChange, helper, label, checkboxClassName, className, variant = "default", status = "default", bordered, borderColor }) => /* @__PURE__ */ jsxs(BaseInput, { variant, status, bordered, borderColor, className: cn("flex gap-2 items-center", className), children: [
4743
3197
  /* @__PURE__ */ jsx(Checkbox, { checked: value, onCheckedChange: onChange, className: cn("cursor-pointer transition-colors duration-200 border-primary", checkboxClassName) }),
4744
3198
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
4745
- /* @__PURE__ */ jsx(Label2, { className: "cursor-pointer text-muted-foreground", onClick: () => onChange(!value), children: label }),
4746
- helper && /* @__PURE__ */ jsx(Label2, { className: "text-xs text-muted-foreground", children: helper })
3199
+ /* @__PURE__ */ jsx(Label, { className: "cursor-pointer text-muted-foreground", onClick: () => onChange(!value), children: label }),
3200
+ helper && /* @__PURE__ */ jsx(Label, { className: "text-xs text-muted-foreground", children: helper })
4747
3201
  ] })
4748
3202
  ] });
4749
3203
  var layoutVariants2 = cva("flex items-start", {
@@ -4790,11 +3244,11 @@ function CheckboxGroupInput({
4790
3244
  }
4791
3245
  var SwitchInput = ({ value, onChange, label = "", helper, className = "", variant = "default", status = "default", bordered, borderColor, icon, showIcon = true, iconPosition = "label", iconColor }) => /* @__PURE__ */ jsxs(BaseInput, { variant, status, bordered, borderColor, className: cn("gap-2 justify-between items-center", className), children: [
4792
3246
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
4793
- /* @__PURE__ */ jsxs(Label2, { className: "flex items-center gap-2", children: [
3247
+ /* @__PURE__ */ jsxs(Label, { className: "flex items-center gap-2", children: [
4794
3248
  iconPosition === "label" && icon && showIcon && /* @__PURE__ */ jsx("span", { className: "w-4 h-4", children: resolveIcon(icon) }),
4795
3249
  label
4796
3250
  ] }),
4797
- helper && /* @__PURE__ */ jsx(Label2, { className: "text-xs text-muted-foreground", children: helper })
3251
+ helper && /* @__PURE__ */ jsx(Label, { className: "text-xs text-muted-foreground", children: helper })
4798
3252
  ] }),
4799
3253
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
4800
3254
  iconPosition === "input" && icon && showIcon && /* @__PURE__ */ jsx("span", { className: "w-4 h-4", children: resolveIcon(icon) }),
@@ -4877,9 +3331,9 @@ var FileInput = ({ value, onChange, placeholder = "No file chosen", icon, showIc
4877
3331
  /* @__PURE__ */ jsx("input", { type: "file", ref: fileInputRef, onChange: (e) => onChange(e.target.files?.[0] || null), className: "hidden" }),
4878
3332
  /* @__PURE__ */ jsxs("div", { className: "bg-muted flex h-full items-center px-3", children: [
4879
3333
  showIcon && (icon ? /* @__PURE__ */ jsx("span", { className: iconProps.className, style: iconProps.style, children: resolveIcon(icon) }) : /* @__PURE__ */ jsx(FileUp, { className: cn(iconProps.className) })),
4880
- /* @__PURE__ */ jsx(Label2, { className: "flex cursor-pointer h-full justify-center items-center px-2 text-muted-foreground", children: "Choose File" })
3334
+ /* @__PURE__ */ jsx(Label, { className: "flex cursor-pointer h-full justify-center items-center px-2 text-muted-foreground", children: "Choose File" })
4881
3335
  ] }),
4882
- /* @__PURE__ */ jsx(Label2, { className: "ml-2 flex-1 text-foreground", children: displayFilename() || /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: placeholder }) })
3336
+ /* @__PURE__ */ jsx(Label, { className: "ml-2 flex-1 text-foreground", children: displayFilename() || /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: placeholder }) })
4883
3337
  ] });
4884
3338
  };
4885
3339
  var colorTrackMap = {
@@ -6005,7 +4459,7 @@ function DropdownMenuSubContent({ className, children, style, ...props }) {
6005
4459
  );
6006
4460
  }
6007
4461
  function DropdownMenuContent({ className, children, sideOffset = 4, style, ...props }) {
6008
- const container = React66.useContext(NajmThemeContainerCtx);
4462
+ const container = React54.useContext(NajmThemeContainerCtx);
6009
4463
  const surface = useDropdownSurfaceRecipe("content");
6010
4464
  const { hostRef, viewportRef } = useNajmScrollViewport();
6011
4465
  useNajmPortalLayerStyles();
@@ -6210,7 +4664,7 @@ function PhoneInput({
6210
4664
  }
6211
4665
  ) });
6212
4666
  }
6213
- var TimeInput = React66__default.forwardRef(({ value = "", onChange, placeholder = "", icon, showIcon = true, iconColor, className = "", variant = "default", status = "default", bordered, borderColor, format24 = true, showSeconds = false, disabled = false, onBlur, ...props }, ref) => {
4667
+ var TimeInput = React54__default.forwardRef(({ value = "", onChange, placeholder = "", icon, showIcon = true, iconColor, className = "", variant = "default", status = "default", bordered, borderColor, format24 = true, showSeconds = false, disabled = false, onBlur, ...props }, ref) => {
6214
4668
  const [inputValue, setInputValue] = useState(value);
6215
4669
  const [isValid, setIsValid] = useState(true);
6216
4670
  useEffect(() => {
@@ -6387,8 +4841,8 @@ function NSlider({
6387
4841
  return Array.isArray(v) ? [...v] : [v];
6388
4842
  };
6389
4843
  const initialRadix = toRadix(controlledValue ?? defaultValue);
6390
- const [internalValues, setInternalValues] = React66.useState(initialRadix);
6391
- const [active, setActive] = React66.useState(null);
4844
+ const [internalValues, setInternalValues] = React54.useState(initialRadix);
4845
+ const [active, setActive] = React54.useState(null);
6392
4846
  const currentValues = controlledValue !== void 0 ? toRadix(controlledValue) : internalValues;
6393
4847
  const handleRadix = (arr) => {
6394
4848
  setInternalValues(arr);
@@ -6545,13 +4999,13 @@ function NThemePresets({
6545
4999
  disabled = false,
6546
5000
  className
6547
5001
  }) {
6548
- const [saveOpen, setSaveOpen] = React66.useState(false);
6549
- const [name, setName] = React66.useState("");
6550
- const [pendingDelete, setPendingDelete] = React66.useState(
5002
+ const [saveOpen, setSaveOpen] = React54.useState(false);
5003
+ const [name, setName] = React54.useState("");
5004
+ const [pendingDelete, setPendingDelete] = React54.useState(
6551
5005
  null
6552
5006
  );
6553
- const [busy, setBusy] = React66.useState(false);
6554
- const rows = React66.useMemo(
5007
+ const [busy, setBusy] = React54.useState(false);
5008
+ const rows = React54.useMemo(
6555
5009
  () => [
6556
5010
  ...savedDesign ? [
6557
5011
  {
@@ -6612,7 +5066,7 @@ function NThemePresets({
6612
5066
  className
6613
5067
  ),
6614
5068
  children: [
6615
- /* @__PURE__ */ jsx(Label2, { className: "text-sm font-semibold text-foreground", children: labels.title }),
5069
+ /* @__PURE__ */ jsx(Label, { className: "text-sm font-semibold text-foreground", children: labels.title }),
6616
5070
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
6617
5071
  /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxs(
6618
5072
  Select,
@@ -6690,7 +5144,7 @@ function NThemePresets({
6690
5144
  cancelLabel: typeof labels.cancel === "string" ? labels.cancel : void 0,
6691
5145
  loading: busy,
6692
5146
  onConfirm: () => void handleSave(),
6693
- children: /* @__PURE__ */ jsxs(Label2, { className: "flex flex-col items-start gap-1.5", children: [
5147
+ children: /* @__PURE__ */ jsxs(Label, { className: "flex flex-col items-start gap-1.5", children: [
6694
5148
  /* @__PURE__ */ jsx("span", { children: labels.nameLabel }),
6695
5149
  /* @__PURE__ */ jsx(
6696
5150
  TextInput,
@@ -6803,12 +5257,12 @@ function NThemeCustomizer({
6803
5257
  }) {
6804
5258
  const inheritedMode = useNajmThemeMode();
6805
5259
  const resolvedPreviewMode = previewMode ?? inheritedMode ?? value.theme.mode ?? "light";
6806
- const visibleTabs = React66.useMemo(() => buildTabs(tabs), [tabs]);
5260
+ const visibleTabs = React54.useMemo(() => buildTabs(tabs), [tabs]);
6807
5261
  const firstTab = visibleTabs[0] ?? "theme";
6808
- const [activeTab, setActiveTab] = React66.useState(TAB_VALUE[firstTab]);
6809
- const [fileError, setFileError] = React66.useState(false);
6810
- const fileInputRef = React66.useRef(null);
6811
- React66.useEffect(() => {
5262
+ const [activeTab, setActiveTab] = React54.useState(TAB_VALUE[firstTab]);
5263
+ const [fileError, setFileError] = React54.useState(false);
5264
+ const fileInputRef = React54.useRef(null);
5265
+ React54.useEffect(() => {
6812
5266
  setActiveTab(TAB_VALUE[firstTab]);
6813
5267
  }, [firstTab]);
6814
5268
  const themeLabel = resolveLabel("themeTab", labels);
@@ -6820,7 +5274,7 @@ function NThemeCustomizer({
6820
5274
  const invalidThemeFileLabel = resolveLabel("invalidThemeFile", labels);
6821
5275
  const defaultOptionLabel = resolveLabel("defaultOption", labels);
6822
5276
  const colorSwatchFallbackLabel = resolveLabel("colorSwatchFallback", labels);
6823
- const tokenLabels = React66.useMemo(() => {
5277
+ const tokenLabels = React54.useMemo(() => {
6824
5278
  const out = {};
6825
5279
  const knownTokens = [
6826
5280
  "background",
@@ -7624,7 +6078,7 @@ function Alert({
7624
6078
  );
7625
6079
  }
7626
6080
  var NAlert = Alert;
7627
- var NativeSelect = React66.forwardRef(
6081
+ var NativeSelect = React54.forwardRef(
7628
6082
  ({ className, options, placeholder, value, ...props }, ref) => {
7629
6083
  const hasValue = value !== void 0 && value !== "";
7630
6084
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
@@ -7782,7 +6236,7 @@ function Avatar({
7782
6236
  ...props
7783
6237
  }) {
7784
6238
  const hasShortcut = src !== void 0 || fallback !== void 0;
7785
- const hasChildren = React66.Children.count(children) > 0;
6239
+ const hasChildren = React54.Children.count(children) > 0;
7786
6240
  return /* @__PURE__ */ jsxs(
7787
6241
  AvatarPrimitive.Root,
7788
6242
  {
@@ -7876,9 +6330,9 @@ function AvatarGroup({ ring = true, className, children, ...props }) {
7876
6330
  "data-slot": "avatar-group",
7877
6331
  className: cn("flex -space-x-2", className),
7878
6332
  ...props,
7879
- children: ring ? React66.Children.map(children, (child) => {
7880
- if (React66.isValidElement(child) && child.type === Avatar) {
7881
- return React66.cloneElement(child, { ring: true, ...child.props });
6333
+ children: ring ? React54.Children.map(children, (child) => {
6334
+ if (React54.isValidElement(child) && child.type === Avatar) {
6335
+ return React54.cloneElement(child, { ring: true, ...child.props });
7882
6336
  }
7883
6337
  return child;
7884
6338
  }) : children
@@ -7945,7 +6399,7 @@ function Swap({
7945
6399
  className,
7946
6400
  ...props
7947
6401
  }) {
7948
- const [internalChecked, setInternalChecked] = React66.useState(defaultChecked);
6402
+ const [internalChecked, setInternalChecked] = React54.useState(defaultChecked);
7949
6403
  const isControlled = controlledChecked !== void 0 || controlledState !== void 0;
7950
6404
  const currentState = getDerivedState(
7951
6405
  isControlled ? controlledChecked ?? false : internalChecked,
@@ -7953,7 +6407,7 @@ function Swap({
7953
6407
  );
7954
6408
  const dataState = currentState === "indeterminate" ? "indeterminate" : currentState ? "on" : "off";
7955
6409
  const ariaPressed = currentState === "indeterminate" ? "mixed" : currentState;
7956
- const handleClick = React66.useCallback((event) => {
6410
+ const handleClick = React54.useCallback((event) => {
7957
6411
  onClick?.(event);
7958
6412
  if (event.defaultPrevented) return;
7959
6413
  if (disabled) return;
@@ -8078,7 +6532,7 @@ var toneClasses = {
8078
6532
  ring: "border-primary/30"
8079
6533
  }
8080
6534
  };
8081
- var StatusPill = React66.forwardRef(
6535
+ var StatusPill = React54.forwardRef(
8082
6536
  ({ className, tone = "neutral", pulse = false, label, ...props }, ref) => {
8083
6537
  const c = toneClasses[tone];
8084
6538
  return /* @__PURE__ */ jsxs(
@@ -8136,41 +6590,6 @@ function Toaster({ toastOptions, ...props }) {
8136
6590
  }
8137
6591
  );
8138
6592
  }
8139
- var Form = FormProvider;
8140
- var FormFieldContext = React66.createContext({});
8141
- var FormField = ({ ...props }) => /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
8142
- var useFormField = () => {
8143
- const fieldContext = React66.useContext(FormFieldContext);
8144
- const itemContext = React66.useContext(FormItemContext);
8145
- const { getFieldState, formState } = useFormContext();
8146
- const fieldState = getFieldState(fieldContext.name, formState);
8147
- if (!fieldContext) throw new Error("useFormField should be used within <FormField>");
8148
- const { id } = itemContext;
8149
- return { id, name: fieldContext.name, formItemId: `${id}-form-item`, formDescriptionId: `${id}-form-item-description`, formMessageId: `${id}-form-item-message`, ...fieldState };
8150
- };
8151
- var FormItemContext = React66.createContext({});
8152
- function FormItem({ className, ...props }) {
8153
- const id = React66.useId();
8154
- return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { "data-slot": "form-item", className: cn("grid gap-2", className), ...props }) });
8155
- }
8156
- function FormLabel({ className, ...props }) {
8157
- const { error, formItemId } = useFormField();
8158
- return /* @__PURE__ */ jsx(Label2, { "data-slot": "form-label", "data-error": !!error, className: cn("data-[error=true]:text-destructive", className), htmlFor: formItemId, ...props });
8159
- }
8160
- function FormControl({ ...props }) {
8161
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
8162
- return /* @__PURE__ */ jsx(Slot, { "data-slot": "form-control", id: formItemId, "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`, "aria-invalid": !!error, ...props });
8163
- }
8164
- function FormDescription({ className, ...props }) {
8165
- const { formDescriptionId } = useFormField();
8166
- return /* @__PURE__ */ jsx("p", { "data-slot": "form-description", id: formDescriptionId, className: cn("text-muted-foreground text-[0.8rem]", className), ...props });
8167
- }
8168
- function FormMessage({ className, children, ...props }) {
8169
- const { error, formMessageId } = useFormField();
8170
- const body = error ? String(error?.message ?? "") : children;
8171
- if (!body) return null;
8172
- return /* @__PURE__ */ jsx("p", { "data-slot": "form-message", id: formMessageId, className: cn("text-destructive text-[0.8rem] font-medium", className), ...props, children: body });
8173
- }
8174
6593
  function Table({ className, ...props }) {
8175
6594
  return /* @__PURE__ */ jsx("div", { "data-slot": "table-container", className: "relative w-full", children: /* @__PURE__ */ jsx("table", { "data-slot": "table", className: cn("w-full caption-bottom text-sm text-foreground", className), ...props }) });
8176
6595
  }
@@ -8195,7 +6614,7 @@ function TableCell({ className, ...props }) {
8195
6614
  function TableCaption({ className, ...props }) {
8196
6615
  return /* @__PURE__ */ jsx("caption", { "data-slot": "table-caption", className: cn("text-muted-foreground mt-4 text-sm", className), ...props });
8197
6616
  }
8198
- var NErrorBoundary = class extends React66__default.Component {
6617
+ var NErrorBoundary = class extends React54__default.Component {
8199
6618
  constructor(props) {
8200
6619
  super(props);
8201
6620
  this.state = { hasError: false, error: null };
@@ -8376,9 +6795,9 @@ function NAvatar({
8376
6795
  loading: imageLoading,
8377
6796
  ...restImageProps
8378
6797
  } = imageProps ?? {};
8379
- const imageRef = React66__default.useRef(null);
6798
+ const imageRef = React54__default.useRef(null);
8380
6799
  const { markLoaded } = chain;
8381
- React66__default.useEffect(() => {
6800
+ React54__default.useEffect(() => {
8382
6801
  const element = imageRef.current;
8383
6802
  if (element?.complete && element.naturalWidth > 0) markLoaded();
8384
6803
  }, [chain.src, markLoaded]);
@@ -8533,8 +6952,8 @@ function NCard({
8533
6952
  let footerClassName;
8534
6953
  let mediaSlot = null;
8535
6954
  const mainChildren = [];
8536
- React66__default.Children.forEach(children, (child) => {
8537
- if (!React66__default.isValidElement(child)) {
6955
+ React54__default.Children.forEach(children, (child) => {
6956
+ if (!React54__default.isValidElement(child)) {
8538
6957
  mainChildren.push(child);
8539
6958
  return;
8540
6959
  }
@@ -8710,7 +7129,7 @@ function truncateByCharacters(text, maxCharacters, suffix = "...") {
8710
7129
  const str = String(text);
8711
7130
  return str.length <= maxCharacters ? str : str.slice(0, maxCharacters) + suffix;
8712
7131
  }
8713
- var CardDensityContext = React66__default.createContext("default");
7132
+ var CardDensityContext = React54__default.createContext("default");
8714
7133
  function NCardInfo({
8715
7134
  icon: Icon2,
8716
7135
  label,
@@ -8723,7 +7142,7 @@ function NCardInfo({
8723
7142
  className,
8724
7143
  ...props
8725
7144
  }) {
8726
- const inheritedDensity = React66__default.useContext(CardDensityContext);
7145
+ const inheritedDensity = React54__default.useContext(CardDensityContext);
8727
7146
  const resolvedDensity = density ?? inheritedDensity;
8728
7147
  const isTruncated = typeof value === "string" && value.length > maxChars;
8729
7148
  const displayValue = isTruncated ? truncateByCharacters(value, maxChars) : value;
@@ -8833,14 +7252,14 @@ function NSectionInfo({
8833
7252
  const displayValue = isTruncated ? truncateByCharacters(stringValue, maxChars) : value;
8834
7253
  return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", className), children: [
8835
7254
  Icon2 && /* @__PURE__ */ jsx(Icon2, { className: cn("w-4 h-4", iconColor) }),
8836
- /* @__PURE__ */ jsxs(Label2, { className: "text-sm text-muted-foreground", children: [
7255
+ /* @__PURE__ */ jsxs(Label, { className: "text-sm text-muted-foreground", children: [
8837
7256
  label,
8838
7257
  ":"
8839
7258
  ] }),
8840
7259
  isTruncated ? /* @__PURE__ */ jsxs(Tooltip, { children: [
8841
- /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Label2, { className: cn("text-sm cursor-help", valueColor), children: displayValue }) }),
7260
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Label, { className: cn("text-sm cursor-help", valueColor), children: displayValue }) }),
8842
7261
  /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { className: "max-w-xs", children: stringValue }) })
8843
- ] }) : /* @__PURE__ */ jsx(Label2, { className: cn("text-sm", valueColor), children: displayValue })
7262
+ ] }) : /* @__PURE__ */ jsx(Label, { className: cn("text-sm", valueColor), children: displayValue })
8844
7263
  ] });
8845
7264
  }
8846
7265
  function NSection({
@@ -8854,7 +7273,7 @@ function NSection({
8854
7273
  return /* @__PURE__ */ jsxs("div", { className: cn(background, "flex flex-col gap-1 rounded-lg p-4", className), children: [
8855
7274
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-3", children: [
8856
7275
  /* @__PURE__ */ jsx(Icon2, { className: cn("w-5 h-5", iconColor) }),
8857
- /* @__PURE__ */ jsx(Label2, { className: "text-base font-medium text-foreground", children: title })
7276
+ /* @__PURE__ */ jsx(Label, { className: "text-base font-medium text-foreground", children: title })
8858
7277
  ] }),
8859
7278
  /* @__PURE__ */ jsx("div", { className: "space-y-1", children })
8860
7279
  ] });
@@ -8943,10 +7362,10 @@ function NSectionHeaderRoot({
8943
7362
  );
8944
7363
  }
8945
7364
  function NSectionHeaderTitle({ children, className }) {
8946
- return /* @__PURE__ */ jsx(Label2, { className: cn("text-2xl font-bold text-foreground block", className), children });
7365
+ return /* @__PURE__ */ jsx(Label, { className: cn("text-2xl font-bold text-foreground block", className), children });
8947
7366
  }
8948
7367
  function NSectionHeaderSubtitle({ children, className }) {
8949
- return /* @__PURE__ */ jsx(Label2, { className: cn("text-muted-foreground block", className), children });
7368
+ return /* @__PURE__ */ jsx(Label, { className: cn("text-muted-foreground block", className), children });
8950
7369
  }
8951
7370
  function NSectionHeaderContent({ children, className }) {
8952
7371
  return /* @__PURE__ */ jsx("div", { className: cn("mt-3", className), children });
@@ -9907,13 +8326,13 @@ function NFilterBar({ children, className }) {
9907
8326
  function NRowActions({ children }) {
9908
8327
  return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", children });
9909
8328
  }
9910
- var variantClasses2 = {
8329
+ var variantClasses = {
9911
8330
  table: "px-4 pb-4 pt-0 sm:px-5 sm:pb-5",
9912
8331
  empty: "px-4 py-5 sm:px-5",
9913
8332
  stack: "px-4 py-4 space-y-4 sm:px-5"
9914
8333
  };
9915
8334
  function NViewBody({ children, className, variant = "table" }) {
9916
- return /* @__PURE__ */ jsx("div", { className: cn(variantClasses2[variant], className), children });
8335
+ return /* @__PURE__ */ jsx("div", { className: cn(variantClasses[variant], className), children });
9917
8336
  }
9918
8337
  function NContextMenu({ x, y, items, onAction, onClose, className }) {
9919
8338
  const [openSub, setOpenSub] = useState(null);
@@ -10015,7 +8434,7 @@ function NContextMenu({ x, y, items, onAction, onClose, className }) {
10015
8434
  children: items.map((item) => {
10016
8435
  const Icon2 = item.icon;
10017
8436
  const hasSub = !!item.submenu?.length;
10018
- return /* @__PURE__ */ jsxs(React66__default.Fragment, { children: [
8437
+ return /* @__PURE__ */ jsxs(React54__default.Fragment, { children: [
10019
8438
  item.separatorBefore && /* @__PURE__ */ jsx("div", { className: "my-1 border-t border-border/60" }),
10020
8439
  /* @__PURE__ */ jsxs(
10021
8440
  "div",
@@ -10449,11 +8868,11 @@ function NCredentialsCard({
10449
8868
  className,
10450
8869
  classNames
10451
8870
  }) {
10452
- const [status, setStatus] = React66.useState("idle");
10453
- const revertTimer = React66.useRef(null);
10454
- const mountedRef = React66.useRef(true);
10455
- const requestTokenRef = React66.useRef(0);
10456
- React66.useEffect(() => {
8871
+ const [status, setStatus] = React54.useState("idle");
8872
+ const revertTimer = React54.useRef(null);
8873
+ const mountedRef = React54.useRef(true);
8874
+ const requestTokenRef = React54.useRef(0);
8875
+ React54.useEffect(() => {
10457
8876
  mountedRef.current = true;
10458
8877
  return () => {
10459
8878
  mountedRef.current = false;
@@ -10461,14 +8880,14 @@ function NCredentialsCard({
10461
8880
  revertTimer.current = null;
10462
8881
  };
10463
8882
  }, []);
10464
- const scheduleRevert = React66.useCallback(() => {
8883
+ const scheduleRevert = React54.useCallback(() => {
10465
8884
  if (revertTimer.current) clearTimeout(revertTimer.current);
10466
8885
  revertTimer.current = setTimeout(() => {
10467
8886
  revertTimer.current = null;
10468
8887
  if (mountedRef.current) setStatus("idle");
10469
8888
  }, REVERT_MS);
10470
8889
  }, []);
10471
- const handleCopy = React66.useCallback(() => {
8890
+ const handleCopy = React54.useCallback(() => {
10472
8891
  if (status === "pending") return;
10473
8892
  if (revertTimer.current) {
10474
8893
  clearTimeout(revertTimer.current);
@@ -10708,19 +9127,19 @@ function Combobox({
10708
9127
  allowFreeText = false,
10709
9128
  disabled = false
10710
9129
  }) {
10711
- const [open, setOpen] = React66.useState(false);
10712
- const [query, setQuery] = React66.useState("");
10713
- const [highlight, setHighlight] = React66.useState(0);
10714
- const wrapperRef = React66.useRef(null);
10715
- const inputRef = React66.useRef(null);
10716
- const filtered = React66.useMemo(() => {
9130
+ const [open, setOpen] = React54.useState(false);
9131
+ const [query, setQuery] = React54.useState("");
9132
+ const [highlight, setHighlight] = React54.useState(0);
9133
+ const wrapperRef = React54.useRef(null);
9134
+ const inputRef = React54.useRef(null);
9135
+ const filtered = React54.useMemo(() => {
10717
9136
  const q = query.trim().toLowerCase();
10718
9137
  if (!q) return options;
10719
9138
  return options.filter(
10720
9139
  (opt) => opt.label.toLowerCase().includes(q) || opt.value.toLowerCase().includes(q)
10721
9140
  );
10722
9141
  }, [options, query]);
10723
- React66.useEffect(() => {
9142
+ React54.useEffect(() => {
10724
9143
  if (!open) return;
10725
9144
  const onClick = (e) => {
10726
9145
  if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
@@ -10731,7 +9150,7 @@ function Combobox({
10731
9150
  document.addEventListener("mousedown", onClick);
10732
9151
  return () => document.removeEventListener("mousedown", onClick);
10733
9152
  }, [open]);
10734
- React66.useEffect(() => {
9153
+ React54.useEffect(() => {
10735
9154
  if (open) {
10736
9155
  setHighlight(0);
10737
9156
  requestAnimationFrame(() => inputRef.current?.focus());
@@ -10739,7 +9158,7 @@ function Combobox({
10739
9158
  setQuery("");
10740
9159
  }
10741
9160
  }, [open]);
10742
- const selectedLabel = React66.useMemo(() => {
9161
+ const selectedLabel = React54.useMemo(() => {
10743
9162
  const match = options.find((o) => o.value === value);
10744
9163
  return match?.label ?? value;
10745
9164
  }, [options, value]);
@@ -10837,34 +9256,6 @@ function Combobox({
10837
9256
  ] })
10838
9257
  ] });
10839
9258
  }
10840
- var VARIANT_PRESETS = {
10841
- default: {
10842
- item: "flex flex-col w-full",
10843
- label: "text-foreground flex items-center gap-2",
10844
- input: "",
10845
- description: "",
10846
- error: ""
10847
- },
10848
- studio: {
10849
- item: "space-y-1.5 w-full",
10850
- label: "text-[11px] uppercase tracking-[0.16em] text-muted-foreground flex items-center gap-2",
10851
- input: "h-10 bg-card",
10852
- description: "text-xs text-muted-foreground",
10853
- error: "text-xs text-destructive"
10854
- },
10855
- compact: {
10856
- item: "flex flex-col w-full gap-1",
10857
- label: "text-xs text-foreground flex items-center gap-2",
10858
- input: "h-8 text-sm",
10859
- description: "text-xs",
10860
- error: "text-xs"
10861
- }
10862
- };
10863
- var VariantContext = createContext({ variant: "default" });
10864
- var VariantProvider = ({ variant = "default", bordered, children }) => /* @__PURE__ */ jsx(VariantContext.Provider, { value: { variant, bordered }, children });
10865
- var useVariant = () => useContext(VariantContext).variant;
10866
- var useBordered = () => useContext(VariantContext).bordered;
10867
- var useVariantPreset = () => VARIANT_PRESETS[useContext(VariantContext).variant];
10868
9259
  function NFormInner({ schema, defaultValues, onSubmit, form: externalForm, variant = "default", bordered, as = "form", className = "", id, devTools, children }) {
10869
9260
  const resolvedDevTools = useResolvedFormDevTools(schema, devTools);
10870
9261
  const resolver = useMemo(() => schema ? zodResolver(schema) : void 0, [schema]);
@@ -10923,14 +9314,11 @@ function NFormSectionHeader({
10923
9314
  ),
10924
9315
  children: [
10925
9316
  Icon2 && /* @__PURE__ */ jsx(Icon2, { className: "w-4 h-4 shrink-0 text-current" }),
10926
- /* @__PURE__ */ jsx(Label2, { className: "text-sm font-semibold leading-none text-current", children: title })
9317
+ /* @__PURE__ */ jsx(Label, { className: "text-sm font-semibold leading-none text-current", children: title })
10927
9318
  ]
10928
9319
  }
10929
9320
  );
10930
9321
  }
10931
- var PrefixContext = createContext(void 0);
10932
- var PrefixProvider = ({ prefix, children }) => /* @__PURE__ */ jsx(PrefixContext.Provider, { value: prefix, children });
10933
- var usePrefix = () => useContext(PrefixContext);
10934
9322
  var inputBackgroundClasses = {
10935
9323
  card: "!bg-card [&>div:first-child]:!bg-card",
10936
9324
  background: "!bg-background [&>div:first-child]:!bg-background",
@@ -11511,25 +9899,25 @@ function WizardForm({
11511
9899
  classNames
11512
9900
  }
11513
9901
  ),
11514
- /* @__PURE__ */ jsx(Form, { ...form, children: /* @__PURE__ */ jsx(VariantProvider, { variant, bordered, children: /* @__PURE__ */ jsxs(
9902
+ /* @__PURE__ */ jsx(Form, { ...form, children: /* @__PURE__ */ jsx(VariantProvider, { variant, bordered, children: /* @__PURE__ */ jsx(NajmScroll, { axis: "y", className: "min-h-0 flex-1", "data-najm-wizard-step-scroll": "true", children: /* @__PURE__ */ jsxs(
11515
9903
  "form",
11516
9904
  {
11517
9905
  id: `step-${currentStepConfig.id}`,
11518
9906
  onSubmit: form.handleSubmit(handleSubmit),
11519
- className: cn("min-h-0 flex-1 overflow-y-auto pb-4 flex flex-col gap-4", classNames?.step),
9907
+ className: cn("flex flex-col gap-4", classNames?.step),
11520
9908
  autoComplete: "off",
11521
9909
  children: [
11522
9910
  currentStepConfig.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: currentStepConfig.description }),
11523
9911
  currentStepConfig.render({ form, stepIndex: nav.currentStep - 1 })
11524
9912
  ]
11525
9913
  }
11526
- ) }) }),
9914
+ ) }) }) }),
11527
9915
  showFooter && /* @__PURE__ */ jsxs(
11528
9916
  "div",
11529
9917
  {
11530
9918
  "data-najm-wizard-footer": "true",
11531
9919
  className: cn(
11532
- "sticky bottom-0 z-10 mt-auto flex shrink-0 items-center justify-between bg-background/95 pt-3 backdrop-blur",
9920
+ "sticky bottom-0 z-10 mt-auto flex shrink-0 items-center justify-between bg-transparent",
11533
9921
  footerDividerClass(footerDivider),
11534
9922
  footerDividerClassName,
11535
9923
  classNames?.footer
@@ -12146,8 +10534,8 @@ function useTable(effectiveViewModeOverride) {
12146
10534
  ...effectiveColumns,
12147
10535
  {
12148
10536
  id: "actions",
12149
- header: () => isMenuActions ? null : React66__default.createElement("div", { className: "flex w-full justify-start text-left" }, "Actions"),
12150
- cell: ({ row }) => React66__default.createElement(TableActionCell, { row, onView, onEdit, onDelete, openRowMenu, menuButton, bordered }),
10537
+ header: () => isMenuActions ? null : React54__default.createElement("div", { className: "flex w-full justify-start text-left" }, "Actions"),
10538
+ cell: ({ row }) => React54__default.createElement(TableActionCell, { row, onView, onEdit, onDelete, openRowMenu, menuButton, bordered }),
12151
10539
  enableSorting: false,
12152
10540
  enableHiding: false
12153
10541
  }
@@ -12413,10 +10801,10 @@ function EditableCell({ cell, onCellEdit }) {
12413
10801
  const columnId = cell.column.id;
12414
10802
  const editor = meta.editor || "text";
12415
10803
  const initial = cell.getValue();
12416
- const [editing, setEditing] = React66__default.useState(false);
12417
- const [value, setValue] = React66__default.useState(initial);
12418
- const [saving, setSaving] = React66__default.useState(false);
12419
- React66__default.useEffect(() => {
10804
+ const [editing, setEditing] = React54__default.useState(false);
10805
+ const [value, setValue] = React54__default.useState(initial);
10806
+ const [saving, setSaving] = React54__default.useState(false);
10807
+ React54__default.useEffect(() => {
12420
10808
  if (!editing) setValue(initial);
12421
10809
  }, [initial, editing]);
12422
10810
  const commit = async (next) => {
@@ -12590,7 +10978,7 @@ function NTableContent({ effectiveMode }) {
12590
10978
  const isExpanded = canExpand && row.getIsExpanded();
12591
10979
  const totalCols = row.getVisibleCells().length + (showCheckbox ? 1 : 0) + (hasExpansion ? 1 : 0);
12592
10980
  const rowClassName = getRowClassName?.(row.original);
12593
- return /* @__PURE__ */ jsxs(React66__default.Fragment, { children: [
10981
+ return /* @__PURE__ */ jsxs(React54__default.Fragment, { children: [
12594
10982
  /* @__PURE__ */ jsxs(
12595
10983
  TableRow,
12596
10984
  {
@@ -12849,7 +11237,7 @@ function NTableCardSkeleton({ surface }) {
12849
11237
  }
12850
11238
  function NTableLoadingSkeleton({ rows }) {
12851
11239
  const rawColumns = useTableStore.use.columns();
12852
- const responsiveColumns = React66__default.useMemo(() => filterResponsiveColumns(rawColumns), [rawColumns]);
11240
+ const responsiveColumns = React54__default.useMemo(() => filterResponsiveColumns(rawColumns), [rawColumns]);
12853
11241
  const columns = responsiveColumns;
12854
11242
  const showCheckbox = useTableStore.use.showCheckbox();
12855
11243
  const headerClassName = useTableStore.use.headerClassName();
@@ -12972,19 +11360,19 @@ function useCardContinuation({
12972
11360
  rowCount,
12973
11361
  viewportRef
12974
11362
  }) {
12975
- const [internalPending, setInternalPending] = React66__default.useState(false);
12976
- const [internalError, setInternalError] = React66__default.useState(null);
12977
- const [announcement, setAnnouncement] = React66__default.useState("");
12978
- const [viewportReady, setViewportReady] = React66__default.useState(false);
12979
- const pendingRef = React66__default.useRef(false);
12980
- const previousRowCountRef = React66__default.useRef(rowCount);
12981
- const configRef = React66__default.useRef(config);
11363
+ const [internalPending, setInternalPending] = React54__default.useState(false);
11364
+ const [internalError, setInternalError] = React54__default.useState(null);
11365
+ const [announcement, setAnnouncement] = React54__default.useState("");
11366
+ const [viewportReady, setViewportReady] = React54__default.useState(false);
11367
+ const pendingRef = React54__default.useRef(false);
11368
+ const previousRowCountRef = React54__default.useRef(rowCount);
11369
+ const configRef = React54__default.useRef(config);
12982
11370
  configRef.current = config;
12983
11371
  const enabled = Boolean(config);
12984
11372
  const pending = Boolean(config?.loadingMore || internalPending);
12985
11373
  const error = config?.loadMoreError ?? internalError;
12986
11374
  const hasNextPage = Boolean(config?.hasNextPage);
12987
- const load = React66__default.useCallback(async () => {
11375
+ const load = React54__default.useCallback(async () => {
12988
11376
  const current = configRef.current;
12989
11377
  if (!current) return;
12990
11378
  if (pendingRef.current || current.loadingMore || !current.hasNextPage) return;
@@ -13009,13 +11397,13 @@ function useCardContinuation({
13009
11397
  load,
13010
11398
  { rootMargin: config?.rootMargin ?? DEFAULT_ROOT_MARGIN }
13011
11399
  );
13012
- React66__default.useLayoutEffect(() => {
11400
+ React54__default.useLayoutEffect(() => {
13013
11401
  const node = viewportRef.current ?? null;
13014
11402
  scrollContainerRef.current = node;
13015
11403
  const ready = Boolean(node);
13016
11404
  setViewportReady((value) => value === ready ? value : ready);
13017
11405
  });
13018
- React66__default.useEffect(() => {
11406
+ React54__default.useEffect(() => {
13019
11407
  const previous = previousRowCountRef.current;
13020
11408
  previousRowCountRef.current = rowCount;
13021
11409
  if (!configRef.current) return;
@@ -13025,10 +11413,10 @@ function useCardContinuation({
13025
11413
  configRef.current.itemsLoadedLabel?.(appended) ?? `${appended} more ${appended === 1 ? "item" : "items"} loaded.`
13026
11414
  );
13027
11415
  }, [rowCount]);
13028
- React66__default.useEffect(() => {
11416
+ React54__default.useEffect(() => {
13029
11417
  if (!pending) doneLoading();
13030
11418
  }, [pending, doneLoading]);
13031
- React66__default.useEffect(() => {
11419
+ React54__default.useEffect(() => {
13032
11420
  if (!enabled || !hasNextPage || error) return;
13033
11421
  return observe();
13034
11422
  }, [enabled, hasNextPage, error, observe, viewportReady, rowCount]);
@@ -13082,7 +11470,7 @@ function NTableCards({ effectiveMode }) {
13082
11470
  const cardPagination = useTableStore.use.cardPagination();
13083
11471
  const cardColumnCount = useTableStore.use.cardColumnCount();
13084
11472
  const surface = useTableSurfaceAppearance(bordered, borderColor);
13085
- const viewportRef = React66__default.useRef(null);
11473
+ const viewportRef = React54__default.useRef(null);
13086
11474
  const continuationConfig = cardPagination.mode === "infinite" ? cardPagination : null;
13087
11475
  const continuation = useCardContinuation({
13088
11476
  config: continuationConfig,
@@ -13303,17 +11691,17 @@ function CardLoadMorePagination({
13303
11691
  bordered,
13304
11692
  className
13305
11693
  }) {
13306
- const [internalPending, setInternalPending] = React66__default.useState(false);
13307
- const [internalError, setInternalError] = React66__default.useState(null);
13308
- const [announcement, setAnnouncement] = React66__default.useState("");
13309
- const buttonRef = React66__default.useRef(null);
13310
- const pendingRef = React66__default.useRef(false);
13311
- const restoreFocusRef = React66__default.useRef(false);
13312
- const previousRowCountRef = React66__default.useRef(rowCount);
13313
- const errorId = React66__default.useId();
11694
+ const [internalPending, setInternalPending] = React54__default.useState(false);
11695
+ const [internalError, setInternalError] = React54__default.useState(null);
11696
+ const [announcement, setAnnouncement] = React54__default.useState("");
11697
+ const buttonRef = React54__default.useRef(null);
11698
+ const pendingRef = React54__default.useRef(false);
11699
+ const restoreFocusRef = React54__default.useRef(false);
11700
+ const previousRowCountRef = React54__default.useRef(rowCount);
11701
+ const errorId = React54__default.useId();
13314
11702
  const pending = Boolean(config.loadingMore || internalPending);
13315
11703
  const error = config.loadMoreError ?? internalError;
13316
- React66__default.useEffect(() => {
11704
+ React54__default.useEffect(() => {
13317
11705
  const previous = previousRowCountRef.current;
13318
11706
  if (rowCount > previous) {
13319
11707
  const appended = rowCount - previous;
@@ -13323,7 +11711,7 @@ function CardLoadMorePagination({
13323
11711
  }
13324
11712
  previousRowCountRef.current = rowCount;
13325
11713
  }, [config.itemsLoadedLabel, rowCount]);
13326
- React66__default.useEffect(() => {
11714
+ React54__default.useEffect(() => {
13327
11715
  if (pending || !restoreFocusRef.current) return;
13328
11716
  restoreFocusRef.current = false;
13329
11717
  const frame = requestAnimationFrame(() => buttonRef.current?.focus());
@@ -13393,9 +11781,9 @@ function CardLoadMorePagination({
13393
11781
  var navButtonClass = "h-8 w-8 p-0 disabled:text-muted-foreground disabled:opacity-70";
13394
11782
  var chevronClass = "h-4 w-4 rtl:-scale-x-100";
13395
11783
  function useLowerBoundPageCountWarning(manualPagination, pageCount, pagination) {
13396
- const previous = React66__default.useRef(null);
13397
- const warned = React66__default.useRef(false);
13398
- React66__default.useEffect(() => {
11784
+ const previous = React54__default.useRef(null);
11785
+ const warned = React54__default.useRef(false);
11786
+ React54__default.useEffect(() => {
13399
11787
  if (typeof console === "undefined") return;
13400
11788
  if (typeof process !== "undefined" && process.env?.NODE_ENV === "production") return;
13401
11789
  if (!manualPagination || pageCount === void 0 || !pagination) {
@@ -13571,7 +11959,7 @@ function NTablePagination() {
13571
11959
  function useToolbarCopy() {
13572
11960
  const own = useTableStore.use.toolbarLabels();
13573
11961
  const labels = useResolvedToolbarLabels(own);
13574
- return React66__default.useMemo(
11962
+ return React54__default.useMemo(
13575
11963
  () => ({
13576
11964
  settings: labels.settings ?? "Table settings",
13577
11965
  view: labels.view ?? "View",
@@ -15324,7 +13712,7 @@ function NNavbar({
15324
13712
  (userMenuActions.length > 0 || onLogout) && /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
15325
13713
  userMenuActions.map((action) => {
15326
13714
  const ActionIcon = action.icon;
15327
- return /* @__PURE__ */ jsxs(React66__default.Fragment, { children: [
13715
+ return /* @__PURE__ */ jsxs(React54__default.Fragment, { children: [
15328
13716
  action.separator && /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
15329
13717
  /* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: action.onClick, className: "cursor-pointer", children: [
15330
13718
  ActionIcon && /* @__PURE__ */ jsx(ActionIcon, { className: "h-4 w-4 mr-2" }),
@@ -15563,4 +13951,4 @@ function NGridItem({
15563
13951
  return /* @__PURE__ */ jsx("div", { className: itemClassName, ...props, children });
15564
13952
  }
15565
13953
 
15566
- 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, NCredentialsCard, NDataCardShell, NDeleteDialog, NDeleteDialogContent, NDetailCard, NDetailItem, NDetailList, NDialog, NDialogDescription, NDialogHeader, NDialogPrimaryButton, NDialogSecondaryButton, NDonutCard, NEditorTabs, NErrorBoundary, NFileBrowser, NFileTypeIcon, NFilterBar, NFolderIcon, NForm, NFormSectionHeader, NGrid, NGridItem, NImage, NIndicator, NInspectorSheet, NLineChart, NMultiDialog, NNavbar, NPageHeader, NPageHeaderActions, NPageHeaderCompactActions, NPageHeaderFilters, NPageHeaderTop, 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, 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, focusRingClasses, focusRingWithinClasses, 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 };
13954
+ export { Alert, NCard as AsyncCard, Avatar, AvatarFallback, AvatarFormInput, AvatarGroup, AvatarImage, AvatarInput, AvatarStatus, Badge, 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, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicArray_default as DynamicArray, EmojiInput, FileImportButton, FileInput, FormInput, ImageInput, Indicator4 as Indicator, LangInput, MultiSelectInput, NAJM_SAVED_THEME_VALUE, NAlert, NAppShell, NCard as NAsyncCard, NAvatar, NBadge, NBarChart, NBulkActionsBar, NCard, NCardAction, NCardFooter, NCardInfo, NCardMedia, NCardSection, NChartSkeleton, NCommandPalette, NContextMenu, NCredentialsCard, NDataCardShell, NDetailCard, NDetailItem, NDetailList, NDonutCard, NEditorTabs, NErrorBoundary, NFileBrowser, NFileTypeIcon, NFilterBar, NFolderIcon, NForm, NFormSectionHeader, NGrid, NGridItem, NImage, NIndicator, NInspectorSheet, NLineChart, NNavbar, NPieChart, NProgress, NRowActions, NSection, NSectionHeader, NSectionInfo, NSectionWithInfo, NSidebar, NSidebarBrand, NSidebarContent, NSidebarFooter, NSidebarHeader, NSidebarItem, NSidebarMobile, NSidebarSection, NSkeleton, NSkeletonCalendar, NSkeletonChart, NSkeletonDonut, NSkeletonEventList, NSkeletonWidget, NSkeletonWidgets, NSlider, NSmartPasteDialog, 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, 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, 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, WizardForm, alertVariants, avatarVariants, badgeColorVariants, badgeVariants, buildDefaultFileColumns, buildPageItems, createTableStore, detectFormat, 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, useDynamicPageSize, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useNForm, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard };