@bfrs/agentic-components 0.4.3 → 0.4.6

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.
@@ -371,6 +371,8 @@ import { MagnifyingGlass } from "@phosphor-icons/react";
371
371
 
372
372
  Primary interactive element. Covers all CTA patterns.
373
373
 
374
+ Default sizing follows the Shiprocket 4.0 compact control scale from Figma: `xs` is 26px high, `sm` is 28px, `md` is 30px, and `lg` remains 40px. `primary` is the dark `#29343D` CTA, `secondary` is the white soft-stroke control, and `outline` is the selected/active filter-style control.
375
+
374
376
  ```tsx
375
377
  <Button variant="primary" size="md" onClick={handleSave}>
376
378
  Save changes
@@ -403,6 +405,8 @@ Primary interactive element. Covers all CTA patterns.
403
405
 
404
406
  Square button for icon-only actions. Always provide `aria-label`.
405
407
 
408
+ Icon-only buttons inherit the same compact control scale: `xs` is 26px, `sm` is 28px, `md` is 32px, and `lg` is 40px.
409
+
406
410
  ```tsx
407
411
  <IconButton
408
412
  icon={<Icon icon={Trash} />}
@@ -498,6 +502,9 @@ Standalone label. Prefer `FormField` which renders this automatically.
498
502
 
499
503
  Standard text input.
500
504
 
505
+ Inputs use the same 28px Figma trigger height as select controls across native input types such as `text`, `number`, `email`, and `search`. Placeholders render in secondary text (`#64737E`).
506
+ Focused inputs, affixed input chrome, and select-family triggers must show the focus border/ring; open select popovers keep that same visual state through `aria-expanded`.
507
+
501
508
  ```tsx
502
509
  <Input
503
510
  placeholder="Search…"
@@ -549,6 +556,10 @@ Accepts all native `<textarea>` props.
549
556
 
550
557
  Single-value dropdown. Options are `{ value: string; label: string }`.
551
558
 
559
+ The Figma trigger style is the only select size: 28px high with 12.5px text, 7px radius, and a 10px chevron.
560
+ The trigger chevron rotates 180deg while open. This open/close motion and focused/open border treatment is shared by `Select`, `SearchableSelect`, and `MultiSelect`.
561
+ Selected option rows render with bold text across select-style listboxes: `Select`, `SearchableSelect`, `MultiSelect`, and `SuggestInput`.
562
+
552
563
  ```tsx
553
564
  <Select
