@bfrs/agentic-components 0.3.2 → 0.3.3
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/data-display/DataTable/DataTable.types.d.ts +11 -0
- package/dist/components/data-display/DataTable/TablePagination.d.ts +1 -1
- package/dist/components/primitives/Button/ButtonGroup.d.ts +24 -0
- package/dist/components/primitives/Button/index.d.ts +1 -0
- package/dist/components/ui/actions/Button/Button.d.ts +2 -2
- package/dist/components/ui/forms/MultiSelect/MultiSelect.d.ts +29 -1
- package/dist/components/ui/forms/SearchableSelect/SearchableSelect.d.ts +6 -1
- package/dist/components/ui/forms/Select/Select.d.ts +17 -0
- package/dist/components/ui/overlays/overlayPositioning.d.ts +1 -0
- package/dist/components/ui/patterns/RevealAndCopy/RevealAndCopy.d.ts +14 -0
- package/dist/custom-elements.d.ts +1 -0
- package/dist/custom-elements.js +15034 -30478
- package/dist/custom-elements.js.map +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.js +5742 -5293
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -111,6 +111,17 @@ export type TableToolbarProps = {
|
|
|
111
111
|
export type TablePaginationProps = DataTablePagination & {
|
|
112
112
|
itemLabel?: string;
|
|
113
113
|
className?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Page-size control presentation. "select" (default, unchanged) renders a
|
|
116
|
+
* native <select>; "menu" renders a compact "{pageSize} {itemLabel}" button
|
|
117
|
+
* with a chevron that opens a menu of `pageSizeOptions`.
|
|
118
|
+
*/
|
|
119
|
+
pageSizeControl?: "select" | "menu";
|
|
120
|
+
/**
|
|
121
|
+
* Whether to render the page-number navigation. Defaults to true (unchanged).
|
|
122
|
+
* Set false to render only the page-size cluster (e.g. single-page tables).
|
|
123
|
+
*/
|
|
124
|
+
showPageNavigation?: boolean;
|
|
114
125
|
};
|
|
115
126
|
export type TableStateProps = {
|
|
116
127
|
title?: ReactNode;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TablePaginationProps } from './DataTable.types';
|
|
2
|
-
export declare function TablePagination({ page, totalPages, pageSize, totalItems, pageSizeOptions, onPageChange, onPageSizeChange, itemLabel, className }: TablePaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function TablePagination({ page, totalPages, pageSize, totalItems, pageSizeOptions, onPageChange, onPageSizeChange, itemLabel, className, pageSizeControl, showPageNavigation }: TablePaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export type ButtonGroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
/**
|
|
4
|
+
* Visually joins the child buttons into a single connected control (a split
|
|
5
|
+
* button): inner corners are squared and adjacent borders are collapsed.
|
|
6
|
+
* Defaults to `true`. Set `false` for a spaced row of independent buttons.
|
|
7
|
+
*/
|
|
8
|
+
attached?: boolean;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Groups two or more `Button`/`IconButton` children into one connected control.
|
|
12
|
+
* The canonical use is a split button — a primary action plus an adjacent
|
|
13
|
+
* trigger (e.g. "Add Order" + a caret menu). The first child keeps its left
|
|
14
|
+
* radius, the last child keeps its right radius, inner corners are squared, and
|
|
15
|
+
* the 1px border overlap is collapsed so the segments read as one unit.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ButtonGroup: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
18
|
+
/**
|
|
19
|
+
* Visually joins the child buttons into a single connected control (a split
|
|
20
|
+
* button): inner corners are squared and adjacent borders are collapsed.
|
|
21
|
+
* Defaults to `true`. Set `false` for a spaced row of independent buttons.
|
|
22
|
+
*/
|
|
23
|
+
attached?: boolean;
|
|
24
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Button } from '../../../primitives/Button';
|
|
2
|
-
export type { ButtonProps, ButtonSize, ButtonVariant } from '../../../primitives/Button';
|
|
1
|
+
export { Button, ButtonGroup } from '../../../primitives/Button';
|
|
2
|
+
export type { ButtonProps, ButtonSize, ButtonVariant, ButtonGroupProps } from '../../../primitives/Button';
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonVariant } from '../../../primitives/Button';
|
|
3
|
+
import { SelectMenuWidth, SelectOption } from '../Select';
|
|
4
|
+
export type MultiSelectSize = "sm" | "md" | "lg";
|
|
5
|
+
/**
|
|
6
|
+
* When the value is committed back to the consumer via `onValueChange`:
|
|
7
|
+
* - `"change"` (default) — on every toggle, immediately.
|
|
8
|
+
* - `"apply"` — only when the user confirms with the Apply button (or a custom
|
|
9
|
+
* footer action). Toggles update an internal draft; closing without applying
|
|
10
|
+
* discards the draft. A Clear/Apply footer is shown automatically.
|
|
11
|
+
*/
|
|
12
|
+
export type MultiSelectCommitMode = "change" | "apply";
|
|
2
13
|
export type MultiSelectProps = {
|
|
3
14
|
options: SelectOption[];
|
|
4
15
|
value?: string[];
|
|
5
16
|
defaultValue?: string[];
|
|
6
17
|
onValueChange?: (value: string[]) => void;
|
|
18
|
+
/** Fired with the committed value when the user applies (apply mode only). */
|
|
19
|
+
onApply?: (value: string[]) => void;
|
|
7
20
|
placeholder?: string;
|
|
8
21
|
searchPlaceholder?: string;
|
|
9
22
|
emptyText?: string;
|
|
@@ -12,6 +25,21 @@ export type MultiSelectProps = {
|
|
|
12
25
|
error?: boolean;
|
|
13
26
|
clearable?: boolean;
|
|
14
27
|
maxVisibleValues?: number;
|
|
28
|
+
/** Trigger size. Defaults to `"md"`. */
|
|
29
|
+
size?: MultiSelectSize;
|
|
30
|
+
/** Option popover width relative to the trigger. Defaults to `"auto"` (the
|
|
31
|
+
* popover grows to fit its content and can be wider than the trigger). */
|
|
32
|
+
menuWidth?: SelectMenuWidth;
|
|
33
|
+
/** Defer committing the value until applied. Defaults to `"change"`. */
|
|
34
|
+
commitMode?: MultiSelectCommitMode;
|
|
35
|
+
/** Custom popover footer. Overrides the default Clear/Apply footer. */
|
|
36
|
+
footer?: ReactNode;
|
|
37
|
+
applyLabel?: string;
|
|
38
|
+
clearLabel?: string;
|
|
39
|
+
/** Button variant for the default footer Apply action. Defaults to `"primary"`. */
|
|
40
|
+
applyVariant?: ButtonVariant;
|
|
41
|
+
/** Button variant for the default footer Clear action. Defaults to `"ghost"`. */
|
|
42
|
+
clearVariant?: ButtonVariant;
|
|
15
43
|
className?: string;
|
|
16
44
|
id?: string;
|
|
17
45
|
"aria-describedby"?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { SelectOption } from '../Select';
|
|
1
|
+
import { SelectMenuWidth, SelectOption } from '../Select';
|
|
2
|
+
export type SearchableSelectSize = "sm" | "md" | "lg";
|
|
2
3
|
export type SearchableSelectProps = {
|
|
3
4
|
options: SelectOption[];
|
|
4
5
|
value?: string;
|
|
@@ -10,6 +11,10 @@ export type SearchableSelectProps = {
|
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
error?: boolean;
|
|
12
13
|
clearable?: boolean;
|
|
14
|
+
/** Trigger size. Defaults to `"md"`. */
|
|
15
|
+
size?: SearchableSelectSize;
|
|
16
|
+
/** Option popover width relative to the trigger. Defaults to `"auto"`. */
|
|
17
|
+
menuWidth?: SelectMenuWidth;
|
|
13
18
|
className?: string;
|
|
14
19
|
id?: string;
|
|
15
20
|
"aria-describedby"?: string;
|
|
@@ -2,7 +2,22 @@ export type SelectOption = {
|
|
|
2
2
|
value: string;
|
|
3
3
|
label: string;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
/** Optional group heading. Options sharing a `group` render under one heading,
|
|
6
|
+
* in first-seen group order. Options without a group render ungrouped. */
|
|
7
|
+
group?: string;
|
|
5
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Controls the option popover width relative to the trigger.
|
|
11
|
+
* - `"trigger"` — exactly the trigger width.
|
|
12
|
+
* - `"auto"` — at least the trigger width, growing to fit content (can be wider).
|
|
13
|
+
* - a number — a fixed pixel width.
|
|
14
|
+
*/
|
|
15
|
+
export type SelectMenuWidth = "trigger" | "auto" | number;
|
|
16
|
+
/** Groups a flat option list by `group`, preserving first-seen order. */
|
|
17
|
+
export declare function groupSelectOptions(options: SelectOption[]): {
|
|
18
|
+
group?: string;
|
|
19
|
+
items: SelectOption[];
|
|
20
|
+
}[];
|
|
6
21
|
export type SelectProps = {
|
|
7
22
|
value?: string;
|
|
8
23
|
defaultValue?: string;
|
|
@@ -10,6 +25,8 @@ export type SelectProps = {
|
|
|
10
25
|
options: SelectOption[];
|
|
11
26
|
placeholder?: string;
|
|
12
27
|
size?: "sm" | "md" | "lg";
|
|
28
|
+
/** Option popover width relative to the trigger. Defaults to `"auto"`. */
|
|
29
|
+
menuWidth?: SelectMenuWidth;
|
|
13
30
|
disabled?: boolean;
|
|
14
31
|
error?: boolean;
|
|
15
32
|
className?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const floatingCollisionPadding = 8;
|
|
2
|
+
export declare const floatingLayerClassName = "bfrs-z-[1000]";
|
|
2
3
|
export declare const dropdownContentCollisionClassName = "bfrs-max-h-[min(24rem,var(--radix-dropdown-menu-content-available-height))] bfrs-overflow-auto";
|
|
3
4
|
export declare const popoverContentCollisionClassName = "bfrs-max-h-[min(32rem,var(--radix-popover-content-available-height))] bfrs-max-w-[calc(100vw-1rem)] bfrs-overflow-auto";
|
|
4
5
|
export declare const selectContentCollisionClassName = "bfrs-max-h-[min(20rem,var(--radix-select-content-available-height))]";
|
|
@@ -3,6 +3,13 @@ export type RevealAndCopySize = "xs" | "sm" | "md";
|
|
|
3
3
|
export type RevealAndCopyProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "onCopy"> & {
|
|
4
4
|
/** The sensitive value to keep masked until the user reveals it. */
|
|
5
5
|
value?: string | null;
|
|
6
|
+
/**
|
|
7
|
+
* Optional formatted/display representation rendered ONLY when revealed (e.g. a
|
|
8
|
+
* formatted phone number). The mask length still derives from `value`, and the
|
|
9
|
+
* plaintext `displayValue` is never present in the DOM while masked. When
|
|
10
|
+
* omitted, the revealed value falls back to `value` (unchanged behavior).
|
|
11
|
+
*/
|
|
12
|
+
displayValue?: ReactNode;
|
|
6
13
|
/** Enables the copy action after reveal. */
|
|
7
14
|
allowCopy?: boolean;
|
|
8
15
|
/** Initial reveal state for uncontrolled usage. */
|
|
@@ -35,6 +42,13 @@ export type RevealAndCopyProps = Omit<HTMLAttributes<HTMLDivElement>, "children"
|
|
|
35
42
|
export declare const RevealAndCopy: import('react').ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children" | "onCopy"> & {
|
|
36
43
|
/** The sensitive value to keep masked until the user reveals it. */
|
|
37
44
|
value?: string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Optional formatted/display representation rendered ONLY when revealed (e.g. a
|
|
47
|
+
* formatted phone number). The mask length still derives from `value`, and the
|
|
48
|
+
* plaintext `displayValue` is never present in the DOM while masked. When
|
|
49
|
+
* omitted, the revealed value falls back to `value` (unchanged behavior).
|
|
50
|
+
*/
|
|
51
|
+
displayValue?: ReactNode;
|
|
38
52
|
/** Enables the copy action after reveal. */
|
|
39
53
|
allowCopy?: boolean;
|
|
40
54
|
/** Initial reveal state for uncontrolled usage. */
|