@bfrs/agentic-components 0.1.0 → 0.1.2

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.
@@ -40,11 +40,12 @@ import { Button, Input, Modal, DataTable, DateRangePicker, ToastProvider, useToa
40
40
  ## Design System Conventions
41
41
 
42
42
  - **Sizes** are always `"sm" | "md" | "lg"` — default is `"md"` unless noted
43
- - **Tones** are always `"neutral" | "primary" | "success" | "warning" | "danger" | "info"`
43
+ - **Tones** are always `"neutral" | "primary" | "brand" | "success" | "warning" | "danger" | "info"`
44
44
  - **Variants** control visual style (filled vs. outline vs. ghost, etc.)
45
45
  - All interactive components forward refs and spread native HTML props
46
46
  - Styling uses **Tailwind CSS** + **CVA** — do not add raw Tailwind classes on top of variant-controlled elements
47
47
  - Use the `cn()` utility from the library for conditional class merging
48
+ - **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 (`dcl-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.
48
49
 
49
50
  ```tsx
50
51
  import { cn } from "@bfrs/agentic-components";
@@ -193,10 +194,12 @@ Primary interactive element. Covers all CTA patterns.
193
194
  Save changes
194
195
  </Button>
195
196
 
196
- <Button variant="destructive" loading={isDeleting}>
197
+ <Button variant="danger" loading={isDeleting}>
197
198
  Delete account
198
199
  </Button>
199
200
 
201
+ <Button variant="tertiary">Save this view</Button>
202
+
200
203
  <Button variant="outline" leftIcon={<Icon icon={Plus} />}>
201
204
  Add item
202
205
  </Button>
@@ -204,7 +207,7 @@ Primary interactive element. Covers all CTA patterns.
204
207
 
205
208
  | Prop | Type | Default |
206
209
  |------|------|---------|
207
- | `variant` | `"primary" \| "secondary" \| "outline" \| "ghost" \| "destructive" \| "link"` | `"primary"` |
210
+ | `variant` | `"primary" \| "secondary" \| "tertiary" \| "outline" \| "ghost" \| "danger" \| "destructive" \| "link"` | `"primary"` |
208
211
  | `size` | `"sm" \| "md" \| "lg"` | `"md"` |
209
212
  | `fullWidth` | `boolean` | `false` |
210
213
  | `leftIcon` | `ReactNode` | — |
@@ -296,16 +299,19 @@ Standard text input.
296
299
  leftIcon={<Icon icon={MagnifyingGlass} />}
297
300
  />
298
301
 
299
- <Input value={val} state="error" onChange={…} />
302
+ <Input prefix="₹" suffix="INR" placeholder="0.00" />
303
+ <Input error value={val} onChange={…} />
300
304
  ```
301
305
 
302
306
  | Prop | Type | Default |
303
307
  |------|------|---------|
304
308
  | `size` | `"sm" \| "md" \| "lg"` | `"md"` |
305
- | `state` | `"default" \| "error"` | `"default"` |
306
309
  | `error` | `boolean` | `false` |
310
+ | `prefix` | `ReactNode` | — |
311
+ | `suffix` | `ReactNode` | — |
307
312
  | `leftIcon` | `ReactNode` | — |
308
313
  | `rightIcon` | `ReactNode` | — |
314
+ | `loading` | `boolean` | `false` |
309
315
 
310
316
  Accepts all native `<input>` props.
311
317
 
@@ -504,12 +510,16 @@ Small inline status label.
504
510
  <Badge tone="success">Active</Badge>
505
511
  <Badge tone="warning">Pending</Badge>
506
512
  <Badge tone="danger">Blocked</Badge>
513
+ <Badge count={3} aria-label="3 active filters" />
507
514
  ```
508
515
 
509
516
  | Prop | Type | Default |
510
517
  |------|------|---------|
511
518
  | `size` | `"sm" \| "md" \| "lg"` | `"sm"` |
512
- | `tone` | `"neutral" \| "primary" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` |
519
+ | `variant` | `"default" \| "neutral" \| "primary" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"default"` |
520
+ | `tone` | `"neutral" \| "primary" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` |
521
+ | `dot` | `boolean` | `false` |
522
+ | `count` | `number` | — |
513
523
 
514
524
  ---
515
525
 
@@ -522,6 +532,7 @@ Removable tag. Use in filter bars and multi-select UIs.
522
532
  tone="primary"
523
533
  variant="soft"
524
534
  leftIcon={<Icon icon={Tag} />}
535
+ removable
525
536
  onRemove={() => removeFilter("status")}
526
537
  >
527
538
  Status: Active
@@ -530,9 +541,10 @@ Removable tag. Use in filter bars and multi-select UIs.
530
541
 
531
542
  | Prop | Type | Default |
532
543
  |------|------|---------|
533
- | `variant` | `"filled" \| "soft" \| "outline"` | `"soft"` |
534
- | `tone` | `"neutral" \| "primary" \| "success" \| "warning" \| "danger"` | `"neutral"` |
544
+ | `variant` | `"default" \| "filled" \| "soft" \| "outline"` | `"default"` |
545
+ | `tone` | `"neutral" \| "primary" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` |
535
546
  | `leftIcon` | `ReactNode` | — |
547
+ | `removable` | `boolean` | `false` |
536
548
  | `onRemove` | `() => void` | — |
537
549
  | `removeLabel` | `string` | `"Remove"` |
538
550
 
@@ -914,11 +926,20 @@ Tabbed content switcher.
914
926
  { value: "settings", label: "Settings", content: <Settings /> },
915
927
  ]}
