docthub-core-components 2.61.0 → 2.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +3528 -3270
- package/dist/src/components/overrides/ui/navigation-menu/doct-navigation-menu.d.ts +2 -0
- package/dist/src/components/overrides/ui/navigation-menu/index.d.ts +2 -0
- package/dist/src/components/overrides/ui/navigation-menu/navigation-menu-adapter.d.ts +4 -0
- package/dist/src/components/overrides/ui/navigation-menu/navigation-menu-desktop.d.ts +11 -0
- package/dist/src/components/overrides/ui/navigation-menu/navigation-menu-internal.d.ts +14 -0
- package/dist/src/components/overrides/ui/navigation-menu/navigation-menu-mobile.d.ts +14 -0
- package/dist/src/components/overrides/ui/navigation-menu/presets.d.ts +7 -0
- package/dist/src/components/overrides/ui/navigation-menu/types.d.ts +83 -0
- package/dist/src/components/ui/avatar.d.ts +3 -4
- package/dist/src/components/ui/button.d.ts +1 -1
- package/dist/src/components/ui/checkbox.d.ts +18 -3
- package/dist/src/components/ui/collapsible.d.ts +3 -4
- package/dist/src/components/ui/command.d.ts +1 -1
- package/dist/src/components/ui/dialog.d.ts +29 -14
- package/dist/src/components/ui/dropdown-menu.d.ts +32 -17
- package/dist/src/components/ui/label.d.ts +1 -2
- package/dist/src/components/ui/popover.d.ts +14 -5
- package/dist/src/components/ui/progress.d.ts +1 -9
- package/dist/src/components/ui/radio-group.d.ts +15 -3
- package/dist/src/components/ui/select.d.ts +63 -11
- package/dist/src/components/ui/separator.d.ts +1 -2
- package/dist/src/components/ui/sheet.d.ts +22 -10
- package/dist/src/components/ui/sidebar.d.ts +1 -1
- package/dist/src/components/ui/tabs.d.ts +4 -5
- package/dist/src/components/ui/tooltip.d.ts +25 -10
- package/dist/src/vite-env.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -41
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DoctNavigationMenuVariant, MobileMenuCategory, NavigationMenuGroup } from './types';
|
|
2
|
+
export declare function getDesktopGroups(variant: DoctNavigationMenuVariant): NavigationMenuGroup[];
|
|
3
|
+
/** Mobile: top-level \"For Individuals\" and \"For Organizations\" — each expands to nested accordion. */
|
|
4
|
+
export declare function getMobileCategoriesFromPresets(): MobileMenuCategory[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NavigationMenuGroup } from './types';
|
|
2
|
+
interface NavigationMenuDesktopProps {
|
|
3
|
+
readonly groups: NavigationMenuGroup[];
|
|
4
|
+
readonly className?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Desktop mega menu rendered at widths >= 1024px.
|
|
8
|
+
* Uses fixed 16px side gutters for 1024-1279px and keeps centered max width on larger screens.
|
|
9
|
+
*/
|
|
10
|
+
export declare function NavigationMenuDesktop({ groups, className }: NavigationMenuDesktopProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { NavigationMenuItem, NavigationMenuSection } from './types';
|
|
3
|
+
interface NavItemRootProps {
|
|
4
|
+
readonly item: NavigationMenuItem;
|
|
5
|
+
readonly className?: string;
|
|
6
|
+
readonly children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare function NavItemRoot({ item, className, children }: NavItemRootProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
interface SectionItemsProps {
|
|
10
|
+
readonly section: NavigationMenuSection;
|
|
11
|
+
readonly renderItem: (item: NavigationMenuItem, index: number) => ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare function SectionItems({ section, renderItem }: SectionItemsProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MobileMenuCategory, NavigationMenuGroup } from './types';
|
|
2
|
+
interface NavigationMenuMobileProps {
|
|
3
|
+
/** Nested accordion: For Individuals, For Organizations, About Docthub. */
|
|
4
|
+
readonly categories?: MobileMenuCategory[];
|
|
5
|
+
/** Flat groups (custom / legacy). */
|
|
6
|
+
readonly groups?: NavigationMenuGroup[];
|
|
7
|
+
readonly className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Mobile accordion menu. With categories: top-level "For Individuals", "For Organizations",
|
|
11
|
+
* "About Docthub" — each expands to show nested groups. With flat groups: legacy single-level.
|
|
12
|
+
*/
|
|
13
|
+
export declare function NavigationMenuMobile({ categories, groups, className }: NavigationMenuMobileProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NavigationMenuGroup } from './types';
|
|
2
|
+
export declare const individualNavigationGroups: NavigationMenuGroup[];
|
|
3
|
+
/**
|
|
4
|
+
* Organization navigation presets — structure matches Figma Design System
|
|
5
|
+
* @see https://www.figma.com/design/R1AZDuYlTmwqN75mieBIMz (node 8194-3964)
|
|
6
|
+
*/
|
|
7
|
+
export declare const organizationNavigationGroups: NavigationMenuGroup[];
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface NavigationMenuItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
href?: string;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface NavigationMenuSection {
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
items: NavigationMenuItem[];
|
|
15
|
+
/**
|
|
16
|
+
* Zero-based index after which a visual separator should be rendered.
|
|
17
|
+
* Useful for splitting groups like links vs. meta pages within a section.
|
|
18
|
+
*/
|
|
19
|
+
hasSeparatorAfterIndex?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Optional footer area rendered below the section items in mobile layout.
|
|
22
|
+
* Useful for cards or grouped links that conceptually belong to this section.
|
|
23
|
+
*/
|
|
24
|
+
footer?: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export type NavigationMenuGroupVariant = "default" | "highlighted";
|
|
27
|
+
export interface NavigationMenuGroup {
|
|
28
|
+
id: string;
|
|
29
|
+
title: string;
|
|
30
|
+
sections: NavigationMenuSection[];
|
|
31
|
+
/**
|
|
32
|
+
* When set to `"highlighted"`, the group is rendered with a subtle
|
|
33
|
+
* background emphasis (used for the \"About Docthub\" column).
|
|
34
|
+
*/
|
|
35
|
+
variant?: NavigationMenuGroupVariant;
|
|
36
|
+
/**
|
|
37
|
+
* Optional footer area rendered at the bottom of the group, e.g. a CTA card.
|
|
38
|
+
*/
|
|
39
|
+
footer?: ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* Controls the default open state for the group in the mobile layout.
|
|
42
|
+
*/
|
|
43
|
+
defaultOpen?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* In mobile layout: "vertical" = label above tagline; "horizontal" = label and tagline on one line.
|
|
46
|
+
* Used when responsive menu shows both individual + organization groups.
|
|
47
|
+
*/
|
|
48
|
+
taglineLayout?: "vertical" | "horizontal";
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Mobile category for nested accordion: "For Individuals", "For Organizations", "About Docthub".
|
|
52
|
+
* Each category expands to show its groups (Explore, Professional Tools, etc.).
|
|
53
|
+
*/
|
|
54
|
+
export interface MobileMenuCategory {
|
|
55
|
+
id: string;
|
|
56
|
+
title: string;
|
|
57
|
+
groups: NavigationMenuGroup[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* High-level menu presets that the navigation component can render.
|
|
61
|
+
* When `groups` is not provided, the `variant` determines which preset
|
|
62
|
+
* structure is used.
|
|
63
|
+
*/
|
|
64
|
+
export type DoctNavigationMenuVariant = "individual" | "organization";
|
|
65
|
+
export interface DoctNavigationMenuProps {
|
|
66
|
+
/**
|
|
67
|
+
* Optional preset variant. When provided and `groups` is omitted,
|
|
68
|
+
* the component will render a predefined navigation structure that
|
|
69
|
+
* matches the Docthub design system for the given audience.
|
|
70
|
+
*/
|
|
71
|
+
variant?: DoctNavigationMenuVariant;
|
|
72
|
+
/**
|
|
73
|
+
* Fully custom navigation structure. When provided, this takes
|
|
74
|
+
* precedence over the `variant` presets.
|
|
75
|
+
*/
|
|
76
|
+
groups?: NavigationMenuGroup[];
|
|
77
|
+
className?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Optional override to force mobile or desktop layout, primarily for stories
|
|
80
|
+
* and tests. When undefined, the layout is derived from `useIsMobile`.
|
|
81
|
+
*/
|
|
82
|
+
isMobileOverride?: boolean;
|
|
83
|
+
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
3
2
|
import * as React from "react";
|
|
4
3
|
declare const avatarVariants: (props?: ({
|
|
5
4
|
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
6
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
export interface AvatarProps extends React.ComponentPropsWithoutRef<
|
|
6
|
+
export interface AvatarProps extends React.ComponentPropsWithoutRef<"span">, VariantProps<typeof avatarVariants> {
|
|
8
7
|
}
|
|
9
8
|
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
10
|
-
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<
|
|
11
|
-
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<
|
|
9
|
+
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
10
|
+
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
12
11
|
export { Avatar, AvatarImage, AvatarFallback };
|
|
@@ -4,7 +4,7 @@ declare const DoctButtonVariants: (props?: ({
|
|
|
4
4
|
variant?: "default" | "error" | "disabled" | "secondary" | "primary" | "blue" | "success" | "warning" | "informative" | "secondary-error" | "secondary-success" | "secondary-warning" | "secondary-informative" | "outline" | "outline-error" | "outline-success" | "outline-warning" | "outline-informative" | "ghost" | "ghost-error" | "ghost-success" | "ghost-warning" | "ghost-informative" | "brandBlue" | null | undefined;
|
|
5
5
|
size?: "small" | "medium" | "large" | "icon.large" | "icon.medium" | "icon.small" | null | undefined;
|
|
6
6
|
iconSize?: "small" | "medium" | "large" | null | undefined;
|
|
7
|
-
iconPosition?: "
|
|
7
|
+
iconPosition?: "left" | "right" | null | undefined;
|
|
8
8
|
fullWidth?: boolean | null | undefined;
|
|
9
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
10
|
interface DoctButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof DoctButtonVariants> {
|
|
@@ -1,8 +1,23 @@
|
|
|
1
|
-
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
export interface CheckboxProps extends React.ComponentPropsWithoutRef<
|
|
2
|
+
export interface CheckboxProps extends Omit<React.ComponentPropsWithoutRef<"span">, "onChange"> {
|
|
3
|
+
/** Custom fill color when checked (CSS color value). Falls back to the `--color-primary` theme token. */
|
|
4
4
|
color?: string;
|
|
5
|
+
/** Border color override. Defaults to the `color` prop value. */
|
|
5
6
|
borderColor?: string;
|
|
7
|
+
/** Checked state. Pass `"indeterminate"` for a mixed state. */
|
|
8
|
+
checked?: boolean | "indeterminate";
|
|
9
|
+
/** Initial checked state for uncontrolled usage. */
|
|
10
|
+
defaultChecked?: boolean;
|
|
11
|
+
/** Callback fired when the checked state changes. */
|
|
12
|
+
onCheckedChange?: (checked: boolean | "indeterminate") => void;
|
|
13
|
+
/** Whether the checkbox is disabled. */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** Whether the checkbox must be checked before form submission. */
|
|
16
|
+
required?: boolean;
|
|
17
|
+
/** Form field name. */
|
|
18
|
+
name?: string;
|
|
19
|
+
/** Form field value. */
|
|
20
|
+
value?: string;
|
|
6
21
|
}
|
|
7
|
-
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<
|
|
22
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLSpanElement>>;
|
|
8
23
|
export { Checkbox };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
declare const Collapsible: React.ForwardRefExoticComponent<
|
|
4
|
-
declare const CollapsibleTrigger: React.ForwardRefExoticComponent<
|
|
5
|
-
declare const CollapsibleContent: React.ForwardRefExoticComponent<Omit<
|
|
2
|
+
declare const Collapsible: React.ForwardRefExoticComponent<Omit<import('@base-ui/react').CollapsibleRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const CollapsibleTrigger: React.ForwardRefExoticComponent<Omit<import('@base-ui/react').CollapsibleTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
declare const CollapsibleContent: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').CollapsiblePanelProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
5
|
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
interface DialogProps {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
defaultOpen?: boolean;
|
|
5
|
+
onOpenChange?: (open: boolean) => void;
|
|
6
|
+
modal?: boolean;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const Dialog: React.FC<DialogProps>;
|
|
10
|
+
interface DialogTriggerProps extends React.ComponentPropsWithoutRef<"button"> {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
declare const DialogPortal: React.ForwardRefExoticComponent<Omit<import('@base-ui/react').DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
interface DialogCloseProps extends React.ComponentPropsWithoutRef<"button"> {
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
20
|
declare const sizeClasses: {
|
|
9
21
|
xs: string;
|
|
10
22
|
sm: string;
|
|
@@ -14,16 +26,18 @@ declare const sizeClasses: {
|
|
|
14
26
|
"2xl": string;
|
|
15
27
|
full: string;
|
|
16
28
|
};
|
|
17
|
-
|
|
18
|
-
|
|
29
|
+
type DialogContentProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
30
|
+
closeOnOutsideClick?: boolean;
|
|
31
|
+
initialFocusRef?: React.RefObject<HTMLElement>;
|
|
32
|
+
size?: keyof typeof sizeClasses;
|
|
33
|
+
showCloseButton?: boolean;
|
|
34
|
+
closeOnEscape?: boolean;
|
|
35
|
+
};
|
|
36
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
19
37
|
closeOnOutsideClick?: boolean;
|
|
20
|
-
/** Initial focus element ref */
|
|
21
38
|
initialFocusRef?: React.RefObject<HTMLElement>;
|
|
22
|
-
/** Size preset */
|
|
23
39
|
size?: keyof typeof sizeClasses;
|
|
24
|
-
/** Show close button */
|
|
25
40
|
showCloseButton?: boolean;
|
|
26
|
-
/** Close on Escape key */
|
|
27
41
|
closeOnEscape?: boolean;
|
|
28
42
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
29
43
|
declare const DialogHeader: {
|
|
@@ -34,6 +48,7 @@ declare const DialogFooter: {
|
|
|
34
48
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
35
49
|
displayName: string;
|
|
36
50
|
};
|
|
37
|
-
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<
|
|
38
|
-
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<
|
|
51
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').DialogTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
52
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').DialogDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
39
53
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
54
|
+
export type { DialogProps, DialogContentProps };
|
|
@@ -1,25 +1,40 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Menu } from '@base-ui/react/menu';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
declare const DropdownMenu:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare const
|
|
8
|
-
declare const
|
|
9
|
-
declare const
|
|
3
|
+
declare const DropdownMenu: <Payload>(props: Menu.Root.Props<Payload>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
interface DropdownMenuTriggerProps extends React.ComponentPropsWithoutRef<"button"> {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<Omit<import('@base-ui/react').ContextMenuGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DropdownMenuPortal: React.ForwardRefExoticComponent<Omit<import('@base-ui/react').ContextMenuPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const DropdownMenuSub: typeof Menu.SubmenuRoot;
|
|
11
|
+
declare const DropdownMenuRadioGroup: React.NamedExoticComponent<Omit<import('@base-ui/react').ContextMenuRadioGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ContextMenuSubmenuTriggerProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & {
|
|
10
13
|
inset?: boolean;
|
|
11
|
-
} & React.RefAttributes<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
15
|
+
interface DropdownMenuSubContentProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
16
|
+
sideOffset?: number;
|
|
17
|
+
alignOffset?: number;
|
|
18
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
19
|
+
align?: "start" | "center" | "end";
|
|
20
|
+
}
|
|
21
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
interface DropdownMenuContentProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
23
|
+
sideOffset?: number;
|
|
24
|
+
alignOffset?: number;
|
|
25
|
+
align?: "start" | "center" | "end";
|
|
26
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
27
|
+
}
|
|
28
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ContextMenuItemProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & {
|
|
15
30
|
inset?: boolean;
|
|
16
|
-
} & React.RefAttributes<
|
|
17
|
-
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<
|
|
18
|
-
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<
|
|
19
|
-
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<
|
|
31
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
32
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ContextMenuCheckboxItemProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
33
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ContextMenuRadioItemProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
34
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
20
35
|
inset?: boolean;
|
|
21
36
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
-
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<
|
|
37
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
38
|
declare const DropdownMenuShortcut: {
|
|
24
39
|
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
25
40
|
displayName: string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
2
|
import * as React from "react";
|
|
4
|
-
declare const Label: React.ForwardRefExoticComponent<
|
|
3
|
+
declare const Label: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<HTMLLabelElement> & VariantProps<(props?: import('class-variance-authority/types').ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
4
|
export { Label };
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Popover as BasePopover } from '@base-ui/react/popover';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
declare const Popover:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
declare const Popover: typeof BasePopover.Root;
|
|
4
|
+
interface PopoverTriggerProps extends React.ComponentPropsWithoutRef<"button"> {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
render?: React.ReactElement;
|
|
7
|
+
}
|
|
8
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const PopoverAnchor: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
interface PopoverContentProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
11
|
+
sideOffset?: number;
|
|
12
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
13
|
+
align?: "start" | "center" | "end";
|
|
14
|
+
}
|
|
15
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
16
|
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
type ColorVariant = "primary" | "secondary" | "success" | "error" | "warning" | "info";
|
|
4
3
|
type ProgressVariant = "determinate" | "indeterminate" | "buffer" | "query";
|
|
5
|
-
export interface ProgressProps extends Omit<React.ComponentPropsWithoutRef<
|
|
6
|
-
/** Progress value between 0-100 */
|
|
4
|
+
export interface ProgressProps extends Omit<React.ComponentPropsWithoutRef<"div">, "color"> {
|
|
7
5
|
value?: number;
|
|
8
|
-
/** Buffer value for buffer variant (0-100) */
|
|
9
6
|
valueBuffer?: number;
|
|
10
|
-
/** Progress variant */
|
|
11
7
|
variant?: ProgressVariant;
|
|
12
|
-
/** Color variant or custom color */
|
|
13
8
|
color?: ColorVariant | string;
|
|
14
|
-
/** Custom color (overrides color variant) */
|
|
15
9
|
customColor?: string;
|
|
16
|
-
/** Show percentage label */
|
|
17
10
|
showLabel?: boolean;
|
|
18
|
-
/** Custom label text or formatter function */
|
|
19
11
|
label?: string | ((value: number) => string);
|
|
20
12
|
}
|
|
21
13
|
declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
interface RadioGroupProps extends Omit<React.ComponentPropsWithoutRef<"div">, "defaultValue" | "value"> {
|
|
3
|
+
defaultValue?: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
onValueChange?: (value: string) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
name?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
orientation?: "horizontal" | "vertical";
|
|
10
|
+
}
|
|
11
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
interface RadioGroupItemProps extends Omit<React.ComponentPropsWithoutRef<"span">, "value"> {
|
|
13
|
+
value: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLSpanElement>>;
|
|
5
17
|
export { RadioGroup, RadioGroupItem };
|
|
@@ -1,13 +1,65 @@
|
|
|
1
|
-
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Props for the single-value Select component.
|
|
4
|
+
*
|
|
5
|
+
* This wrapper intentionally supports only string values (or null) even though
|
|
6
|
+
* Base UI Select can handle arrays and other value types.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* The callback signatures match Radix UI for backward compatibility:
|
|
10
|
+
* - `onValueChange` receives only the value (string), not Base UI's eventDetails
|
|
11
|
+
* - `onOpenChange` receives only the boolean state, not Base UI's eventDetails
|
|
12
|
+
*/
|
|
13
|
+
interface SelectProps {
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
value?: string;
|
|
16
|
+
defaultValue?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Callback fired when the selected value changes.
|
|
19
|
+
* Receives only the new value for Radix UI compatibility.
|
|
20
|
+
*/
|
|
21
|
+
onValueChange?: (value: string) => void;
|
|
22
|
+
open?: boolean;
|
|
23
|
+
defaultOpen?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Callback fired when the dropdown open state changes.
|
|
26
|
+
* Receives only the boolean open state for Radix UI compatibility.
|
|
27
|
+
*/
|
|
28
|
+
onOpenChange?: (open: boolean) => void;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
required?: boolean;
|
|
31
|
+
name?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Select root component that wraps Base UI Select.Root.
|
|
35
|
+
*
|
|
36
|
+
* This component adapts Base UI's callback signatures to match Radix UI:
|
|
37
|
+
* - Strips the `eventDetails` parameter from `onValueChange`
|
|
38
|
+
* - Strips the `eventDetails` parameter from `onOpenChange`
|
|
39
|
+
*
|
|
40
|
+
* This ensures backward compatibility with existing Radix UI code.
|
|
41
|
+
*/
|
|
42
|
+
declare const Select: React.FC<SelectProps>;
|
|
43
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<Omit<import('@base-ui/react').SelectGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
44
|
+
interface SelectValueProps extends React.ComponentPropsWithoutRef<"span"> {
|
|
45
|
+
placeholder?: string;
|
|
46
|
+
}
|
|
47
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
48
|
+
interface SelectTriggerProps extends React.ComponentPropsWithoutRef<"button"> {
|
|
49
|
+
asChild?: boolean;
|
|
50
|
+
}
|
|
51
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
52
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
54
|
+
interface SelectContentProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
55
|
+
position?: "item-aligned" | "popper";
|
|
56
|
+
}
|
|
57
|
+
declare const SelectContent: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
58
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').SelectGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
59
|
+
interface SelectItemProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
60
|
+
value: string;
|
|
61
|
+
disabled?: boolean;
|
|
62
|
+
}
|
|
63
|
+
declare const SelectItem: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLElement>>;
|
|
64
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & React.RefAttributes<HTMLHRElement>>;
|
|
13
65
|
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
declare const Separator: React.ForwardRefExoticComponent<Omit<
|
|
2
|
+
declare const Separator: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
3
|
export { Separator };
|
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
3
2
|
import * as React from "react";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
interface SheetProps {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
defaultOpen?: boolean;
|
|
6
|
+
onOpenChange?: (open: boolean) => void;
|
|
7
|
+
modal?: boolean;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const Sheet: React.FC<SheetProps>;
|
|
11
|
+
interface SheetTriggerProps extends React.ComponentPropsWithoutRef<"button"> {
|
|
12
|
+
asChild?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const SheetTrigger: React.ForwardRefExoticComponent<SheetTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
interface SheetCloseProps extends React.ComponentPropsWithoutRef<"button"> {
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const SheetClose: React.ForwardRefExoticComponent<SheetCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
declare const SheetPortal: React.ForwardRefExoticComponent<Omit<import('@base-ui/react').DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
21
|
declare const sheetVariants: (props?: ({
|
|
10
|
-
side?: "top" | "
|
|
22
|
+
side?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
11
23
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
|
-
interface SheetContentProps extends React.ComponentPropsWithoutRef<
|
|
24
|
+
interface SheetContentProps extends React.ComponentPropsWithoutRef<"div">, VariantProps<typeof sheetVariants> {
|
|
13
25
|
}
|
|
14
26
|
declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
27
|
declare const SheetHeader: {
|
|
@@ -20,6 +32,6 @@ declare const SheetFooter: {
|
|
|
20
32
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
21
33
|
displayName: string;
|
|
22
34
|
};
|
|
23
|
-
declare const SheetTitle: React.ForwardRefExoticComponent<Omit<
|
|
24
|
-
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<
|
|
35
|
+
declare const SheetTitle: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').DialogTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
36
|
+
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').DialogDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
25
37
|
export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
@@ -42,7 +42,7 @@ declare const SidebarInset: React.ForwardRefExoticComponent<Omit<React.DetailedH
|
|
|
42
42
|
declare const SidebarInput: React.ForwardRefExoticComponent<Omit<Omit<import('./input').InputProps, "ref"> & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
43
43
|
declare const SidebarHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
44
44
|
declare const SidebarFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
-
declare const SidebarSeparator: React.ForwardRefExoticComponent<Omit<Omit<import('@
|
|
45
|
+
declare const SidebarSeparator: React.ForwardRefExoticComponent<Omit<Omit<Omit<import('@base-ui/react').SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
46
46
|
declare const SidebarContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
47
47
|
declare const SidebarGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
48
48
|
declare const SidebarGroupLabel: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
declare const Tabs: React.ForwardRefExoticComponent<
|
|
4
|
-
declare const TabsList: React.ForwardRefExoticComponent<Omit<
|
|
2
|
+
declare const Tabs: React.ForwardRefExoticComponent<Omit<import('@base-ui/react').TabsRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const TabsList: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').TabsListProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
5
4
|
variant?: "default" | "custom";
|
|
6
5
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<
|
|
6
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').TabsTabProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & {
|
|
8
7
|
variant?: "default" | "custom";
|
|
9
8
|
showSeparator?: boolean;
|
|
10
9
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
-
declare const TabsContent: React.ForwardRefExoticComponent<Omit<
|
|
10
|
+
declare const TabsContent: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').TabsPanelProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
11
|
export { Tabs, TabsList, TabsTrigger, TabsContent };
|