@astherix/ui 0.40.0 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,13 +13,18 @@ packages/ui/
13
13
  src/components/button/ Button
14
14
  src/components/card/ Card, ChoiceCard
15
15
  src/components/editor/ Editor (entry: @astherix/ui/editor)
16
- src/components/input/ Field, Input, Textarea
16
+ src/components/input/ Field, Input, Textarea, OtpInput
17
17
  src/components/menu/ DropdownMenu, SplitButton
18
18
  src/components/modal/ Modal
19
+ src/components/drawer/ Drawer
19
20
  src/components/pill/ Pill, PillGroup, PillOption
20
21
  src/components/choice/ Checkbox, CheckboxGroup, RadioGroup, Radio, Switch
21
22
  src/components/select/ Select
22
23
  src/components/sidebar/ SidebarProvider, Sidebar, SidebarNav, SidebarTrigger …
24
+ src/components/navigation/ NavigationMenu
25
+ src/components/breadcrumbs/ Breadcrumbs
26
+ src/components/tooltip/ Tooltip
27
+ src/components/placeholder/ Placeholder
23
28
  src/components/table/ DataTable
24
29
  src/components/tabs/ Tabs
25
30
  src/components/timeline/ Timeline, Roadmap
@@ -381,6 +386,24 @@ controls can read it with `useField()`.
381
386
  `maxRows`, `showCount` (with `maxLength` shows "12 / 280"), `resize` (`vertical` `none`),
382
387
  `frameClassName`.
383
388
 
389
+ ## One-time code (OtpInput)
390
+
391
+ ```tsx
392
+ <Field label="Authentication code" error={errors.code}>
393
+ <OtpInput value={code} onValueChange={setCode} onComplete={verify} />
394
+ </Field>
395
+
396
+ <OtpInput name="code" autoFocus /> {/* posts with the form; a form reset clears it */}
397
+ <OtpInput length={8} allow="alphanumeric" groupSize={4} />
398
+ <OtpInput length={4} mask size="lg" /> {/* a PIN */}
399
+ ```
400
+
401
+ One real input behind the boxes, so SMS autofill (`autocomplete="one-time-code"`), pasting,
402
+ password managers and form posts all work, and screen readers meet a single field. Props:
403
+ `length` (6), `value` / `defaultValue` / `onValueChange`, `onComplete`, `allow` (`digits`
404
+ `alphanumeric` or a RegExp per character), `groupSize`, `mask`, `size` (`sm` `md` `lg`), `invalid`,
405
+ `frameClassName` + input props (`name`, `autoFocus`, `disabled`…). Reads a surrounding Field.
406
+
384
407
  ## Pagination
385
408
 
386
409
  ```tsx
@@ -625,6 +648,24 @@ Props: `icon`, `label` (required; spoken and tooltip), `variant` (`plain` `soft`
625
648
  `shape` (`circle` `square`), `pressed` / `defaultPressed` / `onPressedChange`, `pressedIcon`,
626
649
  `burst`, `badge` (number or dot), `loading`, `href`, `tooltip`, `disabled`.
627
650
 
651
+ ## Tooltip
652
+
653
+ ```tsx
654
+ <Tooltip content="Archive">
655
+ <Button variant="ghost" iconOnly icon="bi bi-archive" aria-label="Archive" />
656
+ </Tooltip>
657
+ <Tooltip side="bottom" content="Save draft ⌘S">…</Tooltip>
658
+ <Tooltip content={client.name} disabled={!isTruncated}>…</Tooltip>
659
+ ```
660
+
661
+ Shows on hover (after `delay`, 400ms) and keyboard focus, never on touch; hides on Escape, blur and
662
+ pointer leave (the tooltip itself is hoverable). Moving between tooltips shows the next at once.
663
+ Shown with the Popover API, so it sits above modals and drawers and escapes `overflow: hidden` —
664
+ no provider or z-index needed. Props: `content`, `side` (`top` `right` `bottom` `left`; flips),
665
+ `align` (`start` `center` `end`), `delay`, `disabled`, `as` (`description` — read after the
666
+ element's name, default; `label` — the tooltip is the name), `className`. The child must take a ref
667
+ and focus/pointer handlers; disabled buttons get no events, so wrap them in a focusable span.
668
+
628
669
  ## Modal
629
670
 
630
671
  ```tsx