916
928
  />
929
+
930
+ <Tabs defaultValue="overview">
931
+ <Tabs.List>
932
+ <Tabs.Trigger value="overview">Overview</Tabs.Trigger>
933
+ <Tabs.Trigger value="orders" badge={<Badge count={12} />}>Orders</Tabs.Trigger>
934
+ </Tabs.List>
935
+ <Tabs.Content value="overview">...</Tabs.Content>
936
+ <Tabs.Content value="orders">...</Tabs.Content>
937
+ </Tabs>
917
938
  ```
918
939
 
919
940
  | Prop | Type | Default |
920
941
  |------|------|---------|
921
- | `items` | `{ value: string; label: ReactNode; content: ReactNode }[]` | **required** |
942
+ | `items` | `{ value: string; label: ReactNode; content?: ReactNode; badge?: ReactNode }[]` | |
922
943
  | `variant` | `"line" \| "pill"` | `"line"` |
923
944
  | `defaultValue` | `string` | — |
924
945
  | `value` | `string` | — |
@@ -1001,11 +1022,13 @@ Full-page app shell with sticky header and collapsible sidebar.
1001
1022
 
1002
1023
  #### `ChatBubble`
1003
1024
 
1004
- Chat message bubble. Renders differently for `user`, `assistant`, and `system` senders.
1025
+ 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.
1005
1026
 
1006
1027
  ```tsx
1007
- <ChatBubble sender="assistant" timestamp="2:34 PM" loading={isStreaming}>
1008
- Here's a summary of your recent orders…
1028
+ <ChatBubble sender="assistant" eyebrow="Identity" title="Your details are ready" timestamp="2:34 PM" loading={isStreaming}>
1029
+ We've found your name and email linked to your number.
1030
+ <br />
1031
+ Review and continue, or edit if needed.
1009
1032
  </ChatBubble>
1010
1033
 
1011
1034
  <ChatBubble sender="user" timestamp="2:35 PM">
@@ -1016,7 +1039,9 @@ Chat message bubble. Renders differently for `user`, `assistant`, and `system` s
1016
1039
  | Prop | Type | Default |
1017
1040
  |------|------|---------|
1018
1041
  | `sender` | `"user" \| "assistant" \| "system"` | **required** |
1019
- | `children` | `ReactNode` | **required** |
1042
+ | `children` | `ReactNode` | |
1043
+ | `eyebrow` | `ReactNode` | — |
1044
+ | `title` | `ReactNode` | — |
1020
1045
  | `timestamp` | `ReactNode` | — |
1021
1046
  | `status` | `ReactNode` | — |
1022
1047
  | `loading` | `boolean` | `false` |
@@ -1079,19 +1104,20 @@ Branded full-screen loading screen. Use during auth redirects and account setup.
1079
1104
 
1080
1105
  #### `BusinessInfoDisplayCard`
1081
1106
 
