@usevyre/react 0.1.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 (36) hide show
  1. package/LICENSE +21 -0
  2. package/dist/components/Accordion/Accordion.d.ts +38 -0
  3. package/dist/components/Alert/Alert.d.ts +73 -0
  4. package/dist/components/Avatar/Avatar.d.ts +21 -0
  5. package/dist/components/Badge/Badge.d.ts +27 -0
  6. package/dist/components/Breadcrumb/Breadcrumb.d.ts +38 -0
  7. package/dist/components/Button/Button.d.ts +53 -0
  8. package/dist/components/Calendar/Calendar.d.ts +64 -0
  9. package/dist/components/Card/Card.d.ts +51 -0
  10. package/dist/components/Checkbox/Checkbox.d.ts +22 -0
  11. package/dist/components/Command/Command.d.ts +96 -0
  12. package/dist/components/DropdownMenu/DropdownMenu.d.ts +122 -0
  13. package/dist/components/Input/Input.d.ts +53 -0
  14. package/dist/components/Label/Label.d.ts +16 -0
  15. package/dist/components/Modal/Modal.d.ts +59 -0
  16. package/dist/components/Pagination/Pagination.d.ts +45 -0
  17. package/dist/components/Popover/Popover.d.ts +46 -0
  18. package/dist/components/Progress/Progress.d.ts +21 -0
  19. package/dist/components/Select/Select.d.ts +55 -0
  20. package/dist/components/Separator/Separator.d.ts +16 -0
  21. package/dist/components/Sheet/Sheet.d.ts +54 -0
  22. package/dist/components/Sidebar/Sidebar.d.ts +140 -0
  23. package/dist/components/Skeleton/Skeleton.d.ts +17 -0
  24. package/dist/components/Slider/Slider.d.ts +26 -0
  25. package/dist/components/Switch/Switch.d.ts +21 -0
  26. package/dist/components/Table/Table.d.ts +75 -0
  27. package/dist/components/Tabs/Tabs.d.ts +64 -0
  28. package/dist/components/Toast/Toast.d.ts +54 -0
  29. package/dist/components/Tooltip/Tooltip.d.ts +40 -0
  30. package/dist/components/Typography/Typography.d.ts +67 -0
  31. package/dist/index.cjs +1 -0
  32. package/dist/index.d.ts +101 -0
  33. package/dist/index.js +2864 -0
  34. package/dist/types.d.ts +58 -0
  35. package/dist/utils/cn.d.ts +7 -0
  36. package/package.json +54 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Galih Pranowo (gapra.dev)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,38 @@
