@bfrs/agentic-components 0.2.0 → 0.2.1
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/ui/index.d.ts +3 -0
- package/dist/components/ui/patterns/CommandMenu/CommandMenu.d.ts +47 -0
- package/dist/components/ui/patterns/CommandMenu/index.d.ts +1 -0
- package/dist/components/ui/patterns/SideNav/SideNav.d.ts +52 -0
- package/dist/components/ui/patterns/SideNav/index.d.ts +1 -0
- package/dist/components/ui/patterns/WorkspaceHeader/WorkspaceHeader.d.ts +35 -0
- package/dist/components/ui/patterns/WorkspaceHeader/index.d.ts +1 -0
- package/dist/custom-elements.d.ts +21 -0
- package/dist/custom-elements.js +9711 -9374
- package/dist/custom-elements.js.map +1 -1
- package/dist/index.js +2616 -2368
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -51,3 +51,6 @@ export * from './patterns/ChatComposer';
|
|
|
51
51
|
export * from './patterns/FullPageLoader';
|
|
52
52
|
export * from './patterns/BusinessInfoDisplayCard';
|
|
53
53
|
export * from './patterns/StepProgressCard';
|
|
54
|
+
export * from './patterns/CommandMenu';
|
|
55
|
+
export * from './patterns/WorkspaceHeader';
|
|
56
|
+
export * from './patterns/SideNav';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type CommandMenuTone = "neutral" | "primary" | "success" | "warning" | "danger" | "info";
|
|
3
|
+
export type CommandMenuItem = {
|
|
4
|
+
/** Stable id for the item. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Primary label, e.g. a command name. */
|
|
7
|
+
label: ReactNode;
|
|
8
|
+
/** Secondary description line. */
|
|
9
|
+
description?: ReactNode;
|
|
10
|
+
/** Leading icon node, rendered inside a tinted square. */
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** Extra text used for filtering (in addition to a string `label`). */
|
|
13
|
+
keywords?: string;
|
|
14
|
+
/** Optional trailing status badge. */
|
|
15
|
+
status?: {
|
|
16
|
+
label: ReactNode;
|
|
17
|
+
tone?: CommandMenuTone;
|
|
18
|
+
};
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type CommandMenuProps = {
|
|
22
|
+
/** Items to render. */
|
|
23
|
+
items: CommandMenuItem[];
|
|
24
|
+
/** Current filter query. When set and `filter` is not false, items are filtered. */
|
|
25
|
+
query?: string;
|
|
26
|
+
/** Optional uppercase title shown above the list. */
|
|
27
|
+
title?: ReactNode;
|
|
28
|
+
/** Text shown when no items match. */
|
|
29
|
+
emptyText?: ReactNode;
|
|
30
|
+
/** Whether to internally filter `items` by `query`. Defaults to true. */
|
|
31
|
+
filter?: boolean;
|
|
32
|
+
/** Called when an item is selected. */
|
|
33
|
+
onSelect?: (item: CommandMenuItem) => void;
|
|
34
|
+
className?: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Searchable command / option palette. Renders a floating-style surface with a
|
|
38
|
+
* list of icon + label + description rows and optional status badges. Filtering
|
|
39
|
+
* is internal by default; pass `filter={false}` to control the list yourself.
|
|
40
|
+
*
|
|
41
|
+
* The component is position-agnostic — wrap it (or pass `className`) to place it
|
|
42
|
+
* as a popover above an input, in a dropdown, etc.
|
|
43
|
+
*/
|
|
44
|
+
export declare function CommandMenu({ items, query, title, emptyText, filter, onSelect, className }: CommandMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare namespace CommandMenu {
|
|
46
|
+
var displayName: string;
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CommandMenu';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export type SideNavSubItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
onSelect?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export type SideNavItem = {
|
|
8
|
+
id: string;
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
/** Leading icon node. */
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
active?: boolean;
|
|
13
|
+
/** Trailing badge/slot (hidden when collapsed). */
|
|
14
|
+
badge?: ReactNode;
|
|
15
|
+
/** Hover flyout entries. When present, clicking the row does not call `onSelect`. */
|
|
16
|
+
nested?: SideNavSubItem[];
|
|
17
|
+
onSelect?: () => void;
|
|
18
|
+
};
|
|
19
|
+
export type SideNavSection = {
|
|
20
|
+
id?: string;
|
|
21
|
+
/** Uppercase section title (hidden when collapsed). */
|
|
22
|
+
title?: ReactNode;
|
|
23
|
+
items: SideNavItem[];
|
|
24
|
+
/** Optional action row shown under the items (e.g. "Create new"). Hidden when collapsed. */
|
|
25
|
+
action?: ReactNode;
|
|
26
|
+
};
|
|
27
|
+
export type SideNavProps = {
|
|
28
|
+
sections: SideNavSection[];
|
|
29
|
+
collapsed?: boolean;
|
|
30
|
+
/** Expanded width in px. Defaults to 240. */
|
|
31
|
+
width?: number;
|
|
32
|
+
/** Collapsed width in px. Defaults to 56. */
|
|
33
|
+
collapsedWidth?: number;
|
|
34
|
+
/** Top slot, above the scrollable nav (e.g. a primary CTA). */
|
|
35
|
+
header?: ReactNode;
|
|
36
|
+
/** Extra content rendered inside the scroll area after the sections (e.g. a recents list). */
|
|
37
|
+
children?: ReactNode;
|
|
38
|
+
/** Bottom slot (e.g. user + settings). */
|
|
39
|
+
footer?: ReactNode;
|
|
40
|
+
className?: string;
|
|
41
|
+
style?: CSSProperties;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Collapsible application sidebar navigation. Renders grouped sections of items
|
|
45
|
+
* with active state, optional badges, and hover flyouts for nested items, plus
|
|
46
|
+
* dedicated `header` and `footer` slots. All data (labels, icons, handlers) is
|
|
47
|
+
* passed in — the component owns layout, collapse behavior, and chrome only.
|
|
48
|
+
*/
|
|
49
|
+
export declare function SideNav({ sections, collapsed, width, collapsedWidth, header, children, footer, className, style }: SideNavProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export declare namespace SideNav {
|
|
51
|
+
var displayName: string;
|
|
52
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SideNav';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export type WorkspaceHeaderProps = {
|
|
3
|
+
/** Brand block (logo + product name) rendered at the far left. */
|
|
4
|
+
brand?: ReactNode;
|
|
5
|
+
/** Fixed width (px) for the brand rail, e.g. to align with a sidebar. Auto when omitted. */
|
|
6
|
+
brandWidth?: number;
|
|
7
|
+
/** When provided, renders a sidebar-toggle button next to the brand. */
|
|
8
|
+
onToggleSidebar?: () => void;
|
|
9
|
+
/** Accessible label for the sidebar-toggle button. */
|
|
10
|
+
toggleLabel?: string;
|
|
11
|
+
/** Optional tab strip, rendered as its own bordered column after the brand. */
|
|
12
|
+
tabs?: ReactNode;
|
|
13
|
+
/** Fixed width (px) for the tabs column, e.g. to align with a secondary pane. Auto when omitted. */
|
|
14
|
+
tabsWidth?: number;
|
|
15
|
+
/** Search control, placed at the start of the trailing actions area. */
|
|
16
|
+
search?: ReactNode;
|
|
17
|
+
/** Trailing action controls (wallet, apps, avatar, …). */
|
|
18
|
+
actions?: ReactNode;
|
|
19
|
+
/** Free-form content placed in the main (flex) region before the spacer. */
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
/** Header height in px. Defaults to 52. */
|
|
22
|
+
height?: number;
|
|
23
|
+
className?: string;
|
|
24
|
+
style?: CSSProperties;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Application top bar for workspace-style layouts. Slot-based: drop in a brand
|
|
28
|
+
* block, an optional sidebar toggle, a tab strip, a search control, and trailing
|
|
29
|
+
* actions. All product-specific logic (which tabs exist, wallet balance, etc.)
|
|
30
|
+
* stays in the consuming app — this component only owns layout and chrome.
|
|
31
|
+
*/
|
|
32
|
+
export declare function WorkspaceHeader({ brand, brandWidth, onToggleSidebar, toggleLabel, tabs, tabsWidth, search, actions, children, height, className, style }: WorkspaceHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare namespace WorkspaceHeader {
|
|
34
|
+
var displayName: string;
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './WorkspaceHeader';
|
|
@@ -422,6 +422,24 @@ export declare class BfrsStepProgressCardSkeletonElement extends ReactCustomElem
|
|
|
422
422
|
static get observedAttributes(): string[];
|
|
423
423
|
protected renderElement(): unknown;
|
|
424
424
|
}
|
|
425
|
+
export declare class BfrsCommandMenuElement extends ReactCustomElement {
|
|
426
|
+
static readonly tagName = "command-menu";
|
|
427
|
+
static get observedAttributes(): string[];
|
|
428
|
+
protected defaultDisplay(): string;
|
|
429
|
+
protected renderElement(): unknown;
|
|
430
|
+
}
|
|
431
|
+
export declare class BfrsWorkspaceHeaderElement extends ReactCustomElement {
|
|
432
|
+
static readonly tagName = "workspace-header";
|
|
433
|
+
static get observedAttributes(): string[];
|
|
434
|
+
protected defaultDisplay(): string;
|
|
435
|
+
protected renderElement(): unknown;
|
|
436
|
+
}
|
|
437
|
+
export declare class BfrsSideNavElement extends ReactCustomElement {
|
|
438
|
+
static readonly tagName = "side-nav";
|
|
439
|
+
static get observedAttributes(): string[];
|
|
440
|
+
protected defaultDisplay(): string;
|
|
441
|
+
protected renderElement(): unknown;
|
|
442
|
+
}
|
|
425
443
|
export declare function defineBfrsAgenticElements(options?: BfrsCustomElementRegistryOptions): void;
|
|
426
444
|
declare global {
|
|
427
445
|
interface HTMLElementTagNameMap {
|
|
@@ -442,6 +460,7 @@ declare global {
|
|
|
442
460
|
"bfrs-chat-composer": BfrsChatComposerElement;
|
|
443
461
|
"bfrs-checkbox": BfrsCheckboxElement;
|
|
444
462
|
"bfrs-chip": BfrsChipElement;
|
|
463
|
+
"bfrs-command-menu": BfrsCommandMenuElement;
|
|
445
464
|
"bfrs-confirm-dialog": BfrsConfirmDialogElement;
|
|
446
465
|
"bfrs-container": BfrsContainerElement;
|
|
447
466
|
"bfrs-data-table": BfrsDataTableElement;
|
|
@@ -474,6 +493,7 @@ declare global {
|
|
|
474
493
|
"bfrs-searchable-select": BfrsSearchableSelectElement;
|
|
475
494
|
"bfrs-section-header": BfrsSectionHeaderElement;
|
|
476
495
|
"bfrs-select": BfrsSelectElement;
|
|
496
|
+
"bfrs-side-nav": BfrsSideNavElement;
|
|
477
497
|
"bfrs-skeleton": BfrsSkeletonElement;
|
|
478
498
|
"bfrs-spinner": BfrsSpinnerElement;
|
|
479
499
|
"bfrs-stack": BfrsStackElement;
|
|
@@ -486,6 +506,7 @@ declare global {
|
|
|
486
506
|
"bfrs-textarea": BfrsTextareaElement;
|
|
487
507
|
"bfrs-toast-manager": BfrsToastManagerElement;
|
|
488
508
|
"bfrs-tooltip": BfrsTooltipElement;
|
|
509
|
+
"bfrs-workspace-header": BfrsWorkspaceHeaderElement;
|
|
489
510
|
}
|
|
490
511
|
}
|
|
491
512
|
export {};
|