1082
- Rich business identity card with header, logo, chips, and info sections.
1107
+ Rich business identity card with centered profile identity, metadata chips, and compact label-value details. Uses the standard card surface (faded green-grey gradient stroke, white gradient background, green-glow shadow) and the Figma-derived green header wash.
1083
1108
 
1084
1109
  ```tsx
1085
1110
  <BusinessInfoDisplayCard
1086
- businessName="Acme Corp"
1087
- initials="AC"
1088
- chips={[{ label: "Verified", tone: "success" }]}
1111
+ businessName="Deeksha Gahlot"
1112
+ subtitle="deekshagahlot@gmail.com"
1113
+ initials="DG"
1114
+ chips={[{ label: "30-100/ month" }, { label: "Starting Up" }]}
1089
1115
  sections={[
1090
1116
  {
1091
- title: "Contact",
1092
1117
  items: [
1093
- { label: "Email", value: "hello@acme.com" },
1094
- { label: "Phone", value: "+91 98765 43210" },
1118
+ { label: "Business Type", value: "Registered" },
1119
+ { label: "Company Name", value: "Deedoodle" },
1120
+ { label: "Pickup Pincode", value: "122099" },
1095
1121
  ],
1096
1122
  },
1097
1123
  ]}
@@ -1102,10 +1128,11 @@ Rich business identity card with header, logo, chips, and info sections.
1102
1128
  |------|------|---------|
1103
1129
  | `businessName` | `ReactNode` | **required** |
1104
1130
  | `sections` | `BusinessInfoSection[]` | **required** |
1131
+ | `subtitle` | `ReactNode` | — |
1105
1132
  | `initials` | `string` | — |
1106
1133
  | `logoSrc` | `string` | — |
1107
1134
  | `logoAlt` | `string` | — |
1108
- | `chips` | `{ label: string; tone?: Tone }[]` | |
1135
+ | `chips` | `{ label: ReactNode; icon?: ReactNode }[]` | `"30-100/ month"`, `"Starting Up"` |
1109
1136
  | `background` | `string` | — |
1110
1137
  | `gradient` | `string` | — |
1111
1138
  | `headerBackground` | `string` | — |
@@ -1113,36 +1140,37 @@ Rich business identity card with header, logo, chips, and info sections.
1113
1140
 
1114
1141
  `BusinessInfoSection`:
1115
1142
  ```ts
1116
- { title: string; items: { label: string; value: ReactNode }[] }
1143
+ { title?: ReactNode; items: { label: ReactNode; value: ReactNode }[] }
1117
1144
  ```
1118
1145
 
1119
1146
  ---
1120
1147
 
1121
1148
  #### `StepProgressCard`
1122
1149
 
1123
- Step-by-step progress indicator. Calculates `complete` / `current` / `upcoming` state automatically from `currentStep`.
1150
+ 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.
1124
1151
 
1125
1152
  ```tsx
1126
1153
  <StepProgressCard
1127
- eyebrow="Onboarding"
1128
- title="Let's get you set up"
1154
+ eyebrow="Identity & Contact"
1155
+ title="Getting your details ready…"
1129
1156
  currentStep={1}
1130
1157
  animated
1131
1158
  steps={[
1132
- { label: "Create account" },
1133
- { label: "Verify email" },
1134
- { label: "Add your first product" },
1159
+ { label: "Securely Fetching to your account" },
1160
+ { label: "Verifying your identity" },
1161
+ { label: "Retrieving business details" },
1162
+ { label: "Validating your information" },
1135
1163
  ]}
1136
1164
  />