@@ -668,6 +709,30 @@ to the opener on close, Tab stays inside, the page behind is inert and doesn't s
668
709
  Theme tokens: `--radius-modal`, `--ui-shadow-modal`, `--ui-backdrop`, `--ui-backdrop-dark`,
669
710
  `--ui-backdrop-blur`, `--ui-backdrop-blur-radius`, `--ui-backdrop-solid`.
670
711
 
712
+ ## Drawer
713
+
714
+ ```tsx
715
+ const menu = useDrawer(); // { isOpen, open, close, toggle, drawerProps }
716
+
717
+ <Drawer {...menu.drawerProps}>
718
+ <DrawerTrigger asChild><Button iconOnly icon="bi bi-list" aria-label="Open menu" /></DrawerTrigger>
719
+ <DrawerContent side="left" size="sm">
720
+ <DrawerHeader>
721
+ <DrawerTitle>Northwind Billing</DrawerTitle>
722
+ <DrawerDescription>…</DrawerDescription>
723
+ </DrawerHeader>
724
+ <DrawerBody>…</DrawerBody>
725
+ <DrawerFooter><DrawerClose asChild><Button>Done</Button></DrawerClose></DrawerFooter>
726
+ </DrawerContent>
727
+ </Drawer>
728
+ ```
729
+
730
+ A Modal that slides in from an edge — the same native `<dialog>`, focus handling, scroll lock,
731
+ Escape and backdrop clicks. `DrawerContent`: `side` (`left` `right` `top` `bottom`; default
732
+ `right`), `size` (`sm` `md` `lg` — width for left/right, height for top/bottom), `dismissible`,
733
+ `backdrop`, `showCloseButton`, `closeLabel`. `DrawerFooter` sits at the bottom. Reduced motion fades
734
+ instead of sliding.
735
+
671
736
  ## Table (DataTable)
672
737
 
673
738
  ```tsx
@@ -727,6 +792,45 @@ narrow: off-canvas drawer. Chosen by the layout's own width.
727
792
  `Sidebar`: `width`, `railWidth`. `SidebarNav`: `items`, `activeHref`, `matchNested`. `SidebarGroup`:
728
793
  `label`, `action`. `useSidebar()` → `{ mode, collapsed, drawerOpen, toggle, setCollapsed, setDrawerOpen, side }`.
729
794
 
795
+ ## Navigation menu
796
+
797
+ ```tsx
798
+ <NavigationMenu linkComponent={Link} activeHref={url} items={[
799
+ { label: "Dashboard", href: "/dashboard", icon: <LayoutGrid /> },
800
+ { label: "Reports", children: [
801
+ { label: "Sales", href: "/reports/sales", description: "Revenue by month and client" },
802
+ { label: "Aging", href: "/reports/aging", description: "Who owes what, and for how long" },
803
+ ] },
804
+ { label: "Docs", href: "https://example.com/docs", external: true },
805
+ ]} />
806
+
807
+ // Phones: the same items in a Drawer
808
+ <NavigationMenu orientation="vertical" items={items} activeHref={url} linkComponent={Link} onNavigate={menu.close} />
809
+ ```
810
+
811
+ Items: `{ label, href?, icon?, description?, badge?, children?, external?, id? }` — `children` open
812
+ a panel of links (one level). Props: `items`, `activeHref`, `matchNested` (default true; the most
813
+ specific match wins), `orientation` (`horizontal` `vertical`), `indicator` (`pill` `underline` — give
814
+ the menu `className="h-full"` in the header so the line sits on its edge), `linkComponent`,
815
+ `onNavigate`, `aria-label` (default "Main"). Disclosure pattern: links stay in the Tab order;
816
+ Enter/Space/↓ open a panel, ← → Home End move between top-level items, Escape closes; hover opens
817
+ panels for mouse users.
818
+
819
+ ## Breadcrumbs
820
+
821
+ ```tsx
822
+ <Breadcrumbs linkComponent={Link} items={[
823
+ { label: "Clients", href: "/clients" },
824
+ { label: "Northwind Traders", href: "/clients/7" },
825
+ { label: "Invoices" }, // the current page: no href
826
+ ]} />
827
+ ```
828
+
829
+ The last item is marked `aria-current="page"`. Past `maxItems` (default 4; 0 never folds) the middle
830
+ folds into "…", which opens in place. Long labels truncate with the full text as a tooltip. Props:
831
+ `items` (`label`, `href`, `icon`), `maxItems`, `separator` (`chevron` `slash` or an element),
832
+ `size` (`sm` `md`), `linkComponent`, `aria-label` (default "Breadcrumb").
833
+
730
834
  ## Tabs
731
835
 
732
836
  ```tsx