1
+ /**
2
+ * AI CONTEXT:
3
+ * ┌─────────────────────────────────────────────┐
4
+ * │ Component: Accordion │
5
+ * │ type = "single"(default)|"multiple" │
6
+ * │ defaultValue = string | string[] │
7
+ * │ value = string | string[] │
8
+ * │ onValueChange = (value) => void │
9
+ * │ │
10
+ * │ AccordionItem: value* = string │
11
+ * │ AccordionTrigger: children (label text) │
12
+ * │ AccordionContent: children (panel content) │
13
+ * │ │
14
+ * │ CSS classes: │
15
+ * │ .vyre-accordion │
16
+ * │ .vyre-accordion__item │
17
+ * │ .vyre-accordion__trigger │
18
+ * │ .vyre-accordion__content │
19
+ * └─────────────────────────────────────────────┘
20
+ */
21
+ import React from "react";
22
+ export interface AccordionProps extends React.HTMLAttributes<HTMLDivElement> {
23
+ type?: "single" | "multiple";
24
+ defaultValue?: string | string[];
25
+ value?: string | string[];
26
+ onValueChange?: (value: string | string[]) => void;
27
+ }
28
+ export declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
29
+ export interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement> {
30
+ value: string;
31
+ }
32
+ export declare const AccordionItem: React.ForwardRefExoticComponent<AccordionItemProps & React.RefAttributes<HTMLDivElement>>;
33
+ export interface AccordionTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
34
+ }
35
+ export declare const AccordionTrigger: React.ForwardRefExoticComponent<AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>;
36
+ export interface AccordionContentProps extends React.HTMLAttributes<HTMLDivElement> {
37
+ }
38
+ export declare const AccordionContent: React.ForwardRefExoticComponent<AccordionContentProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,73 @@
1
+ /**
2
+ * @usevyre/react — Alert + AlertDialog
3
+ *
4
+ * AI CONTEXT:
5
+ * ┌─────────────────────────────────────────────────────────┐
6
+ * │ Components: Alert + AlertDialog │
7
+ * │ Import: import { Alert, AlertDialog } from "@usevyre/react"│
8
+ * │ │
9
+ * │ Alert props (inline banner): │
10
+ * │ variant = "info"(default)|"success"|"warning"|"danger"│
11
+ * │ title = string (optional) │
12
+ * │ icon = ReactNode (optional, overrides default) │
13
+ * │ onClose = () => void (shows close button) │
14
+ * │ children = ReactNode (alert body text) │
15
+ * │ │
16
+ * │ AlertDialog props (blocking confirmation modal): │
17
+ * │ open = boolean (controlled) │
18
+ * │ onOpenChange = (open: boolean) => void │
19
+ * │ title = string │
20
+ * │ description = string │
21
+ * │ confirmLabel = string (default "Confirm") │
22
+ * │ cancelLabel = string (default "Cancel") │
23
+ * │ variant = "danger"(default)|"warning"|"info" │
24
+ * │ onConfirm = () => void │
25
+ * │ onCancel = () => void │
26
+ * └─────────────────────────────────────────────────────────┘
27
+ *
28
+ * @example
29
+ * // Inline alert
30
+ * <Alert variant="warning" title="Heads up">
31
+ * This action may affect other users in your workspace.
32
+ * </Alert>
33
+ *
34
+ * // Dismissible alert
35
+ * <Alert variant="success" title="Saved!" onClose={() => setVisible(false)}>
36
+ * Your changes were saved successfully.
37
+ * </Alert>
38
+ *
39
+ * // Confirmation dialog (blocking)
40
+ * <AlertDialog
41
+ * open={open}
42
+ * onOpenChange={setOpen}
43
+ * title="Delete workspace?"
44
+ * description="This will permanently delete the workspace and all its data. This action cannot be undone."
45
+ * variant="danger"
46
+ * confirmLabel="Delete workspace"
47
+ * onConfirm={handleDelete}
48
+ * />
49
+ */
50
+ import React from "react";
51
+ export type AlertVariant = "info" | "success" | "warning" | "danger";
52
+ export interface AlertProps {
53
+ variant?: AlertVariant;
54
+ title?: string;
55
+ icon?: React.ReactNode;
56
+ onClose?: () => void;
57
+ children?: React.ReactNode;
58
+ className?: string;
59
+ }
60
+ export declare const Alert: React.FC<AlertProps>;
61
+ export interface AlertDialogProps {
62
+ open: boolean;
63
+ onOpenChange: (open: boolean) => void;
64
+ title: string;
65
+ description?: string;
66
+ variant?: "danger" | "warning" | "info";
67
+ confirmLabel?: string;
68
+ cancelLabel?: string;
69
+ onConfirm?: () => void;
70
+ onCancel?: () => void;
71
+ className?: string;
72
+ }
73
+ export declare const AlertDialog: React.FC<AlertDialogProps>;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * AI CONTEXT:
3
+ * ┌─────────────────────────────────────────────┐
4
+ * │ Component: Avatar │
5
+ * │ src = string (image URL) │
6
+ * │ alt = string │
7
+ * │ fallback = string (initials, e.g. "GP") │
8
+ * │ size = "sm"|"md"(default)|"lg"|"xl" │
9
+ * │ status = "online"|"offline"|"busy"|"away"│
10
+ * │ CSS class: .vyre-avatar │
11
+ * └─────────────────────────────────────────────┘
12
+ */
13
+ import React from "react";
14
+ export interface AvatarProps extends React.HTMLAttributes<HTMLSpanElement> {
15
+ src?: string;
16
+ alt?: string;
17
+ fallback?: string;
18
+ size?: "sm" | "md" | "lg" | "xl";
19
+ status?: "online" | "offline" | "busy" | "away";
20
+ }
21
+ export declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @usevyre/react — Badge
3
+ *
4
+ * AI CONTEXT:
5
+ * ┌─────────────────────────────────────────────────────────┐
6
+ * │ Component: Badge │
7
+ * │ Import: import { Badge } from "@usevyre/react" │
8
+ * │ │
9
+ * │ Props: │
10
+ * │ variant = "default"|"accent"|"teal"| │
11
+ * │ "success"|"warning"|"danger" │
12
+ * │ dot = boolean (live status dot indicator) │
13
+ * └─────────────────────────────────────────────────────────┘
14
+ *
15
+ * @example
16
+ * <Badge variant="success" dot>Online</Badge>
17
+ * <Badge variant="warning">Beta</Badge>
18
+ * <Badge variant="danger">Error</Badge>
19
+ */
20
+ import React from "react";
21
+ import type { BadgeVariant, BaseProps } from "../../types";
22
+ export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, BaseProps {
23
+ variant?: BadgeVariant;
24
+ /** Show a live status dot indicator */
25
+ dot?: boolean;
26
+ }
27
+ export declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @usevyre/react — Breadcrumb
3
+ *
4
+ * AI CONTEXT:
5
+ * ┌─────────────────────────────────────────────────────────┐
6
+ * │ Components: Breadcrumb + BreadcrumbItem + BreadcrumbSeparator│
7
+ * │ Import: import { Breadcrumb, BreadcrumbItem, │
8
+ * │ BreadcrumbSeparator } from "@usevyre/react" │
9
+ * │ │
10
+ * │ Breadcrumb props: │
11
+ * │ separator = ReactNode (default: "/") │
12
+ * │ │
13
+ * │ BreadcrumbItem props: │
14
+ * │ href = string (omit for current/last item) │
15
+ * │ current = boolean (marks aria-current="page") │
16
+ * └─────────────────────────────────────────────────────────┘
17
+ *
18
+ * @example
19
+ * <Breadcrumb>
20
+ * <BreadcrumbItem href="/">Home</BreadcrumbItem>
21
+ * <BreadcrumbItem href="/docs">Docs</BreadcrumbItem>
22
+ * <BreadcrumbItem current>Components</BreadcrumbItem>
23
+ * </Breadcrumb>
24
+ */
25
+ import React from "react";
26
+ export interface BreadcrumbProps {
27
+ children: React.ReactNode;
28
+ separator?: React.ReactNode;
29
+ className?: string;
30
+ }
31
+ export interface BreadcrumbItemProps {
32
+ children: React.ReactNode;
33
+ href?: string;
34
+ current?: boolean;
35
+ className?: string;
36
+ }
37
+ export declare const Breadcrumb: React.FC<BreadcrumbProps>;
38
+ export declare const BreadcrumbItem: React.FC<BreadcrumbItemProps>;
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @usevyre/react — Button
3
+ *
4
+ * AI CONTEXT:
5
+ * ┌─────────────────────────────────────────────────────────┐
6
+ * │ Component: Button │
7
+ * │ Import: import { Button } from "@usevyre/react" │
8
+ * │ │
9
+ * │ Props: │
10
+ * │ variant = "primary"|"secondary"|"ghost"| │
11
+ * │ "accent"|"teal"|"danger" │
12
+ * │ size = "sm"|"md"(default)|"lg"|"icon" │
13
+ * │ disabled = boolean │
14
+ * │ loading = boolean (shows spinner, disables click) │
15
+ * │ as = React.ElementType (default: "button") │
16
+ * │ leftIcon = React.ReactNode │
17
+ * │ rightIcon = React.ReactNode │
18
+ * │ │
19
+ * │ All native <button> props are forwarded. │
20
+ * └─────────────────────────────────────────────────────────┘
21
+ *
22
+ * @example
23
+ * // Primary CTA
24
+ * <Button variant="accent" size="lg">Get Started</Button>
25
+ *
26
+ * // Destructive action
27
+ * <Button variant="danger" onClick={handleDelete}>Delete</Button>
28
+ *
29
+ * // Icon only
30
+ * <Button variant="ghost" size="icon" aria-label="Close">
31
+ * <CloseIcon />
32
+ * </Button>
33
+ *
34
+ * // As link
35
+ * <Button as="a" href="/docs" variant="secondary">Read Docs</Button>
36
+ */
37
+ import React from "react";
38
+ import type { Variant, Size, BaseProps } from "../../types";
39
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, BaseProps {
40
+ /** Visual style variant */
41
+ variant?: Variant;
42
+ /** Size scale */
43
+ size?: Size;
44
+ /** Show loading spinner and disable interaction */
45
+ loading?: boolean;
46
+ /** Icon before label */
47
+ leftIcon?: React.ReactNode;
48
+ /** Icon after label */
49
+ rightIcon?: React.ReactNode;
50
+ /** Render as different element (e.g. "a" for link buttons) */
51
+ as?: React.ElementType;
52
+ }
53
+ export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * @usevyre/react — Calendar & DatePicker
3
+ *
4
+ * AI CONTEXT:
5
+ * ┌─────────────────────────────────────────────────────────────┐
6
+ * │ Components: Calendar · DatePicker │
7
+ * │ Import: import { Calendar, DatePicker } from "@usevyre/react" │
8
+ * │ │
9
+ * │ Calendar props: │
10
+ * │ mode = "single"(default) | "range" | "multiple" │
11
+ * │ value = Date | [Date,Date] | Date[] │
12
+ * │ onChange = (v) => void │
13
+ * │ showTime = boolean (adds HH:MM time picker) │
14
+ * │ minDate / maxDate = Date │
15
+ * │ disabled = (date: Date) => boolean │
16
+ * │ │
17
+ * │ DatePicker props: │
18
+ * │ = all Calendar props + │
19
+ * │ placeholder = string │
20
+ * │ className = string │
21
+ * └─────────────────────────────────────────────────────────────┘
22
+ *
23
+ * @example
24
+ * // Single date
25
+ * <Calendar mode="single" value={date} onChange={setDate} />
26
+ *
27
+ * // Date range
28
+ * <Calendar mode="range" value={[start, end]} onChange={setRange} />
29
+ *
30
+ * // DatePicker (input + popover)
31
+ * <DatePicker mode="single" value={date} onChange={setDate} placeholder="Pick a date" />
32
+ */
33
+ import React from "react";
34
+ export type CalendarMode = "single" | "range" | "multiple";
35
+ export interface CalendarSingleProps {
36
+ mode?: "single";
37
+ value?: Date | null;
38
+ onChange?: (date: Date | null) => void;
39
+ }
40
+ export interface CalendarRangeProps {
41
+ mode: "range";
42
+ value?: [Date | null, Date | null];
43
+ onChange?: (range: [Date | null, Date | null]) => void;
44
+ }
45
+ export interface CalendarMultipleProps {
46
+ mode: "multiple";
47
+ value?: Date[];
48
+ onChange?: (dates: Date[]) => void;
49
+ }
50
+ export type CalendarBaseProps = {
51
+ showTime?: boolean;
52
+ minDate?: Date;
53
+ maxDate?: Date;
54
+ disabled?: (date: Date) => boolean;
55
+ className?: string;
56
+ weekStartsOn?: 0 | 1;
57
+ };
58
+ export type CalendarProps = (CalendarSingleProps & CalendarBaseProps) | (CalendarRangeProps & CalendarBaseProps) | (CalendarMultipleProps & CalendarBaseProps);
59
+ export type DatePickerProps = CalendarProps & {
60
+ placeholder?: string;
61
+ inputClassName?: string;
62
+ };
63
+ export declare const Calendar: React.ForwardRefExoticComponent<CalendarProps & React.RefAttributes<HTMLDivElement>>;
64
+ export declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @usevyre/react — Card
3
+ *
4
+ * AI CONTEXT:
5
+ * ┌─────────────────────────────────────────────────────────┐
6
+ * │ Component: Card + CardHeader + CardBody + CardFooter │
7
+ * │ Import: import { Card, CardBody, ... } from "@usevyre/react" │
8
+ * │ │
9
+ * │ Card props: │
10
+ * │ variant = "default"|"elevated"|"outlined"| │
11
+ * │ "ghost"|"accent" │
12
+ * │ hoverable = boolean (adds hover transition) │
13
+ * │ clickable = boolean (cursor pointer + hover) │
14
+ * │ │
15
+ * │ Slot structure: │
16
+ * │ <Card> │
17
+ * │ <CardHeader> ← optional │
18
+ * │ <CardBody> ← main content │
19
+ * │ <CardFooter> ← optional, actions │
20
+ * │ </Card> │
21
+ * └─────────────────────────────────────────────────────────┘
22
+ *
23
+ * @example
24
+ * <Card variant="elevated">
25
+ * <CardHeader>
26
+ * <Badge variant="teal">Component</Badge>
27
+ * </CardHeader>
28
+ * <CardBody>
29
+ * <h3>Card Title</h3>
30
+ * <p>Card description text.</p>
31
+ * </CardBody>
32
+ * <CardFooter>
33
+ * <Button variant="ghost" size="sm">View docs</Button>
34
+ * </CardFooter>
35
+ * </Card>
36
+ */
37
+ import React from "react";
38
+ import type { BaseProps } from "../../types";
39
+ type CardVariant = "default" | "elevated" | "outlined" | "ghost" | "accent";
40
+ export interface CardProps extends React.HTMLAttributes<HTMLDivElement>, BaseProps {
41
+ variant?: CardVariant;
42
+ hoverable?: boolean;
43
+ clickable?: boolean;
44
+ }
45
+ export declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
46
+ export interface CardSectionProps extends React.HTMLAttributes<HTMLDivElement>, BaseProps {
47
+ }
48
+ export declare const CardHeader: React.ForwardRefExoticComponent<CardSectionProps & React.RefAttributes<HTMLDivElement>>;
49
+ export declare const CardBody: React.ForwardRefExoticComponent<CardSectionProps & React.RefAttributes<HTMLDivElement>>;
50
+ export declare const CardFooter: React.ForwardRefExoticComponent<CardSectionProps & React.RefAttributes<HTMLDivElement>>;
51
+ export {};
@@ -0,0 +1,22 @@
1
+ /**
2
+ * AI CONTEXT:
3
+ * ┌─────────────────────────────────────────────┐
4
+ * │ Component: Checkbox │
5
+ * │ checked = boolean │
6
+ * │ defaultChecked = boolean │
7
+ * │ indeterminate = boolean │
8
+ * │ onCheckedChange = (checked: boolean) => void│
9
+ * │ disabled = boolean │
10
+ * │ size = "sm"|"md"(default) │
11
+ * │ CSS class: .vyre-checkbox │
12
+ * └─────────────────────────────────────────────┘
13
+ */
14
+ import React from "react";
15
+ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "size"> {
16
+ checked?: boolean;
17
+ defaultChecked?: boolean;
18
+ indeterminate?: boolean;
19
+ onCheckedChange?: (checked: boolean) => void;
20
+ size?: "sm" | "md";
21
+ }
22
+ export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,96 @@
1
+ /**
2
+ * @usevyre/react — Command
3
+ *
4
+ * AI CONTEXT:
5
+ * ┌─────────────────────────────────────────────────────────┐
6
+ * │ Components: Command + CommandInput + CommandList + │
7
+ * │ CommandEmpty + CommandGroup + CommandItem + │
8
+ * │ CommandSeparator + CommandDialog │
9
+ * │ Import: import { Command, CommandDialog, ... } │
10
+ * │ from "@usevyre/react" │
11
+ * │ │
12
+ * │ Command props: │
13
+ * │ value = string (controlled search value) │
14
+ * │ onValueChange = (v: string) => void │
15
+ * │ className = string │
16
+ * │ │
17
+ * │ CommandDialog props: │
18
+ * │ open = boolean │
19
+ * │ onOpenChange = (open: boolean) => void │
20
+ * │ + all Command props │
21
+ * │ │
22
+ * │ CommandItem props: │
23
+ * │ onSelect = () => void │
24
+ * │ disabled = boolean │
25
+ * │ keywords = string[] (extra search terms) │
26
+ * └─────────────────────────────────────────────────────────┘
27
+ *
28
+ * @example
29
+ * // Inline
30
+ * <Command>
31
+ * <CommandInput placeholder="Search..." />
32
+ * <CommandList>
33
+ * <CommandGroup heading="Actions">
34
+ * <CommandItem onSelect={() => router.push('/settings')}>
35
+ * Settings
36
+ * </CommandItem>
37
+ * </CommandGroup>
38
+ * <CommandEmpty>No results found.</CommandEmpty>
39
+ * </CommandList>
40
+ * </Command>
41
+ *
42
+ * // Dialog (⌘K palette)
43
+ * <CommandDialog open={open} onOpenChange={setOpen}>
44
+ * <CommandInput placeholder="Type a command..." />
45
+ * <CommandList>...</CommandList>
46
+ * </CommandDialog>
47
+ */
48
+ import React from "react";
49
+ export interface CommandProps {
50
+ value?: string;
51
+ onValueChange?: (v: string) => void;
52
+ className?: string;
53
+ children?: React.ReactNode;
54
+ }
55
+ export declare const Command: React.ForwardRefExoticComponent<CommandProps & React.RefAttributes<HTMLDivElement>>;
56
+ export interface CommandInputProps {
57
+ placeholder?: string;
58
+ className?: string;
59
+ }
60
+ export declare const CommandInput: React.ForwardRefExoticComponent<CommandInputProps & React.RefAttributes<HTMLInputElement>>;
61
+ export interface CommandListProps {
62
+ className?: string;
63
+ children?: React.ReactNode;
64
+ }
65
+ export declare const CommandList: React.ForwardRefExoticComponent<CommandListProps & React.RefAttributes<HTMLDivElement>>;
66
+ export interface CommandEmptyProps {
67
+ className?: string;
68
+ children?: React.ReactNode;
69
+ }
70
+ export declare const CommandEmpty: React.FC<CommandEmptyProps>;
71
+ export interface CommandGroupProps {
72
+ heading?: string;
73
+ className?: string;
74
+ children?: React.ReactNode;
75
+ }
76
+ export declare const CommandGroup: React.FC<CommandGroupProps>;
77
+ export interface CommandItemProps {
78
+ onSelect?: () => void;
79
+ disabled?: boolean;
80
+ keywords?: string[];
81
+ className?: string;
82
+ children?: React.ReactNode;
83
+ /** Optional leading icon */
84
+ icon?: React.ReactNode;
85
+ /** Optional trailing shortcut hint */
86
+ shortcut?: string;
87
+ }
88
+ export declare const CommandItem: React.FC<CommandItemProps>;
89
+ export declare const CommandSeparator: React.FC<{
90
+ className?: string;
91
+ }>;
92
+ export interface CommandDialogProps extends CommandProps {
93
+ open: boolean;
94
+ onOpenChange: (open: boolean) => void;
95
+ }
96
+ export declare const CommandDialog: React.FC<CommandDialogProps>;
@@ -0,0 +1,122 @@
1
+ /**
2
+ * @usevyre/react — DropdownMenu
3
+ *
4
+ * AI CONTEXT:
5
+ * ┌─────────────────────────────────────────────────────────┐
6
+ * │ Components: │
7
+ * │ DropdownMenu — root wrapper + portal │
8
+ * │ DropdownItem — action item │
9
+ * │ DropdownCheckboxItem — toggle item with checkmark │
10
+ * │ DropdownRadioGroup — exclusive radio group │
11
+ * │ DropdownRadioItem — radio option inside group │
12
+ * │ DropdownSub — nested submenu │
13
+ * │ DropdownSubItem — submenu trigger item │
14
+ * │ DropdownLabel — non-interactive section label │
15
+ * │ DropdownSeparator — visual divider │
16
+ * │ │
17
+ * │ Import: │
18
+ * │ import { DropdownMenu, DropdownItem, │
19
+ * │ DropdownCheckboxItem, DropdownRadioGroup, │
20
+ * │ DropdownRadioItem, DropdownSub, DropdownSubItem, │
21
+ * │ DropdownLabel, DropdownSeparator } from "@usevyre/react"│
22
+ * │ │
23
+ * │ DropdownMenu props: │
24
+ * │ trigger = ReactElement (the anchor element) │
25
+ * │ placement = "bottom-start"(default)|"bottom-end" │
26
+ * │ |"top-start"|"top-end" │
27
+ * │ │
28
+ * │ DropdownItem props: │
29
+ * │ onSelect = () => void │
30
+ * │ disabled = boolean │
31
+ * │ variant = "default"(default)|"danger" │
32
+ * │ icon = ReactNode │
33
+ * │ shortcut = string (e.g. "⌘K") │
34
+ * │ │
35
+ * │ DropdownCheckboxItem props: │
36
+ * │ checked = boolean │
37
+ * │ onCheckedChange = (checked: boolean) => void │
38
+ * │ disabled = boolean │
39
+ * │ │
40
+ * │ DropdownRadioGroup props: │
41
+ * │ value = string │
42
+ * │ onValueChange = (value: string) => void │
43
+ * │ │
44
+ * │ DropdownRadioItem props: │
45
+ * │ value = string │
46
+ * │ disabled = boolean │
47
+ * │ │
48
+ * │ DropdownSub props: │
49
+ * │ trigger = ReactNode (the submenu trigger label) │
50
+ * │ placement = "right"(default)|"left" │
51
+ * └─────────────────────────────────────────────────────────┘
52
+ *
53
+ * @example
54
+ * <DropdownMenu trigger={<Button variant="ghost">Actions</Button>}>
55
+ * <DropdownLabel>My Account</DropdownLabel>
56
+ * <DropdownSeparator />
57
+ * <DropdownItem icon={<EditIcon />} shortcut="⌘E" onSelect={handleEdit}>Edit</DropdownItem>
58
+ * <DropdownSub trigger="Share">
59
+ * <DropdownItem onSelect={handleEmail}>Email</DropdownItem>
60
+ * <DropdownItem onSelect={handleLink}>Copy link</DropdownItem>
61
+ * </DropdownSub>
62
+ * <DropdownSeparator />
63
+ * <DropdownItem variant="danger" icon={<TrashIcon />} onSelect={handleDelete}>Delete</DropdownItem>
64
+ * </DropdownMenu>
65
+ */
66
+ import React from "react";
67
+ export type DropdownPlacement = "bottom-start" | "bottom-end" | "top-start" | "top-end";
68
+ export interface DropdownMenuProps {
69
+ trigger: React.ReactElement;
70
+ children: React.ReactNode;
71
+ placement?: DropdownPlacement;
72
+ className?: string;
73
+ }
74
+ export interface DropdownItemProps {
75
+ children: React.ReactNode;
76
+ onSelect?: () => void;
77
+ disabled?: boolean;
78
+ variant?: "default" | "danger";
79
+ icon?: React.ReactNode;
80
+ shortcut?: string;
81
+ className?: string;
82
+ }
83
+ export interface DropdownCheckboxItemProps {
84
+ children: React.ReactNode;
85
+ checked: boolean;
86
+ onCheckedChange: (checked: boolean) => void;
87
+ disabled?: boolean;
88
+ shortcut?: string;
89
+ className?: string;
90
+ }
91
+ export interface DropdownRadioGroupProps {
92
+ value: string;
93
+ onValueChange: (value: string) => void;
94
+ children: React.ReactNode;
95
+ }
96
+ export interface DropdownRadioItemProps {
97
+ children: React.ReactNode;
98
+ value: string;
99
+ disabled?: boolean;
100
+ className?: string;
101
+ }
102
+ export interface DropdownSubProps {
103
+ trigger: React.ReactNode;
104
+ children: React.ReactNode;
105
+ icon?: React.ReactNode;
106
+ placement?: "right" | "left";
107
+ disabled?: boolean;
108
+ className?: string;
109
+ }
110
+ export declare const DropdownMenu: React.FC<DropdownMenuProps>;
111
+ export declare const DropdownLabel: React.FC<{
112
+ children: React.ReactNode;
113
+ className?: string;
114
+ }>;
115
+ export declare const DropdownItem: React.FC<DropdownItemProps>;
116
+ export declare const DropdownCheckboxItem: React.FC<DropdownCheckboxItemProps>;
117
+ export declare const DropdownRadioGroup: React.FC<DropdownRadioGroupProps>;
118
+ export declare const DropdownRadioItem: React.FC<DropdownRadioItemProps>;
119
+ export declare const DropdownSub: React.FC<DropdownSubProps>;
120
+ export declare const DropdownSeparator: React.FC<{
121
+ className?: string;
122
+ }>;