1137
1165
  ```
1138
1166
 
1139
1167
  | Prop | Type | Default |
1140
1168
  |------|------|---------|
1141
- | `steps` | `{ label: ReactNode; description?: ReactNode }[]` | **required** |
1169
+ | `steps` | `{ label: ReactNode; status?: "done" \| "active" \| "pending" \| "disabled"; disabled?: boolean }[]` | **required** |
1142
1170
  | `currentStep` | `number` | `0` |
1143
- | `eyebrow` | `ReactNode` | `"Account Summary"` |
1171
+ | `eyebrow` | `ReactNode` | `"Identity & Contact"` |
1144
1172
  | `title` | `ReactNode` | `"Getting your details ready…"` |
1145
- | `surface` | `"card" \| "plain"` | `"card"` |
1173
+ | `surface` | `"card" \| "plain"` | `"plain"` |
1146
1174
  | `animated` | `boolean` | `true` |
1147
1175
 
1148
1176
  ---
@@ -1,2 +1,20 @@
1
- import { TabsProps } from './Tabs.types';
2
- export declare function Tabs({ items, variant, size, className, listClassName, triggerClassName, contentClassName, ...props }: TabsProps): import("react/jsx-runtime").JSX.Element;
1
+ import { ReactElement } from 'react';
2
+ import { TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps } from './Tabs.types';
3
+ declare function TabsList({ className, ...props }: TabsListProps): import("react/jsx-runtime").JSX.Element;
4
+ declare namespace TabsList {
5
+ var displayName: string;
6
+ }
7
+ declare function TabsTrigger({ className, badge, children, ...props }: TabsTriggerProps): import("react/jsx-runtime").JSX.Element;
8
+ declare namespace TabsTrigger {
9
+ var displayName: string;
10
+ }
11
+ declare function TabsContent({ className, ...props }: TabsContentProps): import("react/jsx-runtime").JSX.Element;
12
+ declare namespace TabsContent {
13
+ var displayName: string;
14
+ }
15
+ export declare const Tabs: ((props: TabsProps) => ReactElement) & {
16
+ List: typeof TabsList;
17
+ Trigger: typeof TabsTrigger;
18
+ Content: typeof TabsContent;
19
+ };
20
+ export {};
@@ -8,10 +8,15 @@ export type TabItem = {
8
8
  badge?: ReactNode;
9
9
  };
10
10
  export type TabsProps = RadixTabs.TabsProps & {
11
- items: TabItem[];
11
+ items?: TabItem[];
12
12
  variant?: "line" | "pill";
13
13
  size?: "sm" | "md" | "lg";
14
14
  listClassName?: string;
15
15
  triggerClassName?: string;
16
16
  contentClassName?: string;
17
17
  };
18
+ export type TabsListProps = RadixTabs.TabsListProps;
19
+ export type TabsTriggerProps = RadixTabs.TabsTriggerProps & {
20
+ badge?: ReactNode;
21
+ };
22
+ export type TabsContentProps = RadixTabs.TabsContentProps;
@@ -1,6 +1,7 @@
1
+ import { BadgeTone } from './Badge.types';
1
2
  export declare const Badge: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLSpanElement> & {
2
3
  variant?: import('./Badge.types').BadgeVariant;
3
- tone?: import('./Badge.types').BadgeVariant;
4
+ tone?: BadgeTone;
4
5
  size?: import('./Badge.types').BadgeSize;
5
6
  dot?: boolean;
6
7
  count?: number;
@@ -1,10 +1,11 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
2
  import { Tone } from '../../../tokens';
3
3
  export type BadgeSize = "sm" | "md" | "lg";
4
- export type BadgeVariant = Tone;
4
+ export type BadgeTone = Tone;
5
+ export type BadgeVariant = "default" | BadgeTone;
5
6
  export type BadgeProps = HTMLAttributes<HTMLSpanElement> & {
6
7
  variant?: BadgeVariant;
7
- tone?: BadgeVariant;
8
+ tone?: BadgeTone;
8
9
  size?: BadgeSize;
9
10
  dot?: boolean;
10
11
  count?: number;
@@ -1,5 +1,5 @@
1
1
  import { ButtonHTMLAttributes, ReactNode } from 'react';
2
- export type ButtonVariant = "primary" | "secondary" | "outline" | "ghost" | "destructive" | "danger" | "link";
2
+ export type ButtonVariant = "primary" | "secondary" | "tertiary" | "outline" | "ghost" | "destructive" | "danger" | "link";
3
3
  export type ButtonSize = "sm" | "md" | "lg";
4
4
  export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
5
5
  variant?: ButtonVariant;
@@ -5,6 +5,7 @@ export declare const Chip: import('react').ForwardRefExoticComponent<import('rea
5
5
  leftIcon?: import('react').ReactNode;
6
6
  rightIcon?: import('react').ReactNode;
7
7
  selected?: boolean;
8
+ removable?: boolean;
8
9
  onRemove?: import('react').ButtonHTMLAttributes<HTMLButtonElement>["onClick"];
9
10
  removeLabel?: string;
10
11
  } & import('react').RefAttributes<HTMLSpanElement>>;
@@ -9,6 +9,7 @@ export type ChipProps = HTMLAttributes<HTMLSpanElement> & {
9
9
  leftIcon?: ReactNode;
10
10
  rightIcon?: ReactNode;
11
11
  selected?: boolean;
12
+ removable?: boolean;
12
13
  onRemove?: ButtonHTMLAttributes<HTMLButtonElement>["onClick"];
13
14
  removeLabel?: string;
14
15
  };
@@ -5,8 +5,11 @@ export declare const Input: import('react').ForwardRefExoticComponent<Omit<impor
5
5
  errorMessage?: import('react').ReactNode;
6
6
  error?: boolean;
7
7
  required?: boolean;
8
+ prefix?: import('react').ReactNode;
9
+ suffix?: import('react').ReactNode;
8
10
  leftIcon?: import('react').ReactNode;
9
11
  rightIcon?: import('react').ReactNode;
12
+ loading?: boolean;
10
13
  onClear?: () => void;
11
14
  clearLabel?: string;
12
15
  fullWidth?: boolean;
@@ -7,8 +7,11 @@ export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & {
7
7
  errorMessage?: ReactNode;
8
8
  error?: boolean;
9
9
  required?: boolean;
10
+ prefix?: ReactNode;
11
+ suffix?: ReactNode;
10
12
  leftIcon?: ReactNode;
11
13
  rightIcon?: ReactNode;
14
+ loading?: boolean;
12
15
  onClear?: () => void;
13
16
  clearLabel?: string;
14
17
  fullWidth?: boolean;
@@ -1,2 +1,2 @@
1
1
  export { Tabs } from '../../../navigation/Tabs';
2
- export type { TabItem, TabsProps } from '../../../navigation/Tabs';
2
+ export type { TabItem, TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps } from '../../../navigation/Tabs';
@@ -8,11 +8,12 @@ export type BusinessInfoItem = {
8
8
  value: ReactNode;
9
9
  };
10
10
  export type BusinessInfoSection = {
11
- title: ReactNode;
11
+ title?: ReactNode;
12
12
  items: BusinessInfoItem[];
13
13
  };
14
14
  export type BusinessInfoDisplayCardProps = HTMLAttributes<HTMLDivElement> & {
15
15
  businessName: ReactNode;
16
+ subtitle?: ReactNode;
16
17
  initials?: string;
17
18
  logoSrc?: string;
18
19
  logoAlt?: string;
@@ -25,6 +26,7 @@ export type BusinessInfoDisplayCardProps = HTMLAttributes<HTMLDivElement> & {
25
26
  };
26
27
  export declare const BusinessInfoDisplayCard: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
27
28
  businessName: ReactNode;
29
+ subtitle?: ReactNode;
28
30
  initials?: string;
29
31
  logoSrc?: string;
30
32
  logoAlt?: string;
@@ -1,11 +1,13 @@
1
1
  import { ReactNode } from 'react';
2
2
  export type ChatBubbleProps = {
3
3
  sender: "user" | "assistant" | "system";
4
- children: ReactNode;
4
+ children?: ReactNode;
5
+ eyebrow?: ReactNode;
6
+ title?: ReactNode;
5
7
  timestamp?: ReactNode;
6
8
  status?: ReactNode;
7
9
  loading?: boolean;
8
10
  errorAction?: ReactNode;
9
11
  className?: string;
10
12
  };
11
- export declare function ChatBubble({ sender, children, timestamp, status, loading, errorAction, className }: ChatBubbleProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function ChatBubble({ sender, children, eyebrow, title, timestamp, status, loading, errorAction, className }: ChatBubbleProps): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,9 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
  export type StepProgressCardSkeletonProps = HTMLAttributes<HTMLDivElement> & {
3
3
  steps?: number;
4
+ surface?: "card" | "plain";
4
5
  };
5
6
  export declare const StepProgressCardSkeleton: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
6
7
  steps?: number;
8
+ surface?: "card" | "plain";
7
9
  } & import('react').RefAttributes<HTMLDivElement>>;