554
565
  options={[
@@ -567,7 +578,9 @@ Single-value dropdown. Options are `{ value: string; label: string }`.
567
578
  | `value` | `string` | — |
568
579
  | `onValueChange` | `(value: string) => void` | — |
569
580
  | `placeholder` | `string` | `"Select"` |
570
- | `size` | `"sm" \| "md" \| "lg"` | `"md"` |
581
+ | `open` | `boolean` | |
582
+ | `defaultOpen` | `boolean` | `false` |
583
+ | `onOpenChange` | `(open: boolean) => void` | — |
571
584
  | `disabled` | `boolean` | `false` |
572
585
  | `error` | `boolean` | `false` |
573
586
 
@@ -579,6 +592,8 @@ The selected value never wraps: it truncates with an ellipsis when it is too lon
579
592
 
580
593
  Preset and custom calendar date-range filter. Presets commit immediately; custom ranges use Apply/Cancel.
581
594
 
595
+ The trigger uses the neutral secondary compact button by default so date filters visually match the Figma filter bar.
596
+
582
597
  ```tsx
583
598
  import { DateRangePicker, presetToRange, type DateRangeValue } from "@bfrs/agentic-components";
584
599
 
@@ -632,13 +647,13 @@ Combobox with search. Use when options list is long (10+).
632
647
  | `disabled` | `boolean` | `false` |
633
648
  | `error` | `boolean` | `false` |
634
649
  | `clearable` | `boolean` | `true` |
635
- | `size` | `"sm" \| "md" \| "lg"` | `"md"` |
636
650
 
637
651
  ---
638
652
 
639
653
  #### `MultiSelect`
640
654
 
641
655
  Searchable multi-value select. Use for channel/category filters or any bounded list where more than one option can be selected.
656
+ The popover keeps the embedded search input on the same 28px field style as `Input` and `Select`, scrolls only the option list, and keeps Apply/Clear footer actions visible.
642
657
 
643
658
  ```tsx
644
659
  <MultiSelect
@@ -674,7 +689,6 @@ Angular custom element:
674
689
  | `error` | `boolean` | `false` |
675
690
  | `clearable` | `boolean` | `true` |
676
691
  | `maxVisibleValues` | `number` | `2` |
677
- | `size` | `"sm" \| "md" \| "lg"` | `"md"` |
678
692
 
679
693
  ---
680
694
 
@@ -1013,6 +1027,8 @@ Angular:
1013
1027
  Square checklist control for independent true/false decisions or multi-select choices.
1014
1028
  Use `Radio` instead when exactly one option in a group can be selected.
1015
1029
 
1030
+ The default checkbox is the Figma `sm` control: 12px square, 0.8px secondary stroke (`#64737E`), and 2.5px radius.
1031
+
1016
1032
  ```tsx
1017
1033
  <Checkbox
1018
1034
  checked={agreed}
@@ -1028,7 +1044,7 @@ Use `Radio` instead when exactly one option in a group can be selected.
1028
1044
  |------|------|---------|
1029
1045
  | `label` | `ReactNode` | — |
1030
1046
  | `description` | `ReactNode` | — |
1031
- | `size` | `"sm" \| "md" \| "lg"` | `"md"` |
1047
+ | `size` | `"sm" \| "md" \| "lg"` | `"sm"` |
1032
1048
  | `error` | `boolean` | `false` |
1033
1049
  | `checked` | `boolean \| "indeterminate"` | — |
1034
1050
  | `onCheckedChange` | `(checked: boolean \| "indeterminate") => void` | — |
@@ -1511,6 +1527,8 @@ User avatar with image, initials fallback, and online status.
1511
1527
 
1512
1528
  Table page navigation. Handles ellipsis, edge pages, optional page-size controls, and two navigation variants: `indexed` (Prev, page indexes like `1 2 3 ... 10`, Next) and `simple` (Prev / Next only).
1513
1529
 
1530
+ Default pagination matches the Figma table footer: 40px row, 20px horizontal padding, 26px controls, active page background `#64737E`, and page-size labels such as `15 Orders` when `itemLabel="Orders"`.
1531
+
1514
1532
  ```tsx
1515
1533
  <TablePagination
1516
1534
  page={currentPage}
@@ -1542,6 +1560,8 @@ Angular: `items-per-page-label` attribute.
1542
1560
 
1543
1561
  Generic data table with sorting, loading skeleton, row actions, selection, pagination, and empty/error states.
1544
1562
 
1563
+ DataTable has one default visual density, matching the Figma orders table: 8px outer radius, strong `#D3DFD7` outer/header stroke, 46px header, 64px rows, 12px header/body type, 0.24px header letter spacing, 12px selection checkboxes, and a 146px sticky actions column headed `Actions`.
1564
+
1545
1565
  ```tsx
1546
1566
  <DataTable
1547
1567
  columns={[
@@ -1573,8 +1593,9 @@ Generic data table with sorting, loading skeleton, row actions, selection, pagin
1573
1593
  | `enableColumnReordering` | `boolean` | `true` |
1574
1594
  | `onRowClick` | `(row: T) => void` | — |
1575
1595
  | `rowActions` | `(row: T) => ReactNode` | — |
1596
+ | `rowActionsHeader` | `ReactNode` | `"Actions"` |
1597
+ | `rowActionsWidth` | `number \| string` | `146` |
1576
1598
  | `selection` | `boolean` | `false` |
1577
- | `density` | `"compact" \| "default" \| "comfortable"` | `"default"` |
1578
1599
  | `emptyTitle` | `ReactNode` | `"No records found"` |
1579
1600
  | `emptyDescription` | `ReactNode` | — |
1580
1601
  | `defaultSorting` | `{ columnId: string; direction: "asc" \| "desc" } \| null` | `null` |
@@ -1854,6 +1875,8 @@ Navigation trail. Last item is rendered as plain text (current page).
1854
1875
 
1855
1876
  Standardized page title section. Use at the top of every page.
1856
1877
 
1878
+ Default chrome matches the Shiprocket 4.0 page row: 52px minimum height, `#FBFCFB` background, strong bottom divider, and a 20px semibold title.
1879
+
1857
1880
  ```tsx
1858
1881
  <PageHeader
1859
1882
  eyebrow="Orders"
@@ -1899,7 +1922,7 @@ Full-page app shell with sticky header and collapsible sidebar.
1899
1922
 
1900
1923
  #### `WorkspaceHeader`
1901
1924
 
1902
- Slot-based top bar for Agentic Platform workspaces. It preserves the standalone prototype chrome by default: 52px header height, 216px brand rail, 380px chat/workspace rail, 300px search slot, strong dividers, and compact 26px sidebar toggle. Product-specific brand, tab title/collapse controls, search internals, wallet, launcher, and avatar remain app-owned slots.
1925
+ Slot-based top bar for Agentic Platform workspaces. It preserves the Shiprocket 4.0 Figma chrome by default: 52px header height, 216px brand rail, 380px chat/workspace rail, 280px search slot, strong dividers, and compact 26px sidebar toggle. Product-specific brand, tab title/collapse controls, search internals, wallet, launcher, and avatar remain app-owned slots.
1903
1926
 
1904
1927
  ```tsx
1905
1928
  <WorkspaceHeader
@@ -1924,7 +1947,7 @@ Slot-based top bar for Agentic Platform workspaces. It preserves the standalone
1924
1947
  | `tabsCollapsed` | `boolean` | `false` |
1925
1948
  | `collapsedTabsWidth` | `number` | `40` |
1926
1949
  | `search` | `ReactNode` | — |
1927
- | `searchWidth` | `number` | `300` |
1950
+ | `searchWidth` | `number` | `280` |
1928
1951
  | `actions` | `ReactNode` | — |
1929
1952
  | `children` | `ReactNode` | — |
1930
1953
  | `height` | `number` | `52` |
@@ -1937,6 +1960,8 @@ Use `brandCollapsed` and `tabsCollapsed` to mirror the standalone collapsed side
1937
1960
 
1938
1961
  Collapsible application sidebar navigation. Renders grouped sections of items with active state, badges, and hover flyouts for nested items, plus `header`, `footer`, and `children` slots. All data (labels, icons, handlers) is passed in — the component owns layout and collapse behavior.
1939
1962
 
1963
+ Expanded default width is 216px. Rows are 32px high with 8px radius, 12px labels, and active rows use the soft `#F6F9F6` surface.
1964
+
1940
1965
  ```tsx
1941
1966
  <SideNav
1942
1967
  collapsed={collapsed}
@@ -1959,7 +1984,7 @@ Collapsible application sidebar navigation. Renders grouped sections of items wi
1959
1984
  |------|------|---------|
1960
1985
  | `sections` | `SideNavSection[]` | **required** |
1961
1986
  | `collapsed` | `boolean` | `false` |
1962
- | `width` | `number` | `240` |
1987
+ | `width` | `number` | `216` |
1963
1988
  | `collapsedWidth` | `number` | `56` |
1964
1989
  | `header` | `ReactNode` | — |
1965
1990
  | `children` | `ReactNode` | — |
package/README.md CHANGED
@@ -57,7 +57,7 @@ Most DOM-backed components forward compatible React props such as `onClick`, `on
57
57
 
58
58
  Library-owned Tailwind utilities are prefixed with `bfrs-`, for example `bfrs-flex`, `hover:bfrs-bg-primary`, and `bfrs-animate-shimmer`. Unprefixed classes passed through `className` are treated as host-app classes.
59
59
 
60
- Size-aware controls support `sm`, `md`, and `lg`. `sm` is the compact dashboard size for dense controls and filters.
60
+ Size-aware controls support `xs`, `sm`, `md`, and `lg` where applicable. Text inputs and select-family triggers render at the Figma 28px field height; button-like controls keep their own compact scale by component family.
61
61
 
62
62
  ## Angular Usage
63
63
 
@@ -257,6 +257,7 @@ save() {
257
257
 
258
258
  DataTable also accepts declarative `leadingColumn`, `rowActions`,
259
259
  `rowClassRules`, `rowIdKey`, `accessorPath`, and `sortValueKey` configuration.
260
+ The default table chrome matches Shiprocket 4.0 Figma: 8px outer radius, strong `#D3DFD7` outer/header stroke, 46px header, 64px rows, 12px text, 12px selection checkboxes, and a 146px sticky actions column headed `Actions`.
260
261
  The standalone helpers are available as `bfrs-table-toolbar`,
261
262
  `bfrs-table-empty-state`, `bfrs-table-error-state`, `bfrs-table-skeleton`,
262
263
  `bfrs-table-row-actions`, `bfrs-table-bulk-actions`, and
@@ -351,6 +352,7 @@ Keep form validation and API checks in the app. Render field errors below inputs
351
352
  ### DateRangePicker
352
353
 
353
354
  Use `DateRangePicker` for preset and custom date-range filters. Keep API date formatting in the consuming app.
355
+ The trigger uses the neutral compact secondary control by default so it aligns with filter bar dropdowns.
354
356
 
355
357
  ```tsx
356
358
  import { DateRangePicker, presetToRange, type DateRangeValue } from "@bfrs/agentic-components";
@@ -384,6 +386,7 @@ function SaveButton() {
384
386
  ### Checkbox
385
387
 
386
388
  Use `Checkbox` for independent true/false decisions or multi-select choices. It renders as a square checklist control, while `Radio` renders circular options for single-choice groups. Both support primary text plus secondary description text.
389
+ The default checkbox is the compact 12px Shiprocket 4.0 control with secondary stroke and 2.5px radius.
387
390
 
388
391
  ```tsx
389
392
  import { Checkbox, Radio } from "@bfrs/agentic-components";
@@ -1,2 +1,2 @@
1
1
  import { DataTableProps } from './DataTable.types';
2
- export declare function DataTable<Row>({ data, columns, getRowId, loading, error, emptyState, emptyTitle, emptyDescription, pagination, enableSorting, sorting, defaultSorting, onSortingChange, visibleColumnIds, columnOrder, defaultColumnOrder, onColumnOrderChange, enableColumnPinning, pinnedColumnCount, defaultPinnedColumnCount, onPinnedColumnCountChange, pinLeadingColumn, defaultPinLeadingColumn, onPinLeadingColumnChange, enableColumnReordering, resetKey, showSortIcon, leadingColumn, rowActions, rowActionsHeader, rowActionsWidth, stickyRowActions, selection, selectedRowIds, onSelectedRowIdsChange, stickyHeader, minWidth, maxHeight, density, className, tableClassName, headerClassName, rowClassName, cellClassName, onRowClick, "aria-label": ariaLabel }: DataTableProps<Row>): import("react/jsx-runtime").JSX.Element;
2
+ export declare function DataTable<Row>({ data, columns, getRowId, loading, error, emptyState, emptyTitle, emptyDescription, pagination, enableSorting, sorting, defaultSorting, onSortingChange, visibleColumnIds, columnOrder, defaultColumnOrder, onColumnOrderChange, enableColumnPinning, pinnedColumnCount, defaultPinnedColumnCount, onPinnedColumnCountChange, pinLeadingColumn, defaultPinLeadingColumn, onPinLeadingColumnChange, enableColumnReordering, resetKey, showSortIcon, leadingColumn, rowActions, rowActionsHeader, rowActionsWidth, stickyRowActions, selection, selectedRowIds, onSelectedRowIdsChange, stickyHeader, minWidth, maxHeight, className, tableClassName, headerClassName, rowClassName, cellClassName, onRowClick, "aria-label": ariaLabel }: DataTableProps<Row>): import("react/jsx-runtime").JSX.Element;
@@ -98,7 +98,6 @@ export type DataTableProps<Row> = {
98
98
  * prop to keep the footer fixed below the scroll area.
99
99
  */
100
100
  maxHeight?: number | string;
101
- density?: TableDensity;
102
101
  className?: string;
103
102
  tableClassName?: string;
104
103
  headerClassName?: string;
@@ -145,7 +144,6 @@ export type TableStateProps = {
145
144
  export type TableSkeletonProps = {
146
145
  rows?: number;
147
146
  columns?: number;
148
- density?: TableDensity;
149
147
  colSpan?: number;
150
148
  };
151
149
  export type TableRowActionsProps<Row> = {
@@ -1,2 +1,2 @@
1
1
  import { TableSkeletonProps } from './DataTable.types';
2
- export declare function TableSkeleton({ rows, columns, density, colSpan }: TableSkeletonProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function TableSkeleton({ rows, columns, colSpan }: TableSkeletonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ButtonVariant } from '../../../primitives/Button';
3
3
  import { SelectMenuWidth, SelectOption } from '../Select';
4
- export type MultiSelectSize = "sm" | "md" | "lg";
5
4
  /**
6
5
  * When the value is committed back to the consumer via `onValueChange`:
7
6
  * - `"change"` (default) — on every toggle, immediately.
@@ -25,8 +24,6 @@ export type MultiSelectProps = {
25
24
  error?: boolean;
26
25
  clearable?: boolean;
27
26
  maxVisibleValues?: number;
28
- /** Trigger size. Defaults to `"md"`. */
29
- size?: MultiSelectSize;
30
27
  /** Option popover width relative to the trigger. Defaults to `"auto"` (the
31
28
  * popover grows to fit its content and can be wider than the trigger). */
32
29
  menuWidth?: SelectMenuWidth;
@@ -1,5 +1,4 @@
1
1
  import { SelectMenuWidth, SelectOption } from '../Select';
2
- export type SearchableSelectSize = "sm" | "md" | "lg";
3
2
  export type SearchableSelectProps = {
4
3
  options: SelectOption[];
5
4
  value?: string;
@@ -11,8 +10,6 @@ export type SearchableSelectProps = {
11
10
  disabled?: boolean;
12
11
  error?: boolean;
13
12
  clearable?: boolean;
14
- /** Trigger size. Defaults to `"md"`. */
15
- size?: SearchableSelectSize;
16
13
  /** Option popover width relative to the trigger. Defaults to `"auto"`. */
17
14
  menuWidth?: SelectMenuWidth;
18
15
  className?: string;
@@ -24,7 +24,9 @@ export type SelectProps = {
24
24
  onValueChange?: (value: string) => void;
25
25
  options: SelectOption[];
26
26
  placeholder?: string;
27
- size?: "sm" | "md" | "lg";
27
+ open?: boolean;
28
+ defaultOpen?: boolean;
29
+ onOpenChange?: (open: boolean) => void;
28
30
  /** Option popover width relative to the trigger. Defaults to `"auto"`. */
29
31
  menuWidth?: SelectMenuWidth;
30
32
  disabled?: boolean;
@@ -5,4 +5,5 @@ export declare const popoverContentCollisionClassName = "bfrs-max-h-[min(32rem,v
5
5
  export declare const selectContentCollisionClassName = "bfrs-max-h-[min(20rem,var(--radix-select-content-available-height))]";
6
6
  export declare const searchableSelectContentCollisionClassName = "bfrs-max-h-[min(18rem,var(--radix-popover-content-available-height))] bfrs-w-[var(--radix-popover-trigger-width)] bfrs-overflow-hidden";
7
7
  export declare const searchableSelectListboxCollisionClassName = "bfrs-max-h-[min(14rem,max(4rem,calc(var(--radix-popover-content-available-height)-3rem)))] bfrs-overflow-auto";
8
+ export declare const multiSelectListboxCollisionClassName = "bfrs-min-h-0 bfrs-flex-1 bfrs-max-h-[min(14rem,max(3rem,calc(var(--radix-popover-content-available-height)-6.5rem)))] bfrs-overflow-auto";
8
9
  export declare const tooltipContentCollisionClassName = "bfrs-max-w-[min(16rem,var(--radix-tooltip-content-available-width))]";