@bfrs/agentic-components 0.2.8 → 0.3.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.
Files changed (43) hide show
  1. package/BFRS_AGENTIC_COMPONENTS.md +331 -7
  2. package/README.md +19 -1
  3. package/dist/components/ui/feedback/InfoCard/InfoCard.d.ts +16 -0
  4. package/dist/components/ui/feedback/InfoCard/index.d.ts +2 -0
  5. package/dist/components/ui/feedback/Tip/Tip.d.ts +8 -0
  6. package/dist/components/ui/feedback/Tip/index.d.ts +2 -0
  7. package/dist/components/ui/forms/FileDropzone/FileDropzone.d.ts +21 -0
  8. package/dist/components/ui/forms/FileDropzone/index.d.ts +2 -0
  9. package/dist/components/ui/forms/MultiSelect/MultiSelect.d.ts +20 -0
  10. package/dist/components/ui/forms/MultiSelect/index.d.ts +1 -0
  11. package/dist/components/ui/forms/NumberStepper/NumberStepper.d.ts +21 -0
  12. package/dist/components/ui/forms/NumberStepper/index.d.ts +2 -0
  13. package/dist/components/ui/forms/OptionCardGroup/OptionCardGroup.d.ts +20 -0
  14. package/dist/components/ui/forms/OptionCardGroup/index.d.ts +2 -0
  15. package/dist/components/ui/forms/RevealField/RevealField.d.ts +16 -0
  16. package/dist/components/ui/forms/RevealField/index.d.ts +2 -0
  17. package/dist/components/ui/forms/SelectableChipGroup/SelectableChipGroup.d.ts +23 -0
  18. package/dist/components/ui/forms/SelectableChipGroup/index.d.ts +2 -0
  19. package/dist/components/ui/forms/SuggestInput/SuggestInput.d.ts +25 -0
  20. package/dist/components/ui/forms/SuggestInput/index.d.ts +2 -0
  21. package/dist/components/ui/index.d.ts +13 -0
  22. package/dist/components/ui/overlays/Tooltip/Tooltip.d.ts +3 -1
  23. package/dist/components/ui/patterns/Accordion/Accordion.d.ts +33 -0
  24. package/dist/components/ui/patterns/Accordion/index.d.ts +2 -0
  25. package/dist/components/ui/patterns/Collapsible/Collapsible.d.ts +15 -0
  26. package/dist/components/ui/patterns/Collapsible/index.d.ts +2 -0
  27. package/dist/components/ui/patterns/EntityDisplayCard/EntityDisplayCard.d.ts +33 -0
  28. package/dist/components/ui/patterns/EntityDisplayCard/index.d.ts +2 -0
  29. package/dist/components/ui/patterns/SummaryBar/SummaryBar.d.ts +17 -0
  30. package/dist/components/ui/patterns/SummaryBar/index.d.ts +2 -0
  31. package/dist/components/ui/patterns/WorkspaceHeader/WorkspaceHeader.d.ts +13 -3
  32. package/dist/components/ui/primitives/Grid/Grid.d.ts +6 -2
  33. package/dist/custom-elements.d.ts +113 -0
  34. package/dist/custom-elements.js +20971 -19657
  35. package/dist/custom-elements.js.map +1 -1
  36. package/dist/index.js +5670 -4980
  37. package/dist/index.js.map +1 -1
  38. package/dist/style.css +1 -1
  39. package/dist/theme/overrides.d.ts +10 -0
  40. package/dist/theme.js +62 -50
  41. package/dist/theme.js.map +1 -1
  42. package/dist/tokens/colors.d.ts +6 -1
  43. package/package.json +1 -1
@@ -27,7 +27,7 @@ The stylesheet is safe to import globally. It does not ship Tailwind preflight,
27
27
  Import components by name:
28
28
 
29
29
  ```tsx
30
- import { BfrsProvider, Button, Input, Slider, ColorPicker, ColorSwatchGroup, RevealAndCopy, Modal, DataTable, DateRangePicker, ToastProvider, useToast } from "@bfrs/agentic-components";
30
+ import { BfrsProvider, Button, Input, Slider, ColorPicker, ColorSwatchGroup, OptionCardGroup, NumberStepper, SuggestInput, FileDropzone, RevealField, RevealAndCopy, Modal, DataTable, DateRangePicker, ToastProvider, useToast } from "@bfrs/agentic-components";
31
31
  ```
32
32
 
33
33
  React consumers should wrap BFRS surfaces in `BfrsProvider`; the provider owns `--bfrs-*` variables, color scheme, and portal inheritance.
@@ -106,11 +106,11 @@ Use native Angular DOM event bindings for interactions. Do not pass React-style
106
106
  <bfrs-paper (click)="openDetails()">Open details</bfrs-paper>
