@mithrl/design-system 0.1.0 → 0.2.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/components/composer/Composer.d.ts +41 -0
- package/dist/components/composer/ComposerViewTransition.d.ts +23 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +2 -1
- package/dist/components/global-app-bar/GlobalAppBar.d.ts +45 -4
- package/dist/components/navigation-item/NavigationItem.d.ts +45 -0
- package/dist/components/popover-surface/PopoverSurface.d.ts +8 -0
- package/dist/components/project-menu/ProjectMenu.d.ts +41 -0
- package/dist/components/resizable-panels/ResizablePanels.d.ts +63 -0
- package/dist/components/workspace-navigation/WorkspaceNavigation.d.ts +94 -0
- package/dist/index.d.ts +17 -1
- package/dist/index.js +2319 -1197
- package/dist/patterns/workspace-app-shell/WorkspaceAppShell.d.ts +105 -0
- package/dist/styles.css +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
export type ComposerMode = "guided" | "autopilot";
|
|
3
|
+
export type ComposerStatus = "idle" | "sending" | "streaming";
|
|
4
|
+
export type ComposerPreviewState = "hover" | "focus";
|
|
5
|
+
export type ComposerLabels = {
|
|
6
|
+
input: string;
|
|
7
|
+
add: string;
|
|
8
|
+
send: string;
|
|
9
|
+
stop: string;
|
|
10
|
+
sending: string;
|
|
11
|
+
guided: string;
|
|
12
|
+
autopilot: string;
|
|
13
|
+
};
|
|
14
|
+
export type ComposerProps = {
|
|
15
|
+
value?: string;
|
|
16
|
+
defaultValue?: string;
|
|
17
|
+
onValueChange?: (value: string) => void;
|
|
18
|
+
onSubmitPrompt?: (value: string, mode: ComposerMode) => void;
|
|
19
|
+
onStop?: () => void;
|
|
20
|
+
onAdd?: () => void;
|
|
21
|
+
mode?: ComposerMode;
|
|
22
|
+
defaultMode?: ComposerMode;
|
|
23
|
+
onModeChange?: (mode: ComposerMode) => void;
|
|
24
|
+
status?: ComposerStatus;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
readOnly?: boolean;
|
|
27
|
+
required?: boolean;
|
|
28
|
+
autoFocus?: boolean;
|
|
29
|
+
name?: string;
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
labels?: Partial<ComposerLabels>;
|
|
32
|
+
className?: string;
|
|
33
|
+
textareaClassName?: string;
|
|
34
|
+
"aria-describedby"?: string;
|
|
35
|
+
"data-preview-state"?: ComposerPreviewState;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Workspace conversation input with attachment, Guided/Autopilot selection,
|
|
39
|
+
* submission, generation interruption, content growth, and bounded scrolling.
|
|
40
|
+
*/
|
|
41
|
+
export declare const Composer: import("react").ForwardRefExoticComponent<ComposerProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
export type ComposerView = "composer" | "attachments";
|
|
3
|
+
export type ComposerViewTransitionProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
4
|
+
/** Active view. File acquisition state remains owned by the consumer. */
|
|
5
|
+
view: ComposerView;
|
|
6
|
+
/** The production Composer instance shown at rest. */
|
|
7
|
+
composer: ReactNode;
|
|
8
|
+
/** Consumer-owned file acquisition and selection content. */
|
|
9
|
+
attachments: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Bottom-anchored transition between Composer and consumer-owned attachment
|
|
13
|
+
* content. The shared surface expands upward while both view layers move only
|
|
14
|
+
* 12px, preserving the approved vertical carousel behavior.
|
|
15
|
+
*/
|
|
16
|
+
export declare const ComposerViewTransition: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
17
|
+
/** Active view. File acquisition state remains owned by the consumer. */
|
|
18
|
+
view: ComposerView;
|
|
19
|
+
/** The production Composer instance shown at rest. */
|
|
20
|
+
composer: ReactNode;
|
|
21
|
+
/** Consumer-owned file acquisition and selection content. */
|
|
22
|
+
attachments: ReactNode;
|
|
23
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -2,8 +2,9 @@ import { Menu } from "@base-ui/react/menu";
|
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
4
4
|
|
|
5
|
+
|
|
5
6
|
export declare const dropdownMenuContentVariants: (props?: ({
|
|
6
|
-
width?: "compact" | "default" | "maximum" | null | undefined;
|
|
7
|
+
width?: "compact" | "default" | "maximum" | "trigger" | null | undefined;
|
|
7
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
9
|
export type DropdownMenuContentWidth = NonNullable<VariantProps<typeof dropdownMenuContentVariants>["width"]>;
|
|
9
10
|
export type DropdownMenuItemTone = "neutral" | "destructive";
|
|
@@ -1,10 +1,33 @@
|
|
|
1
|
-
import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type HTMLAttributes, type MouseEventHandler } from "react";
|
|
1
|
+
import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type HTMLAttributes, type MouseEventHandler, type ReactElement } from "react";
|
|
2
2
|
import { type AccountMenuProps } from "../account-menu/AccountMenu";
|
|
3
3
|
import { type DropdownMenuProps } from "../dropdown-menu/DropdownMenu";
|
|
4
4
|
import { type ThemeMode } from "../switch/Switch";
|
|
5
|
+
import { type ProjectMenuProps } from "../project-menu/ProjectMenu";
|
|
5
6
|
|
|
6
7
|
type BrandLinkProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "children" | "className" | "href">;
|
|
7
8
|
type AccountButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-controls" | "aria-expanded" | "aria-haspopup" | "aria-label" | "children" | "className" | "onClick" | "type">;
|
|
9
|
+
type ProjectSelectorButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-label" | "children" | "className" | "onClick" | "title" | "type">;
|
|
10
|
+
export type GlobalAppBarProjectSelectorPresentation = "full" | "truncated" | "icon-only";
|
|
11
|
+
export type GlobalAppBarProjectSelector = {
|
|
12
|
+
/** Full project name preserved in the accessible name in every presentation. */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Responsive presentation selected by the owning App Shell. */
|
|
15
|
+
presentation?: GlobalAppBarProjectSelectorPresentation;
|
|
16
|
+
/** Optional explicit accessible name. Defaults to `Choose project: {name}`. */
|
|
17
|
+
label?: string;
|
|
18
|
+
/** Called when project selection is requested. */
|
|
19
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
20
|
+
/** Safe native attributes for the project-selector button. */
|
|
21
|
+
buttonProps?: ProjectSelectorButtonProps;
|
|
22
|
+
/** Optional searchable menu opened by the selector trigger. */
|
|
23
|
+
menu?: Omit<ProjectMenuProps, "portalContainer">;
|
|
24
|
+
/** Controlled project-menu visibility. */
|
|
25
|
+
menuOpen?: DropdownMenuProps["open"];
|
|
26
|
+
/** Initial project-menu visibility for uncontrolled use. */
|
|
27
|
+
defaultMenuOpen?: DropdownMenuProps["defaultOpen"];
|
|
28
|
+
/** Called when project-menu visibility changes. */
|
|
29
|
+
onMenuOpenChange?: DropdownMenuProps["onOpenChange"];
|
|
30
|
+
};
|
|
8
31
|
export type GlobalAppBarProps = Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
9
32
|
/** Home destination used by the official Mithrl brand action. */
|
|
10
33
|
brandHref?: string;
|
|
@@ -36,11 +59,20 @@ export type GlobalAppBarProps = Omit<HTMLAttributes<HTMLElement>, "children"> &
|
|
|
36
59
|
onAccountMenuOpenChange?: DropdownMenuProps["onOpenChange"];
|
|
37
60
|
/** Additional native attributes for the account-menu button. */
|
|
38
61
|
accountButtonProps?: AccountButtonProps;
|
|
62
|
+
/**
|
|
63
|
+
* Workspace-only App Shell controls. Each control keeps its own semantics;
|
|
64
|
+
* Global App Bar owns only their approved order and alignment.
|
|
65
|
+
*/
|
|
66
|
+
workspaceControls?: {
|
|
67
|
+
navigationToggle: ReactElement;
|
|
68
|
+
projectSelector: GlobalAppBarProjectSelector;
|
|
69
|
+
explorerToggle: ReactElement;
|
|
70
|
+
};
|
|
39
71
|
};
|
|
40
72
|
/**
|
|
41
|
-
* Persistent
|
|
42
|
-
*
|
|
43
|
-
*
|
|
73
|
+
* Persistent application anchor. Home keeps the minimal brand, theme, and
|
|
74
|
+
* account contract; Workspace adds structural panel controls and project
|
|
75
|
+
* context without introducing a second App Bar component.
|
|
44
76
|
*/
|
|
45
77
|
export declare const GlobalAppBar: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
46
78
|
/** Home destination used by the official Mithrl brand action. */
|
|
@@ -73,5 +105,14 @@ export declare const GlobalAppBar: import("react").ForwardRefExoticComponent<Omi
|
|
|
73
105
|
onAccountMenuOpenChange?: DropdownMenuProps["onOpenChange"];
|
|
74
106
|
/** Additional native attributes for the account-menu button. */
|
|
75
107
|
accountButtonProps?: AccountButtonProps;
|
|
108
|
+
/**
|
|
109
|
+
* Workspace-only App Shell controls. Each control keeps its own semantics;
|
|
110
|
+
* Global App Bar owns only their approved order and alignment.
|
|
111
|
+
*/
|
|
112
|
+
workspaceControls?: {
|
|
113
|
+
navigationToggle: ReactElement;
|
|
114
|
+
projectSelector: GlobalAppBarProjectSelector;
|
|
115
|
+
explorerToggle: ReactElement;
|
|
116
|
+
};
|
|
76
117
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
77
118
|
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type MouseEventHandler } from "react";
|
|
2
|
+
import { type IconGlyphComponent } from "../icon/Icon";
|
|
3
|
+
|
|
4
|
+
export declare const navigationItemVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
5
|
+
export type NavigationItemPreviewState = "hover" | "pressed" | "focus";
|
|
6
|
+
type LeadingIcon = {
|
|
7
|
+
/** A recognized destination glyph rendered through the Icon primitive. */
|
|
8
|
+
leading: "icon";
|
|
9
|
+
icon: IconGlyphComponent;
|
|
10
|
+
};
|
|
11
|
+
type LeadingQuestion = {
|
|
12
|
+
/** A text-led question destination with no decorative leading marker. */
|
|
13
|
+
leading?: "question";
|
|
14
|
+
icon?: never;
|
|
15
|
+
};
|
|
16
|
+
type NavigationItemCommonProps = (LeadingIcon | LeadingQuestion) & {
|
|
17
|
+
/** The required visible and accessible destination name. */
|
|
18
|
+
label: string;
|
|
19
|
+
/** Controlled current/selected state supplied by the owning navigation. */
|
|
20
|
+
selected?: boolean;
|
|
21
|
+
/** Shows the approved text shimmer and trailing Progress Indicator. */
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
/** Adds the question-row overflow action as a sibling interactive control. */
|
|
24
|
+
onMenuAction?: MouseEventHandler<HTMLButtonElement>;
|
|
25
|
+
/** Accessible name for the optional question-row overflow action. */
|
|
26
|
+
menuActionLabel?: string;
|
|
27
|
+
/** Storybook-only hook for reviewing native CSS states. */
|
|
28
|
+
"data-preview-state"?: NavigationItemPreviewState;
|
|
29
|
+
};
|
|
30
|
+
type NavigationItemAnchorProps = NavigationItemCommonProps & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "aria-current" | "children" | "href"> & {
|
|
31
|
+
/** Stable navigation destination. Anchors are the preferred contract. */
|
|
32
|
+
href: string;
|
|
33
|
+
};
|
|
34
|
+
type NavigationItemButtonProps = NavigationItemCommonProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-pressed" | "children" | "disabled" | "type"> & {
|
|
35
|
+
/** Omit href only for an in-place Workspace selection. */
|
|
36
|
+
href?: never;
|
|
37
|
+
};
|
|
38
|
+
export type NavigationItemProps = NavigationItemAnchorProps | NavigationItemButtonProps;
|
|
39
|
+
/**
|
|
40
|
+
* A compact destination row for persistent product navigation. Stable routes
|
|
41
|
+
* render as native anchors; the button form is reserved for in-place
|
|
42
|
+
* selection. Routing, authorization, and panel layout remain owner concerns.
|
|
43
|
+
*/
|
|
44
|
+
export declare const NavigationItem: import("react").ForwardRefExoticComponent<NavigationItemProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
|
|
3
|
+
export type PopoverSurfaceProps = HTMLAttributes<HTMLDivElement>;
|
|
4
|
+
/**
|
|
5
|
+
* Visual shell for floating content. Positioning, focus, keyboard interaction,
|
|
6
|
+
* dismissal, and semantic roles remain owned by the consuming behavior layer.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PopoverSurface: import("react").ForwardRefExoticComponent<PopoverSurfaceProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type DropdownMenuContentProps } from "../dropdown-menu/DropdownMenu";
|
|
3
|
+
|
|
4
|
+
export type ProjectMenuProject = {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type ProjectMenuLabels = {
|
|
10
|
+
menu: string;
|
|
11
|
+
search: string;
|
|
12
|
+
searchPlaceholder: string;
|
|
13
|
+
empty: ReactNode;
|
|
14
|
+
browseAll: ReactNode;
|
|
15
|
+
};
|
|
16
|
+
export type ProjectMenuProps = Omit<DropdownMenuContentProps, "aria-label" | "children" | "width"> & {
|
|
17
|
+
projects: ProjectMenuProject[];
|
|
18
|
+
selectedProjectId?: string;
|
|
19
|
+
query?: string;
|
|
20
|
+
defaultQuery?: string;
|
|
21
|
+
onQueryChange?: (query: string) => void;
|
|
22
|
+
onProjectSelect?: (project: ProjectMenuProject) => void;
|
|
23
|
+
browseAllHref?: string;
|
|
24
|
+
onBrowseAll?: () => void;
|
|
25
|
+
labels?: Partial<ProjectMenuLabels>;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Searchable project-navigation content for the Global App Bar project
|
|
29
|
+
* selector. The external trigger and open state remain owned by Global App Bar.
|
|
30
|
+
*/
|
|
31
|
+
export declare const ProjectMenu: import("react").ForwardRefExoticComponent<Omit<DropdownMenuContentProps, "aria-label" | "children" | "width"> & {
|
|
32
|
+
projects: ProjectMenuProject[];
|
|
33
|
+
selectedProjectId?: string;
|
|
34
|
+
query?: string;
|
|
35
|
+
defaultQuery?: string;
|
|
36
|
+
onQueryChange?: (query: string) => void;
|
|
37
|
+
onProjectSelect?: (project: ProjectMenuProject) => void;
|
|
38
|
+
browseAllHref?: string;
|
|
39
|
+
onBrowseAll?: () => void;
|
|
40
|
+
labels?: Partial<ProjectMenuLabels>;
|
|
41
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
export type ResizablePanelDirection = "horizontal";
|
|
4
|
+
export type ResizablePanelMinimum = "standard" | "compact" | number;
|
|
5
|
+
export type ResizablePanelProps = Omit<HTMLAttributes<HTMLDivElement>, "id"> & {
|
|
6
|
+
/** Stable identity referenced by the splitter's aria-controls contract. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Pixel minimum or the approved Primary standard/compact policy. */
|
|
9
|
+
minSize: ResizablePanelMinimum;
|
|
10
|
+
/** Optional visible heading that names this panel region. */
|
|
11
|
+
labelId?: string;
|
|
12
|
+
};
|
|
13
|
+
export type ResizableHandleProps = Omit<HTMLAttributes<HTMLDivElement>, "role" | "tabIndex" | "aria-controls" | "aria-orientation" | "aria-valuemin" | "aria-valuemax" | "aria-valuenow">;
|
|
14
|
+
export type ResizablePanelGroupProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "dir" | "onChange"> & {
|
|
15
|
+
/** V1 supports only the approved horizontal Primary–Secondary layout. */
|
|
16
|
+
direction?: ResizablePanelDirection;
|
|
17
|
+
/** Primary share as a percentage of the available panel space. */
|
|
18
|
+
value?: number;
|
|
19
|
+
/** Initial Primary share for uncontrolled use. Defaults to 60. */
|
|
20
|
+
defaultValue?: number;
|
|
21
|
+
/** Reports every pointer or keyboard resize. */
|
|
22
|
+
onValueChange?: (value: number) => void;
|
|
23
|
+
/** Reports the final pointer value or each committed keyboard step. */
|
|
24
|
+
onValueCommit?: (value: number) => void;
|
|
25
|
+
/** Exactly Primary Panel, Handle, and Secondary Panel in that order. */
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Content-agnostic region used as the Primary or Secondary child of a
|
|
30
|
+
* ResizablePanelGroup. Surface, header, padding, and scroll ownership remain
|
|
31
|
+
* with the panel content supplied by the consumer.
|
|
32
|
+
*/
|
|
33
|
+
export declare const ResizablePanel: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "id"> & {
|
|
34
|
+
/** Stable identity referenced by the splitter's aria-controls contract. */
|
|
35
|
+
id: string;
|
|
36
|
+
/** Pixel minimum or the approved Primary standard/compact policy. */
|
|
37
|
+
minSize: ResizablePanelMinimum;
|
|
38
|
+
/** Optional visible heading that names this panel region. */
|
|
39
|
+
labelId?: string;
|
|
40
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
41
|
+
/**
|
|
42
|
+
* Invisible 8px window splitter. Feedback is rendered only on the two panel
|
|
43
|
+
* edges adjacent to the gap; the target itself never becomes a visible rail.
|
|
44
|
+
*/
|
|
45
|
+
export declare const ResizableHandle: import("react").ForwardRefExoticComponent<ResizableHandleProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
46
|
+
/**
|
|
47
|
+
* Horizontal two-panel layout that owns split measurement, constraints, and
|
|
48
|
+
* direct manipulation while leaving visibility and persistence to App Shell.
|
|
49
|
+
*/
|
|
50
|
+
export declare const ResizablePanelGroup: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "dir" | "onChange"> & {
|
|
51
|
+
/** V1 supports only the approved horizontal Primary–Secondary layout. */
|
|
52
|
+
direction?: ResizablePanelDirection;
|
|
53
|
+
/** Primary share as a percentage of the available panel space. */
|
|
54
|
+
value?: number;
|
|
55
|
+
/** Initial Primary share for uncontrolled use. Defaults to 60. */
|
|
56
|
+
defaultValue?: number;
|
|
57
|
+
/** Reports every pointer or keyboard resize. */
|
|
58
|
+
onValueChange?: (value: number) => void;
|
|
59
|
+
/** Reports the final pointer value or each committed keyboard step. */
|
|
60
|
+
onValueCommit?: (value: number) => void;
|
|
61
|
+
/** Exactly Primary Panel, Handle, and Secondary Panel in that order. */
|
|
62
|
+
children: ReactNode;
|
|
63
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type HTMLAttributes, type MouseEvent, type MouseEventHandler } from "react";
|
|
3
|
+
import { type IconButtonProps } from "../icon-button/IconButton";
|
|
4
|
+
|
|
5
|
+
export declare const workspaceNavigationVariants: (props?: ({
|
|
6
|
+
presentation?: "inline" | "overlay" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export type WorkspaceNavigationPresentation = NonNullable<VariantProps<typeof workspaceNavigationVariants>["presentation"]>;
|
|
9
|
+
export type WorkspaceNavigationQuestion = {
|
|
10
|
+
/** Stable owner-defined identity used for controlled selection. */
|
|
11
|
+
id: string;
|
|
12
|
+
/** Visible destination name. Long values use Navigation Item's text fade. */
|
|
13
|
+
label: string;
|
|
14
|
+
/** Stable route. Omit only when the owner performs an in-place selection. */
|
|
15
|
+
href?: string;
|
|
16
|
+
/** Uses the approved text shimmer and Progress Indicator. */
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
};
|
|
19
|
+
type NavigationClick = MouseEvent<HTMLAnchorElement | HTMLButtonElement>;
|
|
20
|
+
type MenuClick = MouseEvent<HTMLButtonElement>;
|
|
21
|
+
export type WorkspaceNavigationProps = Omit<HTMLAttributes<HTMLElement>, "children" | "onSelect"> & VariantProps<typeof workspaceNavigationVariants> & {
|
|
22
|
+
/** Accessible name for the navigation landmark. */
|
|
23
|
+
"aria-label"?: string;
|
|
24
|
+
/** Destination for the persistent collection-level route. */
|
|
25
|
+
allProjectsHref?: string;
|
|
26
|
+
/** Visible label for the collection-level route. */
|
|
27
|
+
allProjectsLabel?: string;
|
|
28
|
+
/** Visible label for the creation action. */
|
|
29
|
+
newQuestionLabel?: string;
|
|
30
|
+
/** Visible heading for the question destination region. */
|
|
31
|
+
questionsLabel?: string;
|
|
32
|
+
/** Controlled question destinations in display order. */
|
|
33
|
+
questions: readonly WorkspaceNavigationQuestion[];
|
|
34
|
+
/** Controlled current question identity. */
|
|
35
|
+
selectedQuestionId?: string;
|
|
36
|
+
/** Selects a question without prescribing router ownership. */
|
|
37
|
+
onQuestionSelect?: (question: WorkspaceNavigationQuestion, event: NavigationClick) => void;
|
|
38
|
+
/** Opens the product-owned menu for one question. */
|
|
39
|
+
onQuestionMenuAction?: (question: WorkspaceNavigationQuestion, event: MenuClick) => void;
|
|
40
|
+
/** Starts a new question. */
|
|
41
|
+
onNewQuestion: MouseEventHandler<HTMLButtonElement>;
|
|
42
|
+
/** Reports activation of the All Projects destination. */
|
|
43
|
+
onAllProjectsClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
44
|
+
/** Controls the bottom scroll affordance. Auto reflects real overflow. */
|
|
45
|
+
bottomFade?: "auto" | "always" | "never";
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Project-level destination panel for Workspace. It composes Navigation Item,
|
|
49
|
+
* Separator, Icon, and Progress Indicator through their public contracts.
|
|
50
|
+
* App Shell remains responsible for breakpoint selection and overlay placement.
|
|
51
|
+
*/
|
|
52
|
+
export declare const WorkspaceNavigation: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "children" | "onSelect"> & VariantProps<(props?: ({
|
|
53
|
+
presentation?: "inline" | "overlay" | null | undefined;
|
|
54
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
55
|
+
/** Accessible name for the navigation landmark. */
|
|
56
|
+
"aria-label"?: string;
|
|
57
|
+
/** Destination for the persistent collection-level route. */
|
|
58
|
+
allProjectsHref?: string;
|
|
59
|
+
/** Visible label for the collection-level route. */
|
|
60
|
+
allProjectsLabel?: string;
|
|
61
|
+
/** Visible label for the creation action. */
|
|
62
|
+
newQuestionLabel?: string;
|
|
63
|
+
/** Visible heading for the question destination region. */
|
|
64
|
+
questionsLabel?: string;
|
|
65
|
+
/** Controlled question destinations in display order. */
|
|
66
|
+
questions: readonly WorkspaceNavigationQuestion[];
|
|
67
|
+
/** Controlled current question identity. */
|
|
68
|
+
selectedQuestionId?: string;
|
|
69
|
+
/** Selects a question without prescribing router ownership. */
|
|
70
|
+
onQuestionSelect?: (question: WorkspaceNavigationQuestion, event: NavigationClick) => void;
|
|
71
|
+
/** Opens the product-owned menu for one question. */
|
|
72
|
+
onQuestionMenuAction?: (question: WorkspaceNavigationQuestion, event: MenuClick) => void;
|
|
73
|
+
/** Starts a new question. */
|
|
74
|
+
onNewQuestion: MouseEventHandler<HTMLButtonElement>;
|
|
75
|
+
/** Reports activation of the All Projects destination. */
|
|
76
|
+
onAllProjectsClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
77
|
+
/** Controls the bottom scroll affordance. Auto reflects real overflow. */
|
|
78
|
+
bottomFade?: "auto" | "always" | "never";
|
|
79
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
80
|
+
export type WorkspacePanelSide = "navigator" | "explorer";
|
|
81
|
+
export type WorkspacePanelToggleButtonProps = Omit<IconButtonProps, "icon" | "loading" | "size" | "variant"> & {
|
|
82
|
+
/** Identifies which App Shell panel the animated divider represents. */
|
|
83
|
+
side: WorkspacePanelSide;
|
|
84
|
+
/** Controlled visibility state. */
|
|
85
|
+
expanded: boolean;
|
|
86
|
+
};
|
|
87
|
+
/** App Bar control with the approved moving and shortening panel divider. */
|
|
88
|
+
export declare const WorkspacePanelToggleButton: import("react").ForwardRefExoticComponent<Omit<IconButtonProps, "icon" | "loading" | "size" | "variant"> & {
|
|
89
|
+
/** Identifies which App Shell panel the animated divider represents. */
|
|
90
|
+
side: WorkspacePanelSide;
|
|
91
|
+
/** Controlled visibility state. */
|
|
92
|
+
expanded: boolean;
|
|
93
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
94
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,10 @@ export { Button, buttonVariants } from "./components/button/Button";
|
|
|
3
3
|
export type { ButtonProps, ButtonSize, ButtonVariant, } from "./components/button/Button";
|
|
4
4
|
export { Icon, iconVariants } from "./components/icon/Icon";
|
|
5
5
|
export type { IconGlyphComponent, IconProps, IconSize, } from "./components/icon/Icon";
|
|
6
|
+
export { NavigationItem, navigationItemVariants, } from "./components/navigation-item/NavigationItem";
|
|
7
|
+
export type { NavigationItemPreviewState, NavigationItemProps, } from "./components/navigation-item/NavigationItem";
|
|
8
|
+
export { WorkspaceNavigation, WorkspacePanelToggleButton, workspaceNavigationVariants, } from "./components/workspace-navigation/WorkspaceNavigation";
|
|
9
|
+
export type { WorkspaceNavigationPresentation, WorkspaceNavigationProps, WorkspaceNavigationQuestion, WorkspacePanelSide, WorkspacePanelToggleButtonProps, } from "./components/workspace-navigation/WorkspaceNavigation";
|
|
6
10
|
export { IconButton, iconButtonVariants, } from "./components/icon-button/IconButton";
|
|
7
11
|
export type { IconButtonProps, IconButtonSize, IconButtonVariant, } from "./components/icon-button/IconButton";
|
|
8
12
|
export { SegmentedTabs, segmentedTabsVariants, } from "./components/segmented-tabs/SegmentedTabs";
|
|
@@ -19,6 +23,10 @@ export { TextField, textFieldVariants, } from "./components/text-field/TextField
|
|
|
19
23
|
export type { TextFieldPreviewState, TextFieldProps, TextFieldStatus, TextFieldSurface, } from "./components/text-field/TextField";
|
|
20
24
|
export { Textarea, textareaVariants } from "./components/textarea/Textarea";
|
|
21
25
|
export type { TextareaPreviewState, TextareaProps, TextareaResize, TextareaStatus, TextareaSurface, } from "./components/textarea/Textarea";
|
|
26
|
+
export { Composer } from "./components/composer/Composer";
|
|
27
|
+
export type { ComposerLabels, ComposerMode, ComposerPreviewState, ComposerProps, ComposerStatus, } from "./components/composer/Composer";
|
|
28
|
+
export { ComposerViewTransition } from "./components/composer/ComposerViewTransition";
|
|
29
|
+
export type { ComposerView, ComposerViewTransitionProps, } from "./components/composer/ComposerViewTransition";
|
|
22
30
|
export { Select, selectVariants } from "./components/select/Select";
|
|
23
31
|
export type { SelectPreviewState, SelectProps, SelectSize, } from "./components/select/Select";
|
|
24
32
|
export { Link, linkVariants } from "./components/link/Link";
|
|
@@ -49,10 +57,14 @@ export { Field } from "./components/field/Field";
|
|
|
49
57
|
export type { FieldControlProps, FieldControlStatus, FieldProps, FieldRenderProps, FieldSize, FieldState, } from "./components/field/Field";
|
|
50
58
|
export { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuLinkItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, dropdownMenuContentVariants, } from "./components/dropdown-menu/DropdownMenu";
|
|
51
59
|
export type { DropdownMenuContentProps, DropdownMenuContentWidth, DropdownMenuGroupProps, DropdownMenuItemProps, DropdownMenuItemTone, DropdownMenuLabelProps, DropdownMenuLinkItemProps, DropdownMenuProps, DropdownMenuSeparatorProps, DropdownMenuTriggerProps, } from "./components/dropdown-menu/DropdownMenu";
|
|
60
|
+
export { PopoverSurface } from "./components/popover-surface/PopoverSurface";
|
|
61
|
+
export type { PopoverSurfaceProps } from "./components/popover-surface/PopoverSurface";
|
|
62
|
+
export { ProjectMenu } from "./components/project-menu/ProjectMenu";
|
|
63
|
+
export type { ProjectMenuLabels, ProjectMenuProject, ProjectMenuProps, } from "./components/project-menu/ProjectMenu";
|
|
52
64
|
export { AccountMenu } from "./components/account-menu/AccountMenu";
|
|
53
65
|
export type { AccountMenuAction, AccountMenuProps, } from "./components/account-menu/AccountMenu";
|
|
54
66
|
export { GlobalAppBar } from "./components/global-app-bar/GlobalAppBar";
|
|
55
|
-
export type { GlobalAppBarProps } from "./components/global-app-bar/GlobalAppBar";
|
|
67
|
+
export type { GlobalAppBarProjectSelector, GlobalAppBarProjectSelectorPresentation, GlobalAppBarProps, } from "./components/global-app-bar/GlobalAppBar";
|
|
56
68
|
export { ProjectCard } from "./components/project-card/ProjectCard";
|
|
57
69
|
export type { ProjectCardActivity, ProjectCardCreator, ProjectCardMetric, ProjectCardPresentation, ProjectCardPreviewArtwork, ProjectCardPreviewState, ProjectCardProps, } from "./components/project-card/ProjectCard";
|
|
58
70
|
export { UploadQueue, UploadQueueItem } from "./components/upload-queue/UploadQueue";
|
|
@@ -65,3 +77,7 @@ export { FileDropzone } from "./components/file-dropzone/FileDropzone";
|
|
|
65
77
|
export type { FileDropzoneHandle, FileDropzoneProps, FileDropzoneRejection, FileDropzoneRejectionReason, FileDropzoneSelection, FileDropzoneSelectionSource, FileDropzoneState, } from "./components/file-dropzone/FileDropzone";
|
|
66
78
|
export { DialogBackdrop, DialogBody, DialogClose, DialogCloseButton, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogRoot, DialogTitle, DialogTrigger, DialogViewport, dialogPopupVariants, } from "./components/dialog/Dialog";
|
|
67
79
|
export type { DialogBackdropProps, DialogBodyProps, DialogCloseButtonProps, DialogCloseProps, DialogContentProps, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogPopupProps, DialogPortalProps, DialogRootProps, DialogSize, DialogTitleProps, DialogTriggerProps, DialogViewportProps, } from "./components/dialog/Dialog";
|
|
80
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from "./components/resizable-panels/ResizablePanels";
|
|
81
|
+
export type { ResizableHandleProps, ResizablePanelDirection, ResizablePanelGroupProps, ResizablePanelMinimum, ResizablePanelProps, } from "./components/resizable-panels/ResizablePanels";
|
|
82
|
+
export { WorkspaceAppShell } from "./patterns/workspace-app-shell/WorkspaceAppShell";
|
|
83
|
+
export type { WorkspaceAppShellLayout, WorkspaceAppShellProps, } from "./patterns/workspace-app-shell/WorkspaceAppShell";
|