@@ -817,6 +921,19 @@ nothing overflows on a phone), `rowSpan`. `Container`: `size` (`sm` `md` `lg` `x
817
921
  follow the theme's density. Breakpoints follow the window, like Tailwind's own — for a layout that
818
922
  reacts to the space it's actually in, use `minChildWidth` or `wrap`.
819
923
 
924
+ ## Placeholder
925
+
926
+ ```tsx
927
+ <Placeholder ratio="16/9" />
928
+ <Placeholder className="h-80" label="Revenue chart" />
929
+ <Placeholder pattern="dots" border="solid" className="text-primary" />
930
+ ```
931
+
932
+ A patterned box that holds a layout slot before its content exists (wireframes, empty dashboard
933
+ widgets). For content that is loading, use Skeleton. Props: `pattern` (`stripes` `dots` `grid`
934
+ `none`), `label`, `ratio`, `border` (`dashed` `solid` `none`). Drawn with CSS gradients in the text
935
+ color, so it follows the theme; decorative (hidden from screen readers) unless it has a label.
936
+
820
937
  ## Hero
821
938
 
822
939
  The top of a landing page, in separate pieces so it can be quiet or loud.
package/dist/index.d.ts CHANGED
@@ -147,6 +147,13 @@ interface ModalContentProps extends React.HTMLAttributes<HTMLDivElement>, Varian
147
147
  /** Accessible label for the × button. */
148
148
  closeLabel?: string;
149
149
  }
150
+ /** Props shared by ModalContent and DrawerContent. */
151
+ interface DialogSurfaceProps extends React.HTMLAttributes<HTMLDivElement> {
152
+ dismissible?: boolean;
153
+ backdrop?: ModalBackdrop;
154
+ showCloseButton?: boolean;
155
+ closeLabel?: string;
156
+ }
150
157
  declare const ModalContent: React.ForwardRefExoticComponent<ModalContentProps & React.RefAttributes<HTMLDivElement>>;
151
158
  declare const ModalHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
152
159
  declare const ModalTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
@@ -2467,4 +2474,154 @@ interface HeroMediaProps extends React.HTMLAttributes<HTMLDivElement> {
2467
2474
  /** The screenshot beside the words. */
2468
2475
  declare function HeroMedia({ frame, url, float, tilt, className, children, ...rest }: HeroMediaProps): React.JSX.Element;
2469
2476
 
2470
- export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionStatus, AccordionToggleAll, ActivityIndicator, type ActivityIndicatorProps, type ActivitySize, type ActivityStep, ActivitySteps, type ActivityStepsProps, type ActivityTone, Alert, type AlertProps, type AlertTone, type AlertVariant, AreaChart, AspectRatio, type AspectRatioProps, Autocomplete, type AutocompleteItem, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, AvatarLabel, type AvatarLabelProps, type AvatarProps, type AvatarSize, type AvatarStatus, AvatarUpload, type AvatarUploadProps, BarChart, type BarChartProps, BarList, type BarListItem, type BarListProps, Blockquote, type BlockquoteProps, Button, type ButtonProps, CalendarHeatmap, type CalendarHeatmapProps, Card, CardBody, CardContent, CardDescription, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, CardLink, CardMedia, type CardMediaProps, type CardProps, CardTitle, Carousel, type CarouselHandle, type CarouselProps, CarouselSlide, type CarouselSlideProps, Center, type CenterProps, type ChartSeries, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ChoiceCard, ChoiceCardGroup, type ChoiceCardGroupProps, type ChoiceCardProps, Code, Container, type ContainerProps, DashboardGrid, type DashboardGridProps, DataTable, type DataTableColumn, type DataTableProps, type DataTableQuery, type DataTableStatusState, type Datum, Divider, type DividerProps, DonutChart, type DonutChartProps, type DonutSlice, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuTrigger, type DropdownMenuTriggerProps, Field, type FieldContextValue, type FieldProps, FileDropzone, type FileDropzoneProps, FileInput, type FileInputProps, FileList$1 as FileList, type FileListProps, FileUploadButton, type FileUploadButtonProps, Gauge, type GaugeProps, Grid, GridItem, type GridItemProps, type GridProps, Heading, type HeadingProps, type HeadingSize, Hero, HeroActions, type HeroBackground, HeroEyebrow, type HeroEyebrowProps, HeroLogos, type HeroLogosProps, HeroMedia, type HeroMediaProps, type HeroProps, type HeroStat, HeroStats, type HeroStatsProps, HeroSubtitle, HeroTitle, type HeroTitleProps, IconButton, type IconButtonProps, type IconButtonTone, type IconInput, Input, type InputProps, Kbd, type KbdProps, KpiCard, type KpiCardProps, Lead, LineChart, type LineChartProps, Link, type LinkProps, List, ListItem, type ListProps, LiveIndicator, type LiveIndicatorProps, LoadMore, type LoadMoreProps, LoadingOverlay, type LoadingOverlayProps, Mark, Modal, type ModalBackdrop, ModalBody, ModalClose, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, type ModalProps, ModalTitle, ModalTrigger, Pagination, type PaginationProps, type PerView, Pill, type PillAppearance, PillGroup, type PillGroupProps, PillOption, type PillOptionProps, type PillProps, type PillTone, ProgressBar, type ProgressBarProps, ProgressRing, type ProgressRingProps, Prose, type ProseProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type Responsive, Roadmap, type RoadmapItem, type RoadmapProps, Select, type SelectOption, type SelectProps, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, type SidebarGroupProps, SidebarHeader, SidebarInset, SidebarNav, type SidebarNavItem, type SidebarNavProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarTrigger, type SidebarTriggerProps, SignaturePad, type SignaturePadHandle, type SignaturePadProps, Skeleton, SkeletonAvatar, type SkeletonAvatarProps, SkeletonButton, type SkeletonButtonProps, SkeletonCard, type SkeletonCardProps, SkeletonChart, type SkeletonChartProps, SkeletonImage, type SkeletonImageProps, SkeletonList, type SkeletonListProps, type SkeletonProps, SkeletonSwap, type SkeletonSwapProps, SkeletonTable, type SkeletonTableProps, SkeletonText, type SkeletonTextProps, Slider, type SliderMark, type SliderProps, type SortState, Spacer, Sparkline, type SparklineProps, SplitButton, type SplitButtonProps, SpotlightText, type SpotlightTextProps, Stack, type StackAlign, type StackDirection, type StackJustify, type StackProps, Stat, StatGroup, type StatGroupProps, type StatProps, type StepStatus, Switch, type SwitchColor, type SwitchProps, type SwitchVariant, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, Text, type TextProps, type TextTone, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, type ThemeProviderProps, Timeline, TimelineCollapse, type TimelineCollapseProps, TimelineGroup, type TimelineGroupProps, TimelineItem, type TimelineItemProps, type TimelineProps, type TimelineStatus, type TimelineTone, type ToastData, type ToastOptions, type ToastType, Toaster, type ToasterPosition, type ToasterProps, type UploadFn, type UploadItem, type UploadStatus, type UseDelayedLoadingOptions, type UseFileUploadsOptions, WidgetCard, type WidgetCardProps, type XhrUploadOptions, buttonVariants, cardVariants, cn, describeAccept, fileMatchesAccept, formatBytes, formatCompact, formatTimelineDay, formatTimelineTime, getInitials, getPageItems, headingSizes, modalPanelVariants, niceTicks, pillVariants, renderIcon, textSizes, toast, useAccordion, useDelayedLoading, useField, useFileUploads, useModal, useSidebar, useTweenedNumbers, xhrUpload };
2477
+ type DrawerProps = ModalProps;
2478
+ declare const Drawer: typeof Modal;
2479
+ declare const DrawerTrigger: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
2480
+ asChild?: boolean;
2481
+ } & React.RefAttributes<HTMLButtonElement>>;
2482
+ declare const DrawerClose: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
2483
+ asChild?: boolean;
2484
+ } & React.RefAttributes<HTMLButtonElement>>;
2485
+ declare const DrawerTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
2486
+ declare const DrawerDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
2487
+ /** Open and close a drawer from code: `const nav = useDrawer(); <Drawer {...nav.drawerProps}>`. */
2488
+ declare function useDrawer(initialOpen?: boolean): {
2489
+ drawerProps: {
2490
+ open: boolean;
2491
+ onOpenChange: React.Dispatch<React.SetStateAction<boolean>>;
2492
+ };
2493
+ isOpen: boolean;
2494
+ open: () => void;
2495
+ close: () => void;
2496
+ toggle: () => void;
2497
+ };
2498
+ type DrawerSide = "left" | "right" | "top" | "bottom";
2499
+ interface DrawerContentProps extends DialogSurfaceProps {
2500
+ /** The edge it slides in from. Default "right"; "left" suits navigation, "bottom" suits phones. */
2501
+ side?: DrawerSide;
2502
+ /**
2503
+ * How far it reaches into the screen: the width for left/right, the height for
2504
+ * top/bottom. It never covers the whole screen, so the backdrop stays tappable.
2505
+ */
2506
+ size?: "sm" | "md" | "lg";
2507
+ }
2508
+ declare const DrawerContent: React.ForwardRefExoticComponent<DrawerContentProps & React.RefAttributes<HTMLDivElement>>;
2509
+ declare const DrawerHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
2510
+ declare const DrawerBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
2511
+ declare const DrawerFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
2512
+
2513
+ type TooltipSide = "top" | "bottom" | "left" | "right";
2514
+ interface TooltipProps {
2515
+ /** The hint. Keep it short — a few words, or a name and a shortcut. */
2516
+ content: React.ReactNode;
2517
+ /** The element it describes. It must accept a ref and focus/pointer handlers (a button, a link…). */
2518
+ children: React.ReactElement;
2519
+ /** Preferred side; it flips when there's no room. Default "top". */
2520
+ side?: TooltipSide;
2521
+ /** Line it up with the element's start, center (default) or end. */
2522
+ align?: "start" | "center" | "end";
2523
+ /** Milliseconds of hovering before it shows. Default 400. Keyboard focus shows it at once. */
2524
+ delay?: number;
2525
+ /** Don't show it (e.g. when the full text is already visible). */
2526
+ disabled?: boolean;
2527
+ /**
2528
+ * How screen readers use the text.
2529
+ * - "description" (default): read after the element's own name, e.g. "Archive, Ctrl+E".
2530
+ * - "label": the tooltip *is* the name — for an icon-only control with no aria-label.
2531
+ */
2532
+ as?: "description" | "label";
2533
+ className?: string;
2534
+ }
2535
+ declare function Tooltip({ content, children, side, align, delay, disabled, as, className, }: TooltipProps): React.JSX.Element;
2536
+
2537
+ interface OtpInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "defaultValue" | "onChange" | "pattern" | "maxLength" | "type"> {
2538
+ /** Number of characters. Default 6. */
2539
+ length?: number;
2540
+ value?: string;
2541
+ defaultValue?: string;
2542
+ onValueChange?: (value: string) => void;
2543
+ /** Called once every box is filled, e.g. to submit straight away. */
2544
+ onComplete?: (value: string) => void;
2545
+ /** Which characters are allowed: "digits" (default), "alphanumeric", or your own RegExp for one character. */
2546
+ allow?: "digits" | "alphanumeric" | RegExp;
2547
+ /** Draw a divider after every n boxes, e.g. 3 → "123–456". */
2548
+ groupSize?: number;
2549
+ /** Show dots instead of the characters (for PINs). */
2550
+ mask?: boolean;
2551
+ size?: ControlSize;
2552
+ invalid?: boolean;
2553
+ /** Class for the row of boxes. `className` goes on the hidden <input>. */
2554
+ frameClassName?: string;
2555
+ }
2556
+ declare const OtpInput: React.ForwardRefExoticComponent<OtpInputProps & React.RefAttributes<HTMLInputElement>>;
2557
+
2558
+ interface BreadcrumbItem {
2559
+ label: string;
2560
+ /** Where it goes. Leave it out on the last item (the current page). */
2561
+ href?: string;
2562
+ icon?: IconInput;
2563
+ }
2564
+ interface BreadcrumbsProps extends Omit<React.HTMLAttributes<HTMLElement>, "children"> {
2565
+ items: BreadcrumbItem[];
2566
+ /** Fold the middle into "…" when there are more items than this. Default 4; 0 never folds. */
2567
+ maxItems?: number;
2568
+ /** What goes between items: "chevron" (default), "slash", or your own element. */
2569
+ separator?: "chevron" | "slash" | React.ReactNode;
2570
+ /** The link component — e.g. Next.js `Link` or Inertia's `Link`. Default <a>. */
2571
+ linkComponent?: React.ElementType;
2572
+ size?: "sm" | "md";
2573
+ }
2574
+ declare function Breadcrumbs({ items, maxItems, separator, linkComponent: LinkC, size, className, "aria-label": ariaLabel, ...props }: BreadcrumbsProps): React.JSX.Element;
2575
+
2576
+ interface NavigationMenuItem {
2577
+ label: string;
2578
+ /** Where it goes. Items with children don't need one (they open their panel). */
2579
+ href?: string;
2580
+ icon?: IconInput;
2581
+ /** A line under the label — shown in panels. */
2582
+ description?: React.ReactNode;
2583
+ /** Something after the label, e.g. <Pill size="sm">New</Pill>. */
2584
+ badge?: React.ReactNode;
2585
+ /** A panel of links. One level deep. */
2586
+ children?: NavigationMenuItem[];
2587
+ /** Open in a new tab. */
2588
+ external?: boolean;
2589
+ /** Stable key if labels repeat. */
2590
+ id?: string;
2591
+ }
2592
+ interface NavigationMenuProps {
2593
+ items: NavigationMenuItem[];
2594
+ /** The current page's path. Its item (or the item whose panel holds it) is highlighted. */
2595
+ activeHref?: string;
2596
+ /** Also treat an item as active when the path starts with its href (e.g. /invoices/1047). Default true. */
2597
+ matchNested?: boolean;
2598
+ /** "horizontal" (default) for a header; "vertical" for a drawer or a side column. */
2599
+ orientation?: "horizontal" | "vertical";
2600
+ /**
2601
+ * How the current page shows in a horizontal menu: "pill" (a soft background, default)
2602
+ * or "underline" (a line along the bottom — give the menu the header's height with
2603
+ * className="h-full" so the line sits on the header's edge).
2604
+ */
2605
+ indicator?: "pill" | "underline";
2606
+ /** The link component — e.g. Next.js `Link` or Inertia's `Link`. Default <a>. */
2607
+ linkComponent?: React.ElementType;
2608
+ /** Called after a link is followed — e.g. close the Drawer the menu sits in. */
2609
+ onNavigate?: (href: string) => void;
2610
+ "aria-label"?: string;
2611
+ className?: string;
2612
+ }
2613
+ declare function NavigationMenu({ items, activeHref, matchNested, orientation, indicator, linkComponent, onNavigate, "aria-label": ariaLabel, className, }: NavigationMenuProps): React.JSX.Element;
2614
+
2615
+ interface PlaceholderProps extends React.HTMLAttributes<HTMLDivElement> {
2616
+ /** "stripes" (diagonal lines, default), "dots", "grid" or "none" (just the dashed outline). */
2617
+ pattern?: "stripes" | "dots" | "grid" | "none";
2618
+ /** A short note in the middle, e.g. what will go here. */
2619
+ label?: React.ReactNode;
2620
+ /** Keep a shape, e.g. "16/9" or 1. Leave it out to fill the height you give it. */
2621
+ ratio?: number | string;
2622
+ /** Outline: "dashed" (default), "solid" or "none". */
2623
+ border?: "dashed" | "solid" | "none";
2624
+ }
2625
+ declare const Placeholder: React.ForwardRefExoticComponent<PlaceholderProps & React.RefAttributes<HTMLDivElement>>;
2626
+
2627
+ export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionStatus, AccordionToggleAll, ActivityIndicator, type ActivityIndicatorProps, type ActivitySize, type ActivityStep, ActivitySteps, type ActivityStepsProps, type ActivityTone, Alert, type AlertProps, type AlertTone, type AlertVariant, AreaChart, AspectRatio, type AspectRatioProps, Autocomplete, type AutocompleteItem, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, AvatarLabel, type AvatarLabelProps, type AvatarProps, type AvatarSize, type AvatarStatus, AvatarUpload, type AvatarUploadProps, BarChart, type BarChartProps, BarList, type BarListItem, type BarListProps, Blockquote, type BlockquoteProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CalendarHeatmap, type CalendarHeatmapProps, Card, CardBody, CardContent, CardDescription, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, CardLink, CardMedia, type CardMediaProps, type CardProps, CardTitle, Carousel, type CarouselHandle, type CarouselProps, CarouselSlide, type CarouselSlideProps, Center, type CenterProps, type ChartSeries, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ChoiceCard, ChoiceCardGroup, type ChoiceCardGroupProps, type ChoiceCardProps, Code, Container, type ContainerProps, DashboardGrid, type DashboardGridProps, DataTable, type DataTableColumn, type DataTableProps, type DataTableQuery, type DataTableStatusState, type Datum, Divider, type DividerProps, DonutChart, type DonutChartProps, type DonutSlice, Drawer, DrawerBody, DrawerClose, DrawerContent, type DrawerContentProps, DrawerDescription, DrawerFooter, DrawerHeader, type DrawerProps, type DrawerSide, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuTrigger, type DropdownMenuTriggerProps, Field, type FieldContextValue, type FieldProps, FileDropzone, type FileDropzoneProps, FileInput, type FileInputProps, FileList$1 as FileList, type FileListProps, FileUploadButton, type FileUploadButtonProps, Gauge, type GaugeProps, Grid, GridItem, type GridItemProps, type GridProps, Heading, type HeadingProps, type HeadingSize, Hero, HeroActions, type HeroBackground, HeroEyebrow, type HeroEyebrowProps, HeroLogos, type HeroLogosProps, HeroMedia, type HeroMediaProps, type HeroProps, type HeroStat, HeroStats, type HeroStatsProps, HeroSubtitle, HeroTitle, type HeroTitleProps, IconButton, type IconButtonProps, type IconButtonTone, type IconInput, Input, type InputProps, Kbd, type KbdProps, KpiCard, type KpiCardProps, Lead, LineChart, type LineChartProps, Link, type LinkProps, List, ListItem, type ListProps, LiveIndicator, type LiveIndicatorProps, LoadMore, type LoadMoreProps, LoadingOverlay, type LoadingOverlayProps, Mark, Modal, type ModalBackdrop, ModalBody, ModalClose, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, type ModalProps, ModalTitle, ModalTrigger, NavigationMenu, type NavigationMenuItem, type NavigationMenuProps, OtpInput, type OtpInputProps, Pagination, type PaginationProps, type PerView, Pill, type PillAppearance, PillGroup, type PillGroupProps, PillOption, type PillOptionProps, type PillProps, type PillTone, Placeholder, type PlaceholderProps, ProgressBar, type ProgressBarProps, ProgressRing, type ProgressRingProps, Prose, type ProseProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type Responsive, Roadmap, type RoadmapItem, type RoadmapProps, Select, type SelectOption, type SelectProps, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, type SidebarGroupProps, SidebarHeader, SidebarInset, SidebarNav, type SidebarNavItem, type SidebarNavProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarTrigger, type SidebarTriggerProps, SignaturePad, type SignaturePadHandle, type SignaturePadProps, Skeleton, SkeletonAvatar, type SkeletonAvatarProps, SkeletonButton, type SkeletonButtonProps, SkeletonCard, type SkeletonCardProps, SkeletonChart, type SkeletonChartProps, SkeletonImage, type SkeletonImageProps, SkeletonList, type SkeletonListProps, type SkeletonProps, SkeletonSwap, type SkeletonSwapProps, SkeletonTable, type SkeletonTableProps, SkeletonText, type SkeletonTextProps, Slider, type SliderMark, type SliderProps, type SortState, Spacer, Sparkline, type SparklineProps, SplitButton, type SplitButtonProps, SpotlightText, type SpotlightTextProps, Stack, type StackAlign, type StackDirection, type StackJustify, type StackProps, Stat, StatGroup, type StatGroupProps, type StatProps, type StepStatus, Switch, type SwitchColor, type SwitchProps, type SwitchVariant, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, Text, type TextProps, type TextTone, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, type ThemeProviderProps, Timeline, TimelineCollapse, type TimelineCollapseProps, TimelineGroup, type TimelineGroupProps, TimelineItem, type TimelineItemProps, type TimelineProps, type TimelineStatus, type TimelineTone, type ToastData, type ToastOptions, type ToastType, Toaster, type ToasterPosition, type ToasterProps, Tooltip, type TooltipProps, type TooltipSide, type UploadFn, type UploadItem, type UploadStatus, type UseDelayedLoadingOptions, type UseFileUploadsOptions, WidgetCard, type WidgetCardProps, type XhrUploadOptions, buttonVariants, cardVariants, cn, describeAccept, fileMatchesAccept, formatBytes, formatCompact, formatTimelineDay, formatTimelineTime, getInitials, getPageItems, headingSizes, modalPanelVariants, niceTicks, pillVariants, renderIcon, textSizes, toast, useAccordion, useDelayedLoading, useDrawer, useField, useFileUploads, useModal, useSidebar, useTweenedNumbers, xhrUpload };