107
107
  ```
108
108
 
109
- Registered tags cover the documented component surface: `bfrs-box`, `bfrs-container`, `bfrs-paper`, `bfrs-stack`, `bfrs-grid`, `bfrs-text`, `bfrs-icon`, `bfrs-button`, `bfrs-icon-button`, `bfrs-form-field`, `bfrs-label`, `bfrs-input`, `bfrs-slider`, `bfrs-color-picker`, `bfrs-color-swatch-group`, `bfrs-textarea`, `bfrs-select`, `bfrs-date-range-picker`, `bfrs-searchable-select`, `bfrs-checkbox`, `bfrs-radio`, `bfrs-switch`, `bfrs-badge`, `bfrs-chip`, `bfrs-alert`, `bfrs-toast-manager`, `bfrs-spinner`, `bfrs-skeleton`, `bfrs-empty-state`, `bfrs-error-state`, `bfrs-loading-state`, `bfrs-modal`, `bfrs-drawer`, `bfrs-confirm-dialog`, `bfrs-dropdown`, `bfrs-tooltip`, `bfrs-popover`, `bfrs-avatar`, `bfrs-metric-card`, `bfrs-table-pagination`, `bfrs-data-table`, `bfrs-tabs`, `bfrs-breadcrumbs`, `bfrs-action-menu`, `bfrs-page-header`, `bfrs-section-header`, `bfrs-layout-shell`, `bfrs-form-section`, `bfrs-filter-bar`, `bfrs-filter-drawer`, `bfrs-chat-bubble`, `bfrs-chat-composer`, `bfrs-full-page-loader`, `bfrs-business-info-display-card`, `bfrs-reveal-and-copy`, and `bfrs-step-progress-card`.
109
+ Registered tags cover the documented component surface: `bfrs-box`, `bfrs-container`, `bfrs-paper`, `bfrs-stack`, `bfrs-grid`, `bfrs-text`, `bfrs-icon`, `bfrs-button`, `bfrs-icon-button`, `bfrs-form-field`, `bfrs-label`, `bfrs-input`, `bfrs-slider`, `bfrs-color-picker`, `bfrs-color-swatch-group`, `bfrs-textarea`, `bfrs-select`, `bfrs-date-range-picker`, `bfrs-searchable-select`, `bfrs-multi-select`, `bfrs-suggest-input`, `bfrs-option-card-group`, `bfrs-selectable-chip-group`, `bfrs-number-stepper`, `bfrs-file-dropzone`, `bfrs-reveal-field`, `bfrs-checkbox`, `bfrs-radio`, `bfrs-switch`, `bfrs-badge`, `bfrs-chip`, `bfrs-alert`, `bfrs-info-card`, `bfrs-tip`, `bfrs-toast-manager`, `bfrs-spinner`, `bfrs-skeleton`, `bfrs-empty-state`, `bfrs-error-state`, `bfrs-loading-state`, `bfrs-modal`, `bfrs-drawer`, `bfrs-confirm-dialog`, `bfrs-dropdown`, `bfrs-tooltip`, `bfrs-popover`, `bfrs-avatar`, `bfrs-metric-card`, `bfrs-table-pagination`, `bfrs-data-table`, `bfrs-tabs`, `bfrs-breadcrumbs`, `bfrs-action-menu`, `bfrs-page-header`, `bfrs-section-header`, `bfrs-layout-shell`, `bfrs-form-section`, `bfrs-filter-bar`, `bfrs-filter-drawer`, `bfrs-chat-bubble`, `bfrs-chat-composer`, `bfrs-full-page-loader`, `bfrs-business-info-display-card`, `bfrs-collapsible`, `bfrs-accordion`, `bfrs-summary-bar`, `bfrs-entity-display-card`, `bfrs-reveal-and-copy`, and `bfrs-step-progress-card`.
110
110
 
111
111
  Use attributes for simple props: `variant`, `size`, `tone`, `label`, `loading`, `disabled`, `required`, `error-message`, `error-text`, `helper-text`, `prefix`, `suffix`, `min`, `max`, `step`, and `value`. Use `[props]` or the `props` JSON attribute for structured props like `options`, palette arrays, `items`, `columns`, `data`, `sections`, `steps`, and `toasts`.
112
112
 
113
- Common component events: `(value-change)`, `(checked-change)`, `(open-change)`, `(reveal-change)`, `(copy)`, `(copy-error)`, `(close)`, `(confirm)`, `(cancel)`, `(row-click)`, `(sort-change)`, `(page-change)`, `(page-size-change)`, `(action-select)`, `(dropdown-select)`, `(date-range-change)`, `(search-change)`, `(open-filters)`, `(apply)`, `(reset)`, and `(submit)`. Payloads are available on `$event.detail`.
113
+ Common component events: `(value-change)`, `(checked-change)`, `(open-change)`, `(reveal-change)`, `(copy)`, `(copy-error)`, `(close)`, `(confirm)`, `(cancel)`, `(cell-action)`, `(row-click)`, `(sort-change)`, `(page-change)`, `(page-size-change)`, `(action-select)`, `(dropdown-select)`, `(date-range-change)`, `(search-change)`, `(open-filters)`, `(apply)`, `(reset)`, and `(submit)`. Payloads are available on `$event.detail`.
114
114
 
115
115
  For validated forms, keep client validation, API validation, and submit side effects in the consuming app. In React, pass field errors through `FormField errorText` and set `Input error`. In Angular, use `bfrs-input` with `[attr.error]` and `[attr.error-message]`, listen to `(value-change)`, and manage success/failure notifications with `bfrs-toast-manager`.
116
116
 
@@ -138,7 +138,7 @@ For validated forms, keep client validation, API validation, and submit side eff
138
138
  - All interactive components forward refs and spread native HTML props
139
139
  - Styling uses **Tailwind CSS** + **CVA** with the `bfrs-` utility prefix. Use classes such as `bfrs-flex`, `hover:bfrs-bg-primary`, and `bfrs-animate-shimmer` when you intentionally depend on library utilities. Unprefixed classes are treated as host-app classes.
140
140
  - Use the `cn()` utility from the library for conditional class merging; it merges prefixed BFRS utilities and preserves unprefixed host classes.
141
- - **Card surface standard** — all card-like components (`Card`, `MetricCard`, `FormSection`, `BusinessInfoDisplayCard`, and `StepProgressCard` when `surface="card"`) share the same surface style: `border-radius: 12px`, a faded green-grey gradient stroke (`bfrs-faded-card-border`), `background: linear-gradient(168deg, #FFF 8.6%, #FFFFFD 97.41%)`, `box-shadow: 0 0 21.7px 0 rgba(24, 240, 64, 0.03)`. Do not override these properties unless intentionally switching to a `muted` or `soft` variant.
141
+ - **Card surface standard** — default/elevated card-like components (`Card`, `MetricCard`, `FormSection`, `BusinessInfoDisplayCard`, and `StepProgressCard` when `surface="card"`) use the faded green-grey gradient stroke (`bfrs-faded-card-border`) and tokenized white surface. `Card variant="bordered"` and `Paper variant="outlined"` intentionally use the plain reference card spec: `border-radius: 12px`, `border: 1px solid hsl(var(--bfrs-color-border))`, `background: surface`, `box-shadow: none`, and default medium padding of `18px 22px`.
142
142
 
143
143
  ```tsx
144
144
  import { cn } from "@bfrs/agentic-components";
@@ -219,7 +219,7 @@ Flexbox layout. Use instead of writing flex utility classes directly.
219
219
 
220
220
  #### `Grid`
221
221
 
222
- Responsive CSS grid layout.
222
+ Responsive CSS grid layout. Use numeric shortcuts for common responsive grids or pass a custom CSS template/min column width for form layouts.
223
223
 
224
224
  ```tsx
225
225
  <Grid columns={3} gap="md">
@@ -227,11 +227,16 @@ Responsive CSS grid layout.
227
227
  <Card />
228
228
  <Card />
229
229
  </Grid>
230
+
231
+ <Grid templateColumns="2fr 1fr" />
232
+ <Grid minColumnWidth="220px" />
230
233
  ```
231
234
 
232
235
  | Prop | Type | Default |
233
236
  |------|------|---------|
234
- | `columns` | `1 \| 2 \| 3 \| 4` | `3` |
237
+ | `columns` | `1 \| 2 \| 3 \| 4 \| string` | `3` |
238
+ | `templateColumns` | `string` | — |
239
+ | `minColumnWidth` | `string` | — |
235
240
  | `gap` | `"sm" \| "md" \| "lg"` | `"md"` |
236
241
 
237
242
  ---
@@ -458,6 +463,8 @@ Single-value dropdown. Options are `{ value: string; label: string }`.
458
463
  | `disabled` | `boolean` | `false` |
459
464
  | `error` | `boolean` | `false` |
460
465
 
466
+ The selected value never wraps: it truncates with an ellipsis when it is too long for the trigger, and the full value appears in a tooltip on hover.
467
+
461
468
  ---
462
469
 
463
470
  #### `DateRangePicker`
@@ -519,6 +526,126 @@ Combobox with search. Use when options list is long (10+).
519
526
 
520
527
  ---
521
528
 
529
+ #### `MultiSelect`
530
+
531
+ Searchable multi-value select. Use for channel/category filters or any bounded list where more than one option can be selected.
532
+
533
+ ```tsx
534
+ <MultiSelect
535
+ options={channels}
536
+ value={selectedChannels}
537
+ onValueChange={setSelectedChannels}
538
+ placeholder="Select channels"
539
+ searchPlaceholder="Search channels..."
540
+ />
541
+ ```
542
+
543
+ Angular custom element:
544
+
545
+ ```html
546
+ <bfrs-multi-select
547
+ placeholder="Select channels"
548
+ [props]="{ options: channelOptions, value: channels }"
549
+ (value-change)="channels = $event.detail.value">
550
+ </bfrs-multi-select>
551
+ ```
552
+
553
+ | Prop | Type | Default |
554
+ |------|------|---------|
555
+ | `options` | `{ value: string; label: string; disabled?: boolean }[]` | **required** |
556
+ | `value` | `string[]` | — |
557
+ | `defaultValue` | `string[]` | `[]` |
558
+ | `onValueChange` | `(value: string[]) => void` | — |
559
+ | `placeholder` | `string` | `"Select"` |
560
+ | `searchPlaceholder` | `string` | `"Search..."` |
561
+ | `emptyText` | `string` | `"No results found"` |
562
+ | `loading` | `boolean` | `false` |
563
+ | `disabled` | `boolean` | `false` |
564
+ | `error` | `boolean` | `false` |
565
+ | `clearable` | `boolean` | `true` |
566
+ | `maxVisibleValues` | `number` | `2` |
567
+
568
+ ---
569
+
570
+ #### `OptionCardGroup`
571
+
572
+ Bordered selectable option cards for radio-style choices. Supports optional description, icon, disabled state, and help tooltip text.
573
+
574
+ ```tsx
575
+ <OptionCardGroup
576
+ value={mode}
577
+ onValueChange={setMode}
578
+ options={[
579
+ { value: "standard", label: "Standard", description: "Lowest cost option.", helpText: "Best for flexible delivery." },
580
+ { value: "express", label: "Express", description: "Prioritize faster pickup." }
581
+ ]}
582
+ />
583
+ ```
584
+
585
+ Angular: `<bfrs-option-card-group [props]="{ options, value }" (value-change)="value = $event.detail.value"></bfrs-option-card-group>`.
586
+
587
+ ---
588
+
589
+ #### `SelectableChipGroup`
590
+
591
+ Segmented icon/label chips with selected state and optional trailing add action. Use `multiple` for checkbox-like chip groups.
592
+
593
+ ```tsx
594
+ <SelectableChipGroup multiple value={channels} options={channelOptions} addAction={{ label: "Add" }} onValueChange={setChannels} />
595
+ ```
596
+
597
+ Angular: `<bfrs-selectable-chip-group multiple [props]="{ options, value }" (value-change)="value = $event.detail.value"></bfrs-selectable-chip-group>`.
598
+
599
+ ---
600
+
601
+ #### `NumberStepper`
602
+
603
+ Quantity input rendered as decrement, value, increment controls.
604
+
605
+ ```tsx
606
+ <NumberStepper value={quantity} min={1} max={10} onValueChange={setQuantity} />
607
+ ```
608
+
609
+ Angular: `<bfrs-number-stepper [value]="quantity" min="1" max="10" (value-change)="quantity = $event.detail.value"></bfrs-number-stepper>`.
610
+
611
+ ---
612
+
613
+ #### `SuggestInput`
614
+
615
+ Free-text input with async-friendly suggestions dropdown. Use when the user may type arbitrary text; use `SearchableSelect` when the final value must be from a bounded option list.
616
+
617
+ ```tsx
618
+ <SuggestInput value={city} suggestions={citySuggestions} onValueChange={setCity} onSuggestionSelect={setSelectedCity} />
619
+ ```
620
+
621
+ Angular: `<bfrs-suggest-input [props]="{ suggestions, value }" (value-change)="value = $event.detail.value"></bfrs-suggest-input>`.
622
+
623
+ ---
624
+
625
+ #### `FileDropzone`
626
+
627
+ Drag/drop file selection area. Uploading, validation, and API side effects remain app-owned.
628
+
629
+ ```tsx
630
+ <FileDropzone title="Upload invoice" accept="application/pdf,image/*" onFilesChange={setFiles} />
631
+ ```
632
+
633
+ Angular: `<bfrs-file-dropzone title="Upload invoice" (files-change)="files = $event.detail.files"></bfrs-file-dropzone>`.
634
+
635
+ ---
636
+
637
+ #### `RevealField`
638
+
639
+ Field-level masked value with reveal and optional copy action, built on `RevealAndCopy`.
640
+
641
+ ```tsx
642
+ <RevealField label="Phone" value="9876543210" allowCopy helperText="Only reveal when required." />
643
+ ```
644
+
645
+ Angular: `<bfrs-reveal-field label="Phone" value="9876543210"></bfrs-reveal-field>`.
646
+
647
+ ---
648
+
522
649
  #### `Slider`
523
650
 
524
651
  Controlled numeric range control. Use instead of raw `<input type="range">`.
@@ -794,6 +921,30 @@ Contextual message banner. Auto-selects an icon based on tone.
794
921
 
795
922
  ---
796
923
 
924
+ #### `InfoCard`
925
+
926
+ Flexible callout with leading colored icon, title, description, optional actions, and semantic tone.
927
+
928
+ ```tsx
929
+ <InfoCard tone="info" title="Courier allocation is ready" description="Review serviceability before assigning the shipment." />
930
+ ```
931
+
932
+ Angular: `<bfrs-info-card title="Courier allocation is ready" description="Review serviceability before assigning the shipment."></bfrs-info-card>`.
933
+
934
+ ---
935
+
936
+ #### `Tip`
937
+
938
+ Small subtle accent pill for hints such as recommended, verified, or review states.
939
+
940
+ ```tsx
941
+ <Tip tone="success">Verified</Tip>
942
+ ```
943
+
944
+ Angular: `<bfrs-tip tone="success">Verified</bfrs-tip>`.
945
+
946
+ ---
947
+
797
948
  #### `ToastProvider`, `useToast`, `ToastManager`
798
949
 
799
950
  App-wide transient feedback manager. Wrap the app once, then call toast helpers from event handlers.
@@ -1129,6 +1280,30 @@ Generic data table with sorting, loading skeleton, row actions, selection, pagin
1129
1280
 
1130
1281
  When `loading` is true, `DataTable` renders built-in table-row skeleton placeholders rather than a spinner. The consumer app only owns the loading boolean.
1131
1282
 
1283
+ Custom-element DataTable action cells must be declarative because Angular/HTML cannot pass React `cell` functions through JSON. Use `cellType: "button"` for one inline button, `cellType: "buttons"` for multiple inline buttons, or `cellType: "actions"` for an action menu. Action clicks emit `cell-action` with `{ actionId, columnId, row, rowId, rowIndex }` and do not trigger `row-click`.
1284
+
1285
+ ```html
1286
+ <bfrs-data-table
1287
+ [props]="{
1288
+ data: orders,
1289
+ columns: [
1290
+ { id: 'orderId', header: 'Order ID', accessorKey: 'orderId' },
1291
+ {
1292
+ id: 'actions',
1293
+ header: 'Actions',
1294
+ cellType: 'buttons',
1295
+ actions: [
1296
+ { id: 'view', label: 'View', variant: 'outline', size: 'sm', iconName: 'eye' },
1297
+ { id: 'ship', label: 'Ship now', variant: 'primary', size: 'sm', disabledKey: 'shipDisabled' }
1298
+ ]
1299
+ }
1300
+ ]
1301
+ }"
1302
+ (cell-action)="handleTableAction($event.detail)"
1303
+ (row-click)="openOrder($event.detail.row)">
1304
+ </bfrs-data-table>
1305
+ ```
1306
+
1132
1307
  ---
1133
1308
 
1134
1309
  ### Navigation
@@ -1244,6 +1419,80 @@ Full-page app shell with sticky header and collapsible sidebar.
1244
1419
 
1245
1420
  ---
1246
1421
 
1422
+ #### `WorkspaceHeader`
1423
+
1424
+ 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.
1425
+
1426
+ ```tsx
1427
+ <WorkspaceHeader
1428
+ brand={<ShiprocketBrand />}
1429
+ onToggleSidebar={toggleSidebar}
1430
+ tabs={<ActiveWorkspaceTab />}
1431
+ search={<HeaderJumpSearch />}
1432
+ actions={<HeaderActions />}
1433
+ />
1434
+ ```
1435
+
1436
+ | Prop | Type | Default |
1437
+ |------|------|---------|
1438
+ | `brand` | `ReactNode` | — |
1439
+ | `brandWidth` | `number` | `216` |
1440
+ | `brandCollapsed` | `boolean` | `false` |
1441
+ | `collapsedBrandWidth` | `number` | `56` |
1442
+ | `onToggleSidebar` | `() => void` | — |
1443
+ | `toggleLabel` | `string` | `"Toggle sidebar"` |
1444
+ | `tabs` | `ReactNode` | — |
1445
+ | `tabsWidth` | `number` | `380` |
1446
+ | `tabsCollapsed` | `boolean` | `false` |
1447
+ | `collapsedTabsWidth` | `number` | `40` |
1448
+ | `search` | `ReactNode` | — |
1449
+ | `searchWidth` | `number` | `300` |
1450
+ | `actions` | `ReactNode` | — |
1451
+ | `children` | `ReactNode` | — |
1452
+ | `height` | `number` | `52` |
1453
+
1454
+ Use `brandCollapsed` and `tabsCollapsed` to mirror the standalone collapsed sidebar/chat rails. Use explicit widths only when the host app intentionally diverges from the prototype.
1455
+
1456
+ ---
1457
+
1458
+ #### `SideNav`
1459
+
1460
+ 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.
1461
+
1462
+ ```tsx
1463
+ <SideNav
1464
+ collapsed={collapsed}
1465
+ sections={[
1466
+ {
1467
+ id: "nav",
1468
+ items: [
1469
+ { id: "orders", label: "Orders", icon: <Icon icon={Package} />, active: true, onSelect: goOrders },
1470
+ { id: "finance", label: "Finance", icon: <Icon icon={Wallet} />, nested: [
1471
+ { id: "cod", label: "COD Remittance", onSelect: goCod },
1472
+ ] },
1473
+ ],
1474
+ },
1475
+ ]}
1476
+ footer={<UserMenu />}
1477
+ />
1478
+ ```
1479
+
1480
+ | Prop | Type | Default |
1481
+ |------|------|---------|
1482
+ | `sections` | `SideNavSection[]` | **required** |
1483
+ | `collapsed` | `boolean` | `false` |
1484
+ | `width` | `number` | `240` |
1485
+ | `collapsedWidth` | `number` | `56` |
1486
+ | `header` | `ReactNode` | — |
1487
+ | `children` | `ReactNode` | — |
1488
+ | `footer` | `ReactNode` | — |
1489
+
1490
+ - `SideNavSection`: `{ id?, title?, items, action? }` — `title` (uppercase) and `action` are hidden when collapsed.
1491
+ - `SideNavItem`: `{ id, label, icon?, active?, badge?, nested?, onSelect? }` — `badge` is hidden when collapsed; `nested` opens a hover flyout (expanded only).
1492
+ - When `collapsed`, each row hides its `label` and surfaces it as a right-side `Tooltip` on hover, so items stay identifiable by icon alone.
1493
+
1494
+ ---
1495
+
1247
1496
  #### `ChatBubble`
1248
1497
 
1249
1498
  Chat message bubble. Renders differently for `user`, `assistant`, and `system` senders. Assistant messages support a Figma-derived identity block with an uppercase eyebrow, title, and muted body copy.
@@ -1326,6 +1575,81 @@ Branded full-screen loading screen. Use during auth redirects and account setup.
1326
1575
 
1327
1576
  ---
1328
1577
 
1578
+ #### `Collapsible`
1579
+
1580
+ Inline expandable section with caret, title, optional description, controlled or uncontrolled open state, and `open-change` custom-element event.
1581
+
1582
+ ```tsx
1583
+ <Collapsible title="Courier rules" description="Expandable inline section">
1584
+ <Text variant="body-sm">Rules and restrictions.</Text>
1585
+ </Collapsible>
1586
+ ```
1587
+
1588
+ Angular: `<bfrs-collapsible title="Courier rules" (open-change)="open = $event.detail.open">Rules and restrictions</bfrs-collapsible>`.
1589
+
1590
+ ---
1591
+
1592
+ #### `Accordion`
1593
+
1594
+ Grouped expandable sections. Use `type="single"` (default) to keep one panel open at a time, or `type="multiple"` to allow several. Each item is `{ value, title, content, description?, disabled? }`. Use `Collapsible` instead for a single standalone disclosure.
1595
+
1596
+ ```tsx
1597
+ <Accordion
1598
+ type="single"
1599
+ defaultValue="pickup"
1600
+ items={[
1601
+ { value: "pickup", title: "Pickup details", description: "Warehouse and contact", content: <Text variant="body-sm">Plot 42, Sector 18, Gurugram.</Text> },
1602
+ { value: "shipping", title: "Shipping preferences", content: <Text variant="body-sm">Standard delivery.</Text> }
1603
+ ]}
1604
+ onValueChange={setOpenSection}
1605
+ />
1606
+ ```
1607
+
1608
+ | Prop | Type | Default |
1609
+ |------|------|---------|
1610
+ | `items` | `{ value: string; title: ReactNode; content: ReactNode; description?: ReactNode; disabled?: boolean }[]` | **required** |
1611
+ | `type` | `"single" \| "multiple"` | `"single"` |
1612
+ | `value` | `string \| string[]` | — |
1613
+ | `defaultValue` | `string \| string[]` | — |
1614
+ | `onValueChange` | `(value: string \| string[]) => void` | — |
1615
+ | `collapsible` | `boolean` | `true` |
1616
+
1617
+ For `type="single"`, `value`/`defaultValue`/`onValueChange` use a string; for `type="multiple"` they use a string array.
1618
+
1619
+ Angular: `<bfrs-accordion type="single" [props]="{ items: sections }" (value-change)="openSection = $event.detail.value"></bfrs-accordion>`. Pass each item's `content` as a string in custom-element usage.
1620
+
1621
+ ---
1622
+
1623
+ #### `SummaryBar`
1624
+
1625
+ Highlighted total/summary row for subtotal, charges, total, and optional note.
1626
+
1627
+ ```tsx
1628
+ <SummaryBar items={[{ label: "Subtotal", value: "₹840" }, { label: "Charges", value: "₹60" }]} totalLabel="Total" totalValue="₹900" />
1629
+ ```
1630
+
1631
+ Angular: `<bfrs-summary-bar total-label="Total" total-value="₹900" [props]="{ items }"></bfrs-summary-bar>`.
1632
+
1633
+ ---
1634
+
1635
+ #### `EntityDisplayCard`
1636
+
1637
+ Read-only selected address/entity card with status badge, metadata, and inline edit/action controls.
1638
+
1639
+ ```tsx
1640
+ <EntityDisplayCard
1641
+ title="Dee-doodles warehouse"
1642
+ description="Plot 42, Sector 18, Gurugram, Haryana"
1643
+ status="Verified"
1644
+ actions={[{ id: "edit", label: "Edit" }]}
1645
+ onAction={handleAction}
1646
+ />
1647
+ ```
1648
+
1649
+ Angular: `<bfrs-entity-display-card title="Dee-doodles warehouse" status="Verified" [props]="{ actions }" (entity-action)="handleEntityAction($event.detail.action)"></bfrs-entity-display-card>`.
1650
+
1651
+ ---
1652
+
1329
1653
  #### `RevealAndCopy`
1330
1654
 
1331
1655
  Masked sensitive-value display with a reveal action and optional clipboard copy. Use for phone numbers, email addresses, tokens, and other values that should not render as plaintext until the user asks to reveal them. The plaintext value is not placed in the DOM while masked.
@@ -1440,7 +1764,7 @@ Built-in loading behavior:
1440
1764
 
1441
1765
  #### `StepProgressCard`
1442
1766
 
1443
- Step-by-step progress indicator. Calculates `done` / `active` / `pending` state automatically from `currentStep` and preserves the animated completed-dot, active-star, and rail-fill transitions. Defaults to the Figma-derived plain progress block; pass `surface="card"` for the standard card wrapper.
1767
+ Step-by-step progress indicator. Calculates `done` / `active` / `pending` state automatically from `currentStep` and preserves the green completed-dot, active-star, and rail-fill transitions. Defaults to the Figma-derived plain progress block; pass `surface="card"` for the standard card wrapper.
1444
1768
 
1445
1769
  ```tsx
1446
1770
  <StepProgressCard
package/README.md CHANGED
@@ -113,12 +113,30 @@ Use simple attributes for primitive values and `[props]` for structured values o
113
113
 
114
114
  <bfrs-data-table
115
115
  [props]="{ data: orders, columns: orderColumns, selection: true }"
116
+ (cell-action)="handleTableAction($event.detail)"
116
117
  (row-click)="openOrder($event.detail.row)"
117
118
  (sort-change)="sorting = $event.detail.sorting">
118
119
  </bfrs-data-table>
119
120
  ```
120
121
 
121
- Registered tags include `bfrs-box`, `bfrs-container`, `bfrs-paper`, `bfrs-stack`, `bfrs-grid`, `bfrs-text`, `bfrs-icon`, `bfrs-button`, `bfrs-icon-button`, `bfrs-form-field`, `bfrs-label`, `bfrs-input`, `bfrs-slider`, `bfrs-color-picker`, `bfrs-color-swatch-group`, `bfrs-textarea`, `bfrs-select`, `bfrs-date-range-picker`, `bfrs-searchable-select`, `bfrs-checkbox`, `bfrs-radio`, `bfrs-switch`, `bfrs-badge`, `bfrs-chip`, `bfrs-alert`, `bfrs-toast-manager`, `bfrs-spinner`, `bfrs-skeleton`, `bfrs-empty-state`, `bfrs-error-state`, `bfrs-loading-state`, `bfrs-modal`, `bfrs-drawer`, `bfrs-confirm-dialog`, `bfrs-dropdown`, `bfrs-tooltip`, `bfrs-popover`, `bfrs-avatar`, `bfrs-metric-card`, `bfrs-table-pagination`, `bfrs-data-table`, `bfrs-tabs`, `bfrs-breadcrumbs`, `bfrs-action-menu`, `bfrs-page-header`, `bfrs-section-header`, `bfrs-layout-shell`, `bfrs-form-section`, `bfrs-filter-bar`, `bfrs-filter-drawer`, `bfrs-chat-bubble`, `bfrs-chat-composer`, `bfrs-full-page-loader`, `bfrs-business-info-display-card`, `bfrs-reveal-and-copy`, and `bfrs-step-progress-card`.
122
+ For DataTable action cells in Angular, use serializable column configs instead of React `cell` functions:
123
+
124
+ ```ts
125
+ orderColumns = [
126
+ { id: "orderId", header: "Order ID", accessorKey: "orderId" },
127
+ {
128
+ id: "actions",
129
+ header: "Actions",
130
+ cellType: "buttons",
131
+ actions: [
132
+ { id: "view", label: "View", variant: "outline", size: "sm", iconName: "eye" },
133
+ { id: "ship", label: "Ship now", variant: "primary", size: "sm", disabledKey: "shipDisabled" }
134
+ ]
135
+ }
136
+ ];
137
+ ```
138
+
139
+ Registered tags include `bfrs-box`, `bfrs-container`, `bfrs-paper`, `bfrs-stack`, `bfrs-grid`, `bfrs-text`, `bfrs-icon`, `bfrs-button`, `bfrs-icon-button`, `bfrs-form-field`, `bfrs-label`, `bfrs-input`, `bfrs-slider`, `bfrs-color-picker`, `bfrs-color-swatch-group`, `bfrs-textarea`, `bfrs-select`, `bfrs-date-range-picker`, `bfrs-searchable-select`, `bfrs-multi-select`, `bfrs-suggest-input`, `bfrs-option-card-group`, `bfrs-selectable-chip-group`, `bfrs-number-stepper`, `bfrs-file-dropzone`, `bfrs-reveal-field`, `bfrs-checkbox`, `bfrs-radio`, `bfrs-switch`, `bfrs-badge`, `bfrs-chip`, `bfrs-alert`, `bfrs-info-card`, `bfrs-tip`, `bfrs-toast-manager`, `bfrs-spinner`, `bfrs-skeleton`, `bfrs-empty-state`, `bfrs-error-state`, `bfrs-loading-state`, `bfrs-modal`, `bfrs-drawer`, `bfrs-confirm-dialog`, `bfrs-dropdown`, `bfrs-tooltip`, `bfrs-popover`, `bfrs-avatar`, `bfrs-metric-card`, `bfrs-table-pagination`, `bfrs-data-table`, `bfrs-tabs`, `bfrs-breadcrumbs`, `bfrs-action-menu`, `bfrs-page-header`, `bfrs-section-header`, `bfrs-layout-shell`, `bfrs-form-section`, `bfrs-filter-bar`, `bfrs-filter-drawer`, `bfrs-chat-bubble`, `bfrs-chat-composer`, `bfrs-full-page-loader`, `bfrs-business-info-display-card`, `bfrs-collapsible`, `bfrs-accordion`, `bfrs-summary-bar`, `bfrs-entity-display-card`, `bfrs-reveal-and-copy`, and `bfrs-step-progress-card`.
122
140
 
123
141
  ## Theme Overrides
124
142
 
@@ -0,0 +1,16 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { Tone } from '../../../../tokens';
3
+ export type InfoCardProps = Omit<HTMLAttributes<HTMLDivElement>, "title"> & {
4
+ tone?: Tone;
5
+ icon?: ReactNode;
6
+ title: ReactNode;
7
+ description?: ReactNode;
8
+ actions?: ReactNode;
9
+ };
10
+ export declare const InfoCard: import('react').ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "title"> & {
11
+ tone?: Tone;
12
+ icon?: ReactNode;
13
+ title: ReactNode;
14
+ description?: ReactNode;
15
+ actions?: ReactNode;
16
+ } & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export { InfoCard } from './InfoCard';
2
+ export type { InfoCardProps } from './InfoCard';
@@ -0,0 +1,8 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { Tone } from '../../../../tokens';
3
+ export type TipProps = HTMLAttributes<HTMLSpanElement> & {
4
+ tone?: Tone;
5
+ };
6
+ export declare const Tip: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & {
7
+ tone?: Tone;
8
+ } & import('react').RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,2 @@
1
+ export { Tip } from './Tip';
2
+ export type { TipProps } from './Tip';
@@ -0,0 +1,21 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export type FileDropzoneProps = Omit<HTMLAttributes<HTMLDivElement>, "onDrop"> & {
3
+ accept?: string;
4
+ multiple?: boolean;
5
+ disabled?: boolean;
6
+ error?: boolean;
7
+ title?: string;
8
+ description?: string;
9
+ browseLabel?: string;
10
+ onFilesChange?: (files: File[]) => void;
11
+ };
12
+ export declare const FileDropzone: import('react').ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "onDrop"> & {
13
+ accept?: string;
14
+ multiple?: boolean;
15
+ disabled?: boolean;
16
+ error?: boolean;
17
+ title?: string;
18
+ description?: string;
19
+ browseLabel?: string;
20
+ onFilesChange?: (files: File[]) => void;
21
+ } & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export { FileDropzone } from './FileDropzone';
2
+ export type { FileDropzoneProps } from './FileDropzone';
@@ -0,0 +1,20 @@
1
+ import { SelectOption } from '../Select';
2
+ export type MultiSelectProps = {
3
+ options: SelectOption[];
4
+ value?: string[];
5
+ defaultValue?: string[];
6
+ onValueChange?: (value: string[]) => void;
7
+ placeholder?: string;
8
+ searchPlaceholder?: string;
9
+ emptyText?: string;
10
+ loading?: boolean;
11
+ disabled?: boolean;
12
+ error?: boolean;
13
+ clearable?: boolean;
14
+ maxVisibleValues?: number;
15
+ className?: string;
16
+ id?: string;
17
+ "aria-describedby"?: string;
18
+ "aria-invalid"?: boolean;
19
+ };
20
+ export declare const MultiSelect: import('react').ForwardRefExoticComponent<MultiSelectProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1 @@
1
+ export * from './MultiSelect';
@@ -0,0 +1,21 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ export type NumberStepperProps = Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "onChange" | "size" | "value"> & {
3
+ value?: number;
4
+ defaultValue?: number;
5
+ onValueChange?: (value: number) => void;
6
+ min?: number;
7
+ max?: number;
8
+ step?: number;
9
+ size?: "sm" | "md";
10
+ error?: boolean;
11
+ };
12
+ export declare const NumberStepper: import('react').ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "defaultValue" | "onChange"> & {
13
+ value?: number;
14
+ defaultValue?: number;
15
+ onValueChange?: (value: number) => void;
16
+ min?: number;
17
+ max?: number;
18
+ step?: number;
19
+ size?: "sm" | "md";
20
+ error?: boolean;
21
+ } & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,2 @@
1
+ export { NumberStepper } from './NumberStepper';
2
+ export type { NumberStepperProps } from './NumberStepper';
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from 'react';
2
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
+ export type OptionCardItem = {
4
+ value: string;
5
+ label: ReactNode;
6
+ description?: ReactNode;
7
+ helpText?: ReactNode;
8
+ icon?: ReactNode;
9
+ disabled?: boolean;
10
+ };
11
+ export type OptionCardGroupProps = Omit<RadioGroupPrimitive.RadioGroupProps, "children"> & {
12
+ options: OptionCardItem[];
13
+ error?: boolean;
14
+ columns?: 1 | 2 | 3;
15
+ };
16
+ export declare const OptionCardGroup: import('react').ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps, "children"> & {
17
+ options: OptionCardItem[];
18
+ error?: boolean;
19
+ columns?: 1 | 2 | 3;
20
+ } & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export { OptionCardGroup } from './OptionCardGroup';
2
+ export type { OptionCardGroupProps, OptionCardItem } from './OptionCardGroup';
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ import { RevealAndCopyProps } from '../../patterns/RevealAndCopy';
3
+ export type RevealFieldProps = Omit<RevealAndCopyProps, "className"> & {
4
+ label?: ReactNode;
5
+ helperText?: ReactNode;
6
+ errorText?: ReactNode;
7
+ className?: string;
8
+ fieldClassName?: string;
9
+ };
10
+ export declare const RevealField: import('react').ForwardRefExoticComponent<Omit<RevealAndCopyProps, "className"> & {
11
+ label?: ReactNode;
12
+ helperText?: ReactNode;
13
+ errorText?: ReactNode;
14
+ className?: string;
15
+ fieldClassName?: string;
16
+ } & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export { RevealField } from './RevealField';
2
+ export type { RevealFieldProps } from './RevealField';
@@ -0,0 +1,23 @@
1
+ import { ReactNode } from 'react';
2
+ export type SelectableChipOption = {
3
+ value: string;
4
+ label: ReactNode;
5
+ icon?: ReactNode;
6
+ disabled?: boolean;
7
+ };
8
+ export type SelectableChipAction = {
9
+ label: ReactNode;
10
+ disabled?: boolean;
11
+ onClick?: () => void;
12
+ };
13
+ export type SelectableChipGroupProps = {
14
+ options: SelectableChipOption[];
15
+ value?: string | string[];
16
+ defaultValue?: string | string[];
17
+ multiple?: boolean;
18
+ onValueChange?: (value: string | string[]) => void;
19
+ addAction?: SelectableChipAction;
20
+ className?: string;
21
+ "aria-label"?: string;
22
+ };
23
+ export declare function SelectableChipGroup({ options, value, defaultValue, multiple, onValueChange, addAction, className, "aria-label": ariaLabel }: SelectableChipGroupProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { SelectableChipGroup } from './SelectableChipGroup';
2
+ export type { SelectableChipAction, SelectableChipGroupProps, SelectableChipOption } from './SelectableChipGroup';